query wikidata for Gene Wiki Portal stats
On the Gene Wiki Portal, we have a table that lists the "Top Gene Wiki articles", but these haven't been updated since 2011. Would be great if we could replace this static table by a wikidata/lua query...
perhaps an intro intern project...
Comments (3)
-
-
I just realized that stats.grok.se is basically out of service as of mid January 2016. As a way more powerful alternative, https://wikitech.wikimedia.org/wiki/Analytics/PageviewAPI was introduced, making the stats available via a nice REST API, even allowing to define the user agent the page impression came from. This will allow much more detailed stats on the Gene Wiki project.
-
- changed status to resolved
It looks like the Scribunto Lua module in Wikipedia currently does not allow to query anything outside Wikidata, which suggests that this cannot be implemented with Lua right now.
As an alternative, I created gene_wiki_statistics.py (https://bitbucket.org/sulab/wikidatabots/src/34b666b0f03180363f28d52b4d34d4a491132858/reporting/gene_wiki_statistics.py?at=master&fileviewer=file-view-default) It gets all Gene Wiki pages and sums up their daily user statistics over one month. Finally, it sorts the resulting list for top accessed and largest pages and updates the table on the Gene Wiki Portal page. This script can be run each month in order to update this table.
- Log in to comment
The challenge here is to get the counts for the page visits. As far as I know, these are only available via stat.grok.se/ For our paper, I made the following script to get an updated count of monthly page visits, it should be possible to expand this script so it writes to the Gene Wiki portal page to update the tables.