You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org

Mobile Reportcard

From Wikitech-static
Jump to navigation Jump to search

NOTE: This dashboard is no longer available. Contact the Wikimedia Editing and Reading teams to find out their plans for it. The data this dashboard visualized is now available in a variety of dashboards including:

https://analytics.wikimedia.org/dashboards/vital-signs/


The Mobile Reportcard is a Labs instance hosting analytics dashboards related to Mobile web and apps usage and powered by Limn, a d3-based data visualization tool.

It can be viewed at http://mobile-reportcard.wmflabs.org/.

The code that generates these dashboards can be found in the repository. Pointers to the raw data can be found in datasources/, the SQL queries can be found in mobile/, the graph definitions can be found in graphs/, and the dashboard definitions can be found in dashboards/. The table shortcuts are defined in mobile/config.yaml.

You will need access to stat1006. Currently it takes at least 3 days to get access, so start requesting it as soon as possible.

How to get access to stat1006

  • Put your ssh public key on your office wiki user page. Make sure the key is different from the one you use in gerrit.
  • Let Yuvaraj Pandian (YuviPanda on IRC) know, he will file the paperwork (RT Ticket)
  • You'll need access to read the "/etc/mysql/conf.d/research-client.cnf" so make sure the operations team gives you that access. If you don't have access to that file, you can report an issue at RT

How to create new graphs and dashboards

The best way to modify a dashboard is to install local instance of Limn and set it up to serve data from the limn-mobile-data configuration.

1. Install Limn

Limn is the software that runs the Mobile Reportcard. Make sure you have nodejs and npm installed.

git clone https://github.com/wikimedia/limn.git  # it's important not to clone it from gerrit (https://gerrit.wikimedia.org/r/analytics/limn) as that repo is old.
cd limn
npm install
npm i -g coco
npm start

From now on, we'll assume that your local Limn instance lives in ~/git/limn.

2. Install analytics-limn-mobile-data

The git repository is located at analytics-limn-mobile-data. Follow the installation instructions on the README.md keeping in mind the following:

  • You will need to install python, and "virtualenv" before.
  • The requirements.txt file is missing the "distribute" (bug) and "python-dateutil" (bug) packages, and if your "distribute" package version is 0.7.3 you need to install "MySQL-python" version 1.2.5. You can't install any lower version of "MySQL-python" package with the version of distribute you have.

Until the requirements.txt is fixed, before running "pip install -r requirements.txt" you can change its contents to:

distribute==0.7.3
python-dateutil==2.2
Jinja2==2.6
MySQL-python==1.2.5
PyYAML==3.10

3. Configure analytics-limn-mobile-data

After you get access to the stat1006 server, you should be able to SSH into it by adding the following lines to your local ~/.ssh/config file.

See Production_shell_access#Standard_config for details.

Now, SSH into stat1006.eqiad.wmnet and get your database username and password by running the following command:

cat /etc/mysql/conf.d/research-client.cnf

Follow the "Testing using local data" section of the README.md file. Also, if you just want to generate data for a single graph then you can run a command similar to this (previously execute source env/bin/activate and execute scripts/ssh in another shell):

python generate.py -c scripts/config.yaml mobile -g ui-daily

4. View Mobile Graphs

Visit http://localhost:5000/#other-graphs-tab. You can find the data file used in each graph just under the graph.