Wikipedia:Bots/Requests for approval/DomdomeggBot
New to bots on Wikipedia? Read these primers!
- Approval process – How this discussion works
- Overview/Policy – What bots are/What they can (or can't) do
- Dictionary – Explains bot-related jargon
Operator: Domdomegg (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 23:17, Tuesday, August 11, 2020 (UTC)
Function overview: Where possible, automatically update data (starting with the UK) for Template:COVID-19_pandemic_data
Automatic, Supervised, or Manual: Automatic
Programming language(s): Python
Source code available: https://github.com/domdomegg/uk-covid-stats-wikipedia-updater
Links to relevant discussions (where appropriate): No explicit discussion about this bot, but on Village Pump automating this has been met with positive reception and the approved Wugbot 4 does a similar thing for the maps.
Edit period(s): Daily
Estimated number of pages affected: 1
Namespace(s): Template
Exclusion compliant (Yes/No): No, only runs on one page with many safeguards
Function details:
Daily, the bot will call the official UK government COVID data API for cumulative case and death numbers, and update the page. This will happen soon after the data is published at 4pm BST (3pm UTC). This source is https://coronavirus.data.gov.uk/, the one recommended and being used for manual updates now. The API data is licensed under the Open Government License v3.0, so fine to use on Wikipedia with a reference (although it's a fact so not copyrightable under UK law anyway).
It's a fairly simple Python script which has clear monitoring and can easily be shut off. The only Wikipedia API interactions it should have are: Get login token, login, get current page, get edit token, make edit. At several points during the process it will bail if something is unexpected, e.g. data from the government API has unexpected structure, it cannot definitely find the location of the UK statistics on the page, if the numbers on the page are higher (should not be possible with cumulative cases) or significantly lower (should not jump >10%/day) etc.
A bit about me - I've been an editor on-and-off since 2013, and have 3050 live edits on Wikimedia Commons. I've contributed to various open-source Wikimedia projects such as the Wikimedia Commons Android App, and the source code of this bot is open too (will sort out a license soon). I won't add any extra functionality without submitting another BRFA (unless the procedure is to do something different - let me know :)).
Thanks for considering this bot! Apologies if I have made any mistakes in submitting this bot proposal - it's my first bot on Wikipedia :)