Analytics/Wikistats/Database API

New API calls for data analysis metrics
Three API calls can provide all data needed for Report Card as it is now action=analytics &metric=[comscore_unique_visitors|comscore_reach_percentage] &month_range=yyyy-mm;yyyy-mm &filter=[ region_code=[aa,bb,..|*] | country_code=[aa,bb,..|*|top:10] | web_properties=top:10 ] &data=[time_series,percentage_growth_last_month,percentage_growth_last_year,percentage_growth_series] [&lang=en] &returntype=[csv,json,text,...] &modality=[absolute|indexed]
 * API calls (prototyping phase)

action=analytics &metric=squid_pageviews &month_range=yyyy-mm;yyyy-mm &filter=[ region_code=[aa,bb,..|*] | country_code=[aa,bb,..|*|top:10] ] | project_codes=[wb,wn,wk,,...|*] (| wiki_codes=wp:en,wp:de,..|top:10)] &data=[time_series,percentage_growth_last_month,percentage_growth_last_year,percentage_growth_series] &mobile=[Y|N|*] &normalized=[Y|N] [&lang=en] &returntype=[csv,json,text,...] &modality=[absolute|indexed]

action=analytics &metric=[dump_articles|dump_binaries|dump_edits|dump_new_registered_editors|dump_active_editors_[5,100]] &month_range=yyyy-mm;yyyy-mm &filter=[project_codes=[wb,wn,wk,,...|*] | wiki_codes=wp:en,wp:de,..|top:10] &data=[time_series(,percentage_growth_last_month,percentage_growth_last_year,percentage_growth_series(?))] &normalized=[Y|N] [&lang=en] &returntype=[csv,json,text,...] &modality=[absolute|indexed]


 * Notes
 * unique_visitors rather than visitors as comscore has variations that we might add later
 * concise syntax for month range as we'll use that a lot
 * * = all
 * lang=en default
 * is modality the right word? scale?
 * returned result will contain ordered (?) array of arrays containing region_code,region name,ordered set of yyyymm,value pairs (as it does now)
 * modality=absolute also used for log scale (call it modality rather than scale?, scale is rather linear/logarithmic)
 * only time_series??
 * metrics=squid_pageviews: also 'language_codes=en,de,..' meaning data for all projects (wiktionary, etc) for that language ? (will we actually use this?)