Analytics/AQS/Editors by country

From Wikitech
< Analytics‎ | AQS
(Redirected from Analytics/AQS/Geoeditors)
Jump to navigation Jump to search

This page documents how to access data about editors by country on Wikimedia projects through the Analytics Query Service API.

Quick Start

Technical Documentation: (includes interactive examples).

Get the breakdown of editors by country for during July 2020, limited to editors making between 5 and 99 edits, inclusive:


Get the breakdown of editors by country for during January 2020, limited to editors making 100 or more edits:


Dataset definition

This dataset contains editor counts broken down by country for any Wikipedia, editor activity level and month.

Input format

To request the editor by country counts you need to execute an HTTP GET request to the following URL and specify the following fields:{project}/{activity-level}/{year}/{month}
  • project: The name of the wiki you want to get counts for (i.e. it.wikipedia).
  • activity-level: The activity level of the editors you want to get counts for (either 5..99-edits or 100..-edits).
  • year: Year you want to get counts for in YYYY format (i.e. 2020).
  • month: Month you want to get counts for in MM format (i.e. 09).

Output format

The output is a JSON string with the following format. Standard country codes are used to indicate the country breakdown. The editor counts field editors-ceil contains bucketed values; a value of 10 means between 1 and 10, a value of 20 means between 11 and 20, and so forth. Read more information about this under Privacy and limitations section. The list of countries is sorted by 1) the editors-ceil value (descending) and 2) the country code (alphabetically).

    "items": [
            "project": "en.wikipedia",
            "activity-level": "5..99-edits",
            "year": "2020",
            "month": "01",
            "countries": [
                { "country": "AF", "editors-ceil": 10 },
                { "country": "AL", "editors-ceil": 70 },

Privacy and limitations

This data set has been prepared in a way that it does not constitute a threat to the privacy of Wikipedia editors. As a result it has some limitations, i.e. it doesn't show data for some countries. Find detailed documentation under Analytics/Data_Lake/Edits/Geoeditors/Public#Privacy.

More reading

Non-additive metric

As editors is a non-additive metric, it can not be aggregated across wikis, time, or activity level. Therefore, when asking the API, one always needs to specify a wiki (i.e. en.wikipedia), a month (i.e. 2020/01) and an activity level (i.e. 5..99-edits). There are no counts available for all Wikipedias, or all activity levels, or any other aggregation.

Underlying data

The underlying data has existed for some time, but is private in nature. Find detailed docs here Analytics/Data_Lake/Edits/Geoeditors.

Alternative Formats

This data set is also available as dump files. Find full documentation here Analytics/Data_Lake/Edits/Geoeditors/Public.

Related links

  • Analytics/AQS Main documentation for the Analytics Query Service API.
  • {waxer} R interface to AQS (includes many of the Wikistats 2 metrics endpoints).