Content translation/analytics/Daily stats

This is knowledge sharing about how to collect daily Content Translation statistics.

Unless otherwise noted, "" is eight digits: yyyymmdd. For example 20160425 is April 25 2016.

Daily uggestions accepted

 * 1) Run:
 * 2) ssh terbium
 * 3) cat events_.txt
 * 4) In the query results table, copy just the numbers from the "count(event_targetLanguage)" column. (In OSX terminal this is easy by selecting with the mouse while holding the Alt key.)
 * 5) Paste them to a text editor.
 * 6) Select them in the text editor and copy. (The intermediate step is needed because direct copying from the terminal to a spreadsheet is broken.)
 * 7) Open the "Suggestions Accepted Daily" tab in the "Suggestions Enablement" spreadsheet.
 * 8) Find today's date (NB: one day after the ).
 * 9) Click row 3 and paste.
 * 10) Scroll down and check whether the list is not too long. The last number must align with the last language. If not:
 * 11) Delete the pasted numbers (the Undo action usually accomplishes that).
 * 12) Find the missing language by examining the query result.)
 * 13) Add a row for that language.
 * 14) Go back to step "Click row 3 and paste".
 * 15) The number in the "Per day" row is the number of accepted suggestions per day.

Save, restore, publish errors (s/r/p)

 * 1) Make the terminal window wide. The numbers row can be long and you don't want it to clip.
 * 2) ssh terbium
 * 3) cd cxscriptsg
 * 4) Just for yesterday:
 * 5) ./srp.py
 * 6) NB 1: It is usually fast in the beginning, and slowish in the end. The total time is up to two minutes.
 * 7) NB 2: The reason "a week ago" is shown for "What was published" is that this number can sometimes change (E.g., it took a few days until the translator actually published.)
 * 8) For a particular day:
 * 9) ./sorted_save_events.py 
 * 10) ./sorted_restore_events.py 
 * 11) ./sorted_publish_events.py 
 * 12) ./what_was_published.py 
 * 13) NB: The last step is can take up to two minutes.
 * 14) Carefully copy the row of numbers, and paste it to a text editor.
 * 15) Select them in the text editor and copy. (The intermediate step is needed because direct copying from the terminal to a spreadsheet is broken.)
 * 16) Open the s/r/p spreadsheet and paste the numbers from the text editor in the appropriate column at the appropriate date.