Wikidata:Requests for permissions/Bot/PajnBot
- 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:28, 30 October 2016 (UTC)[reply]
PajnBot (talk • contribs • new items • new lexemes • SUL • Block log • User rights log • User rights • xtools)
Operator: Pajn (talk • contribs • logs)
Task/s: Update population and area data of Swedish places based on official statistics from SCB.
Code: https://github.com/Pajn/wikidata-bot
Function details:
Existing items is linked using Swedish urban area code (P775) or Swedish minor urban area code (P776), no new items will be created. Here is an example edit from may main account https://www.wikidata.org/w/index.php?title=Q26515&diff=prev&oldid=394350516 of course made fully supervised and for a single item.
First I want to focus on adding this data to items that misses it, but when that is done I plan to also go through the other items as well to A, check the data and B, make sure that it has references (if the data is correct but reference Wikipedia I will replace the reference).
I may later check the located in the administrative territorial entity (P131) as it is available in the same dataset but for simplicity and due to greater need, the population and area properties are in focus.
--Pajn (talk) 17:45, 24 October 2016 (UTC)[reply]
- Please make some test edits.--Ymblanter (talk) 17:19, 27 October 2016 (UTC)[reply]
- Done, did 50 edits Pajn (talk) 20:25, 28 October 2016 (UTC)[reply]
- Thanks, looks good to me, I will approve tomorrow afternoon provided there have been no objections raised.--Ymblanter (talk) 08:43, 29 October 2016 (UTC)[reply]
- No objections, but some questions! How do you handle cases when there are already P1082-values with a "preffered" rank? A bot added some time ago data from 1960-1970 in a subset of these items, and some of them often have a preffered rank for one of those values. (I have also manually added many historical data for this set of items, and some of them also have a "preffered value".) Setting a new "normal rank" will not automagicly make the 2010 or 2015-values visible in Wikipedia.
- And a second question: Could you provide us with a list of SCB-codes that does not have an item yet?
- Third: Could you provide information about values that isn't supported by SCB-sources? I know that SCB-sources sometimes contradicts themselves, and that is not a (big) problem. But ordinary users mixing up the concept of "tätort" and "kommun" is a really large problem here. The adding of "official websites" and "sister citys" to "tätorter" is easily tracked and removed but wrong 1082-values could be really tricky! . -- Innocent bystander (talk) 08:13, 30 October 2016 (UTC)[reply]
- And Pajn, a second note. Not everything is yet clear about the new 2015-report. We have a lot of questions and doubts about "T0384, Sollentuna och Upplands Väsby" on svwiki. We are discussing on svwiki how it best should be handled. My opinion is that we have to follow the continuity of the "tätortskod (P775)". But that it would have been better if SCB had used "T0316 Sollentuna" as a code for this area, a code which came out of use in 1995. We maybe have to create a new article for "Sollentuna and Upplands Väsby" and let it inherit the item about "Upplands Väsby" and create a new P775-free item for Upplands Väsby.
- And the "names" on the 2015-reports are still not confirmed by Lantmäteriet, so take it easy with official name (P1448) in the 2015-report.
- And as a fourth note, I intend to add the "page number" to your 2010-source, I hope that doesn't bother you! I fully understand that it isn't added in a bot-run like yours now. -- Innocent bystander (talk) 09:51, 30 October 2016 (UTC)[reply]
- 1. Currently I'm only adding missing statements, but hadn't planned to alter the rank even when I get to checking existing statements. However it might be a good idea to do that. Maybe I should change the rank to normal if I add a newer statement and add my statements with rank preffered if they are the newest ones.
- 2. Sure, I have not code for that right now but it should be easy enough.
- 3. Yes, when I go through items with existing statements I will log everything that contradicts the data I have. If these are too many to go though by myself I will publish them somehow so others can take a look as well.
- Thank you for noticing me about the 2015 report. I added the discussion page to my watchlist and will try to chip in when I have had time to catch up. I will stay away from it until then.
- No problem with the page number! Is there any way I can help out other than adding it myself? as you say, that would be a bit tricky as I feed from the data directly and not the report provided for humans :)
- Pajn (talk) 17:45, 30 October 2016 (UTC)[reply]
- If you just "normalise" the "preffered" rank of existing claims, another bot will re-add the preffered rank to the newest number. The only time that does not work is when there are more than one number for one locality for a single year, like those localities who are divided between several municipalities (Kvicksund (Q33799) for example). But they are so few, that we can keep a record of them. My main project now is to go through all "småort as of 2010"-items and add P776 to them. Hopefully I have finished doing that in december when SCB releases the "småort 2015"-census. Unfortunately it cannot be done by simple tools, since both nlwiki and svwiki sometimes have more than one "småort" in one single article. To safeguard the integrity of the database here at Wikidata, we have separated them in separate items. If you find more than one P775 or P776 in one single item, it should be because that SCB has missed to see that a 1990-småort has been revived in a later reports (like Veda och Mörtsal (Q7917894)) or SCB does not want to reuse P775's with an X (Tuolluvaara (Q1827848)).
- You do not have to worry about me, I add the missing data I find in the pdf's I find and go through them manually. I also add pre-1960-numbers, which cannot be added by a bot.
- As a sidenote, I Support this bot anyhow! -- Innocent bystander (talk) 19:16, 30 October 2016 (UTC)[reply]
- Thanks, looks good to me, I will approve tomorrow afternoon provided there have been no objections raised.--Ymblanter (talk) 08:43, 29 October 2016 (UTC)[reply]
- Done, did 50 edits Pajn (talk) 20:25, 28 October 2016 (UTC)[reply]