Wikipedia talk:WikiProject Medicine/Stats/Top medical editors 2017 (all)
Latest comment: 6 years ago by Edgars2007 in topic Generating list
![]() | This project page does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||
|
Generating list
editDescription in more or less human-readable language (will try to improve it later). How I did it.
- Run a SQL query to get all enwiki articles (and their Wikidata item), that are part of Wikiproject Medicine (gladfully we have a category, so no "overload" with querying with template)
- From the results, grab all WD items and do API query (I do them in batches of 500 items) to get all sitelinks
- Make a dictionary/array/list/JSON or whatever it's called in your preferred language in such form:
- {'enwiki':['enwiki article 1','enwiki article 2',...],'frwiki':['frwiki article 1',...],...}
- Wiki by wiki do a SQL for articles (I made it by batches of 100 articles), first selecting page ids from page titles (don't forget about underscoresĀ :) ), and then get user edit history of 2017. And then simply group by the results in form that you prefer.
- Basically that's itĀ :)