Wikidata:Requests for permissions/Bot/Lisp.hippie.bot
The following discussion is closed. Please do not modify it. Subsequent comments should be made in a new section. A summary of the conclusions reached follows.
- Approved--Ymblanter (talk) 19:48, 25 July 2016 (UTC)[reply]
lisp.hippie.bot edit
lisp.hippie.bot (talk • contribs • new items • new lexemes • SUL • Block log • User rights log • User rights • xtools)
Operator: Lisp.hippie (talk • contribs • logs)
Task/s: Supplement P2046 (area) data for US municipalities with data from DBpedia.
Code: https://github.com/ericdscott/pywikibot-tsv-claims
Function details:
The code cited above defines a pywikibot class to read data from a spreadsheet, inspired by Quickstatements.
Unfortunately, Quickstatements does not seem to provide support for units-of-measure. To remedy this, I adapted the code in claimit.py to a new bot module class tsv_claims.py to read values from a spreadsheet, with what I hope is an accessible format to specify units-of-measure as well a source claims.
Test input included the following:
Q1000136 P2046 +12354243:Q25343@P143:Q465 Q1000148 P2046 +16060000:Q25343@P143:Q465 Q1000163 P2046 +1502193:Q25343@P143:Q465 Q1000166 P2046 +36311633:Q25343@P143:Q465 Q1000172 P2046 +1320893:Q25343@P143:Q465 Q1000175 P2046 +802896:Q25343@P143:Q465 Q1000178 P2046 +1761191:Q25343@P143:Q465 Q1000182 P2046 +14063635:Q25343@P143:Q465 Q1000186 P2046 +2020190:Q25343@P143:Q465 Q1000191 P2046 +19891108:Q25343@P143:Q465
In this format: (item) has-area (value):square-meters@imported-from:dbpedia
These are all the changes listed on [lisp.hippie.bot's contribution page] for July 15.
The full run would include a table of 14,261 area assertions derived from the intersection of WD municipalities lacking area assertions with area assertions for the corresponding entity in DBpedia.
The entire 14K-line tsv file may be found [here].
This is my first foray into writing a bot, so apologies for newbie mistakes in protocol. --Lisp.hippie.bot (talk) 01:44, 19 July 2016 (UTC)[reply]
- I am going to approve the bot provided there have been no objections raised.--Ymblanter (talk) 11:22, 23 July 2016 (UTC)[reply]