Universal Language Selector/Compact Language Links/metrics

Measuring interlanguage links clicks
For getting information one day before, run:

For a particular date, run (note: no leading zeros in the date): The output will be in the files with names such as prev_wikipedia_2016_7_7.out and curr_wikipedia_2016_7_7.out, where "prev" is for the source language and "curr" is for target language.

Copy the results from the .out file to a text editor, and then copy them from the text editor to the relevant column in the spreadsheet.

Updating the pageviews data
Get the pageviews data for the projects that are measured:
 * Wikipedia: https://tools.wmflabs.org/siteviews/?platform=all-access&source=pageviews&agent=user&range=latest-10&sites=af.wikipedia.org|als.wikipedia.org|en.wikipedia.org|fr.wikipedia.org|lv.wikipedia.org|ru.wikipedia.org|se.wikipedia.org|sq.wikipedia.org|zu.wikipedia.org
 * Wikivoyage: https://tools.wmflabs.org/siteviews/?platform=all-access&source=pageviews&agent=user&range=latest-10&sites=en.wikivoyage.org|ru.wikivoyage.org

Copy the results to the relevant cells in the spreadsheet.

Adding a new language for calculating percentage of clicks out of views

 * 1) Find the right place, alphabetically, for the language to appear.
 * 2) Select all the rows for the language before which you want to add another one, including an empty row after it.
 * 3) Copy (Ctrl-C/Command-C).
 * 4) Right-click on the row numbers and click "Add rows above: 7".
 * 5) Select the added rows. Paste (Ctrl-P/Command-P).
 * 6) Change the language code in the first pasted row.
 * 7) Go to https://tools.wmflabs.org/siteviews/
 * 8) Select a range of initial dates that you want to backfill.
 * 9) Type the project name. The need chart will be shown.
 * 10) Click the CSV button and download the file. Open the CSV file in your desktop spreadsheet software.
 * 11) In your desktop spreadsheet software, select the numbers for the relevant dates and Copy (Ctrl-C/Command-C).
 * 12) Go back to the Google spreadsheet. Paste (Ctrl-P/Command-P) in some empty space and again Copy (Ctrl-C/Command-C).
 * 13) Right-click on the first cell in the "views" row for the new language. Paste special -> Transpose.
 * 14) In the % row, change the first cell to be the division of the value of the clicks for that language for the same column by the numbers of views (the cell above). Add a $ sign before the number on the first cell in the division (e.g. for Latvian Wikipedia (lv), it must be B$157). Drag this cell horizontally.
 * 15) In the "weekly clicks" row, change the first full row to be the sum of clicks for that language, and make sure you have $ signs between the numbers. Copy and paste this cell to other "weekly clicks" cells.
 * 16) Update the URLs for pageviews stats in the section on pageviews above.

The clicks query
These queries run from the all_projects.sh script. They are here only for reference.