Wikidata:Requests for permissions/Bot/DutchElectionsBot
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.
- Not done Withdrawn
DutchElectionsBot edit
DutchElectionsBot (talk • contribs • new items • new lexemes • SUL • Block log • User rights log • User rights • xtools)
Operator: Dajasj (talk • contribs • logs)
Task/s: Import and update information about candidacies in Dutch Elections based on a manually curated excel file.
Code: Function details: I'm collecting election results of Dutch Elections for each candidate, so I can add this to WikiData. For this I have created an excel file with all the relevant information, and have matched the items myself manually (so political party ID, person ID, election ID). With this code I want to update WikiData after I have updated my own file. It will check whether a candidacy statement exists with as target a specific election and checks if any information is missing. If so, it will add that including references. If not, it will just skip it and should not override anything. --Dajasj (talk) 15:14, 28 December 2020 (UTC)[reply]
- how many edits and can you show a sample edit? BrokenSegue (talk) 22:37, 28 December 2020 (UTC)[reply]
- Here is the list of contributions I did for testing and showcasing: Special:Contributions/DutchElectionsBot. I'm still working on the data because it takes a lot of time. But I think it would be at least in the thousands. Dajasj (talk) 22:43, 28 December 2020 (UTC)[reply]
- cool seems good. Support. I am confused what the series ordinal (P1545) is supposed to mean but that wasn't added by your edit BrokenSegue (talk) 22:50, 28 December 2020 (UTC)[reply]
- Comment Excuse me if it is obvious (I do not speak Dutch), but I cannot find the number of votes nor the candidate's name in the URL referenced in this diff: https://www.wikidata.org/w/index.php?title=Q28861081&type=revision&diff=1330211216&oldid=1320368353 . --Haansn08 (talk) 00:25, 29 December 2020 (UTC)[reply]
- @BrokenSegue It refers to the position on the party list per Wikidata:WikiProject_elections documentation.
- @Haansn08 You're correct, but it is linked on the bottom Uitslag Tweede Kamerverkiezing 2017 in ODS-bestand, but I thought it would make sense to refer to this summary post, so if people want to look it up they can select their own preferred format. Or would it be preferable to link directly to the file? Dajasj (talk) 07:41, 29 December 2020 (UTC)[reply]
- Looks like a nice project!
- Did you build this on top of what User:Andrawaag did before?
- I see that using represents (P1268) as a qualifier is giving constraint violations. Are we sure this is the right qualifier? Either a different qualifier needs to be used or the constraints updated.
- I hope you're aware that multiple people can have the same number on the list because of the district system (look at bottom PVDA for some examples). I hope that doesn't mess anything up.
- Are you creating missing candidates or are you just going to skip those?
- Which elections are you planning to do besides 2017? I see a lot of them on https://www.verkiezingsuitslagen.nl/
- I would expand the reference a bit with publisher (P123) -> Kiesraad (Q2156049), publication date (P577) -> 21-03-2017, language of work or name (P407) -> Dutch (Q7411), title (P1476) -> "Officiële uitslag Tweede Kamerverkiezing 15 maart 2017"@nl . (Help:Sources).
- Multichill (talk) 12:11, 29 December 2020 (UTC)[reply]
- Thanks for all the feedback! I only saw that User:Andrawaag added all candidates for 2017, but did not see it was a bot?
- It was indeed not a bot, but I did allign the work back then with an ongoing project of the Finnish election(s). Initially, I had a different EntitySchema, but then was made aware of the project in Finland and adapted the work to their schema to allow for some interesting comparisons. Afterwards I did not find the time to finalize the work with the final outcome, which is an intrinsic part of the Finnish schema. So great idea to bottify the efforts. I would recommend talking to @Susannaanas: (et.al) about their schema to see if any collaboration would be possible. In 2017 they had an extensive model, and there might be more synnergies. Are you aware of the related sparql queries? --Andrawaag (talk) 18:06, 30 December 2020 (UTC)[reply]
- Thanks for the work you did, it was really helpful to get me started! I rely on their model, so as far as I know that should be the same. Created this as an example today Q104585675. However, I am a bit new on WikiData, and with its API, so in the short term I will refrain from automatically creating items, so I won't add missing persons like you (and the Finnish) did yet. And yeah, I saw the queries, they were part of my inspiration (besides that I would like to use this over at the Dutch Wikipedia). I hope in the future more complex queries across elections will be possible. Dajasj (talk) 18:41, 30 December 2020 (UTC)[reply]
- Regarding represents (P1268), I know it is giving contraint violations and there was some discussion around it over on the Elections Project, without any result. But I saw it being used that way in many other projects such as Wikidata:WikiProject Finnish Elections. I see no other option, so a new one or updated constraints would be necessary then..
- I know multiple candidates can have the same position. As far as I see this should not be a problem. Although User:Andrawaag only did one per position. I will look into this..
- I won't add (missing) candidates automatically for now. Maybe in the future, but I would file a new request
- So far I am looking at European Parliament 2019, Eerste Kamer 2019, Tweede Kamer 2012&2017, Municipal elections 2018. But I hope to go further back in the future. Would that be an issue?
- I will expand the references! :) Dajasj (talk) 12:42, 29 December 2020 (UTC)[reply]
- It was indeed not a bot, but I did allign the work back then with an ongoing project of the Finnish election(s). Initially, I had a different EntitySchema, but then was made aware of the project in Finland and adapted the work to their schema to allow for some interesting comparisons. Afterwards I did not find the time to finalize the work with the final outcome, which is an intrinsic part of the Finnish schema. So great idea to bottify the efforts. I would recommend talking to @Susannaanas: (et.al) about their schema to see if any collaboration would be possible. In 2017 they had an extensive model, and there might be more synnergies. Are you aware of the related sparql queries? --Andrawaag (talk) 18:06, 30 December 2020 (UTC)[reply]
- I expanded the references, and ran an additiontal ten tests (and some errors). Let me know if anything else requires improvement! Dajasj (talk) 00:25, 30 December 2020 (UTC)[reply]
- represents (P1268) is used 96,445 times as a qualifier 3,185, but for some reason Arlo Barnes to added the constraint. Probably just an oversight so I updated the constraint.
- You are correct, it was just an oversight. Thanks for adding the additional property scope statement. Arlo Barnes (talk) 20:08, 30 December 2020 (UTC)[reply]
- Usually right after the elections, people will create articles for the people who got elected, but didn't have an article yet. Effeietsanders is quite active in that area.
- Would be great to have more elections. Anyone actually getting elected should be notable enough for an item here. So probably after doing the municipal elections, you also filled some gaps for the other elections.
- Reminds me that we still have these overviews: User:Sjoerddebruin/Dutch politics/Tweede Kamerverkiezingen 2017, 2012 & 2010 and a lot of notes at User:Sjoerddebruin/Dutch politics. @Sjoerddebruin: time to pick this up again for the next elections? Multichill (talk) 10:42, 30 December 2020 (UTC)[reply]
- Anyone actually getting elected should be notable enough for an item here, do you also refer to elected officials on the provincial or municipal level? Dajasj (talk) 10:50, 30 December 2020 (UTC)[reply]
- Thanks for all the feedback! I only saw that User:Andrawaag added all candidates for 2017, but did not see it was a bot?
- Support good project, it's nice to see election data on Wikidata --Haansn08 (talk) 17:45, 29 December 2020 (UTC)[reply]
- Thanks :) Dajasj (talk) 00:25, 30 December 2020 (UTC)[reply]
- Looks like a nice project!
- Here is the list of contributions I did for testing and showcasing: Special:Contributions/DutchElectionsBot. I'm still working on the data because it takes a lot of time. But I think it would be at least in the thousands. Dajasj (talk) 22:43, 28 December 2020 (UTC)[reply]
- I am going to approve the bot in a couple of days provided no objections have been made.--Ymblanter (talk) 20:49, 30 December 2020 (UTC)[reply]
- I was trying to figure out if the ".0" on "votes received" had some meaning, but, looking at the reference, it seems to be bot generated. Personally, I'd try to create two items for the references and use these with stated in (P248), but I suppose your approach is fine too. BTW, we have candidate number (P4243) which might work better than the "series ordinal" qualifier. --- Jura 21:29, 31 December 2020 (UTC)[reply]
- * I'm not sure why the .0 appears. Should be fixable. I will look into it!
- * Could you expand on what you mean with two items for the references? I'm not sure I understand.
- * candidate number (P4243) seems to refer to a identifier of a candidate, not the position on the party list. So as far as I can tell, that would not be the right usage of that qualifier. Dajasj (talk) 14:56, 1 January 2021 (UTC)[reply]
- About the ref: sample
- candidate number (P4243) I think it's just meant to a list number, like the ones you are using. It has string datatype and #1-#10 are very frequent as value. --- Jura 00:08, 3 January 2021 (UTC)[reply]
- Thanks for the example! It looks nice, is that the preferred method?
- Wikidata:WikiProject elections also describes it as a unique number, and series ordinal as position on party list. Dajasj (talk) 08:41, 3 January 2021 (UTC)[reply]
- The number I checked was used consistently across references for the same candidate (in this election). Not sure where the text on the Wikiproject comes from. Maybe it predates the creation of the property. The proposal seems to match your usecase: Wikidata:Property proposal/candidate number. This probably explains why we have some many numbers 1 through 10 as values.
- Help:Sources explains what is preferred. The question is which format matches your ref. What can help determine this might be whether it's a static document or a dynamic webpage. --- Jura 10:34, 3 January 2021 (UTC)[reply]
- But if we look at the example of that property, it has a very high candidate number. 147 per party is incredibly high. But maybe that's how the Finnish organise their election. But furthermore, Q28777227 only contains series ordinal and is an example from the same project. So maybe we can continue this particular discussion on Wikidata_talk:WikiProject_elections, and if consensus is reached, create a bot to make its usage across all elections consistent. Dajasj (talk) 11:14, 3 January 2021 (UTC)[reply]
- Sometimes new properties are created and not necessarily everything updated at once. Quote from the proposal discussion for P4243: "it is a number of the candidate on the slate for the local election"- --- Jura 11:25, 3 January 2021 (UTC)[reply]
- But then this quote confuses me again -> "A necessary property to disambiguate people who have no birth dates recorded.". And on the project page Wikidata:WikiProject_elections it was emphasised as recently as October 2020[1] that series ordinal is for position on party list. So wouldn't it be preferable to discuss this with them? Dajasj (talk) 11:34, 3 January 2021 (UTC)[reply]
- I would prefer series ordinal too because it's not a number assigned to a candidate. Multichill (talk) 19:05, 12 January 2021 (UTC)[reply]
- I would prefer P4243 because it's a number assigned to a candidate. --- Jura 19:07, 12 January 2021 (UTC)[reply]
- Could you perhaps elaborate on this? What do you mean with that it is positive that it is assigned to a candidate? Dajasj (talk) 22:40, 12 January 2021 (UTC)[reply]
- It's a conclusion I drew when going through the references you provided to figure out if ".0" has some meaning. As you seem to disagree, I suppose you'd have plenty of samples where the "number of the candidate on the slate for the local election" refers to different people, or not? --- Jura 13:42, 13 January 2021 (UTC)[reply]
- Sorry for my late reply. But in Dutch elections, candidates only get a number on the candidate list of their party. Thus for every party there is a candidate with number 1 (and the other numbers, depending on the length of their candidate list). Dajasj (talk) 19:54, 3 February 2021 (UTC)[reply]
- That's ok for P4243. --- Jura 09:07, 8 March 2021 (UTC)[reply]
- Sorry for my late reply. But in Dutch elections, candidates only get a number on the candidate list of their party. Thus for every party there is a candidate with number 1 (and the other numbers, depending on the length of their candidate list). Dajasj (talk) 19:54, 3 February 2021 (UTC)[reply]
- It's a conclusion I drew when going through the references you provided to figure out if ".0" has some meaning. As you seem to disagree, I suppose you'd have plenty of samples where the "number of the candidate on the slate for the local election" refers to different people, or not? --- Jura 13:42, 13 January 2021 (UTC)[reply]
- Could you perhaps elaborate on this? What do you mean with that it is positive that it is assigned to a candidate? Dajasj (talk) 22:40, 12 January 2021 (UTC)[reply]
- But then this quote confuses me again -> "A necessary property to disambiguate people who have no birth dates recorded.". And on the project page Wikidata:WikiProject_elections it was emphasised as recently as October 2020[1] that series ordinal is for position on party list. So wouldn't it be preferable to discuss this with them? Dajasj (talk) 11:34, 3 January 2021 (UTC)[reply]
- Sometimes new properties are created and not necessarily everything updated at once. Quote from the proposal discussion for P4243: "it is a number of the candidate on the slate for the local election"- --- Jura 11:25, 3 January 2021 (UTC)[reply]
- But if we look at the example of that property, it has a very high candidate number. 147 per party is incredibly high. But maybe that's how the Finnish organise their election. But furthermore, Q28777227 only contains series ordinal and is an example from the same project. So maybe we can continue this particular discussion on Wikidata_talk:WikiProject_elections, and if consensus is reached, create a bot to make its usage across all elections consistent. Dajasj (talk) 11:14, 3 January 2021 (UTC)[reply]
No longer needed Dajasj (talk) 16:22, 26 February 2021 (UTC)[reply]
- @Dajasj: Can you clean up your edits through the non-bot account based on the review above? --- Jura 09:07, 8 March 2021 (UTC)[reply]
- Do you mean removing the ".0"? Dajasj (talk) 09:21, 8 March 2021 (UTC)[reply]
- If so, I fixed that. Or do you mean the P4243 thing? (I only just saw your addition) Dajasj (talk) 09:30, 8 March 2021 (UTC)[reply]
- Well, any points raised above should be addressed. --- Jura 08:08, 9 March 2021 (UTC)[reply]
- Okay, I thought maybe you had specific points in mind. I believe I changed everything except series ordinal -> candidate number. Problem is, I have not been the only person who has used this. So that could lead to inconsistencies. Furthermore, do you have any suggestions for tools to swap only the qualifier, and not remove and replace the complete statement? Thanks in advance. Dajasj (talk) 09:41, 9 March 2021 (UTC)[reply]
- I haven't checked all points, but the P4243 needs addressing. You can use wikibase-cli (Q87194660) to swap them or just added a request at Wikidata:Bot requests, if you prefer not to do it yourself or don't have time right now. --- Jura 08:20, 10 March 2021 (UTC)[reply]
- Done Sorry for the delay but all claims that I know of have been fixed. Dajasj (talk) 08:39, 22 March 2021 (UTC)[reply]
- If so, I fixed that. Or do you mean the P4243 thing? (I only just saw your addition) Dajasj (talk) 09:30, 8 March 2021 (UTC)[reply]
- @Dajasj: A new test run would be a good idea now. Lymantria (talk) 11:54, 2 April 2021 (UTC)[reply]
- What do you mean? I now do the same with quickstatements (which I didnt know back then..) Dajasj (talk) 11:59, 2 April 2021 (UTC)[reply]
- That means we should finalize this request as withdrawn? Lymantria (talk) 12:37, 2 April 2021 (UTC)[reply]
- Ah yes! Sorry, didn't know how I was supposed to do that... Dajasj (talk) 21:11, 2 April 2021 (UTC)[reply]
- That means we should finalize this request as withdrawn? Lymantria (talk) 12:37, 2 April 2021 (UTC)[reply]
- What do you mean? I now do the same with quickstatements (which I didnt know back then..) Dajasj (talk) 11:59, 2 April 2021 (UTC)[reply]