Ainali / ideas

A dumping ground for halfbaked ideas, some of which will hopefully be worked on soon
Creative Commons Zero v1.0 Universal
2 stars 0 forks source link

Global top.hatnote #45

Open Ainali opened 2 years ago

Ainali commented 2 years ago

A toplist of the most viewed pages on all Wikipedia versions. Idea:

  1. Get all Wikipedias through: https://wmf-sitematrix.toolforge.org/wikipedia.json
  2. Get all the pageviews for all wikipedias for one day, example: https://wikimedia.org/api/rest_v1/metrics/pageviews/top/sv.wikipedia.org/all-access/2021/09/02
  3. Filter out those that are not in the main namespace
  4. Get all the Wikipedia sitelinks for all those pages, example: https://sv.wikipedia.org/w/api.php?action=query&format=json&prop=langlinks&list=&titles=Benny_Andersson&lllimit=400
    1. (Perhaps optimize by not asking for sitelinks that already was retrieved)
  5. Get the pageviews for all those sitelinks, example: https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/en.wikipedia.org/all-access/all-agents/Benny_Andersson/daily/20210902/20210902
    1. (Perhaps optimize by not getting those that were not on toplists earlier, but then those must have been saved already)
  6. Summarize and visualize.