Wikidata:Requests for permissions/Bot/WikiProjectFranceBot
- 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.
- No response by operator since May 2017, closing as not done. --DannyS712 (talk) 02:22, 7 May 2020 (UTC)[reply]
WikiProjectFranceBot (talk • contribs • new items • new lexemes • SUL • Block log • User rights log • User rights • xtools)
Operator: Alphos (talk • contribs • logs)
Task/s: Replace all located in the administrative territorial entity (P131) statements pointing from communes of France to cantons of France by territory overlaps (P3179) statements pointing from the same communes to the same cantons, including qualifiers (there are currently only date qualifiers), and adding a P794 qualifier on each new statement to indicate the subclass of canton.
Code: Partially available (for the first step) on GitHub
Function details: As has been the plan of WikiProject France since we proposed properties to better reflect the relationship between communes and cantons of France, we're now getting to actually push all the statements corresponding to these relationships from located in the administrative territorial entity (P131) to territory overlaps (P3179), and add the exact kind of P3179 this represents as qualifiers to said statements, without removing the original statements at first. Roughly 80 000 edits are to be expected.
At a later date, after checking everything went fine on the first pass, we plan on removing the (faulty) P131 statements between communes and cantons entirely, which will also be done by this bot.
Ayack
Ash Crow
Tubezlob
PAC2
Thierry Caro
Pymouss
Alphos
GAllegre
Jean-Frédéric
Manu1400
Marianne Casamance
Nattes à chat
Pierre André
Bouzinac
Jsamwrites
Baidax
LearnKnowGive1
Mathieu Kappler
Daieuxetdailleurs
Archives nationales DJI
Jmax
LearnKnowGive1
Koxinga
Maxime
Framawiki
Legonin
Rémi sim
--Alphos (talk) 20:00, 8 May 2017 (UTC)[reply]
- @Alphos: Could you provide an example please? Thanks. — Ayack (talk) 09:05, 9 May 2017 (UTC)[reply]
- Of course.
- Nielles-lès-Bléquin (Q1000003) located in the administrative territorial entity (P131) canton of Lumbres (Q1726007)
- would be replaced by :
- Nielles-lès-Bléquin (Q1000003) territory overlaps (P3179) canton of Lumbres (Q1726007) (P794 (P794) canton of France (Q18524218))
- and
- Sainte-Croix (Q1002122) located in the administrative territorial entity (P131) canton of Montluel (Q1726339) (end time (P582) 2015-03-21)
- would be replaced by :
- Sainte-Croix (Q1002122) located in the administrative territorial entity (P131) canton of Montluel (Q1726339) (end time (P582) 2015-03-21 ; P794 (P794) canton of France (Q184188))
- Other "examples" (in fact the whole list) can be found here :
- The following query uses these:
- Properties: subclass of (P279) , instance of (P31) , located in the administrative territorial entity (P131)
SELECT DISTINCT ?commune ?canton ?qualProp ?time ?precision ?timezone ?calendar WHERE { ?commune p:P31/ps:P31/wdt:P279* wd:Q484170 . ?commune p:P131 ?cantonStmt . ?cantonStmt ps:P131 ?canton . ?canton wdt:P31 ?cantonType . VALUES ?cantonType { wd:Q18524218 wd:Q184188 } . OPTIONAL { ?cantonStmt ?qualifier ?qualVal . ?qualProp wikibase:qualifierValue ?qualifier . ?qualVal wikibase:timePrecision ?precision ; wikibase:timeValue ?time ; wikibase:timeTimezone ?timezone ; wikibase:timeCalendarModel ?calendar ; } } ORDER BY ASC(?commune) ASC(?canton)
- (which is what the bot works on)
- Alphos (talk) 09:44, 9 May 2017 (UTC)[reply]
- Support The query seems good to me. Can you run a sample batch? -Ash Crow (talk) 18:26, 14 May 2017 (UTC)[reply]
- The query is undeniably good, but I noticed an issue with edge cases on cantons with double status, working on it and running a small batch (LIMIT 20 or maybe a small french departement), probably later this week. Alphos (talk) 00:05, 16 May 2017 (UTC)[reply]
- Support — Ayack (talk) 09:02, 16 May 2017 (UTC)[reply]
- Please, let the bot run a couple of test edits. Besides, please, create the user page of the bot account (e.g.
{{bot|Alphos}}
). Lymantria (talk) 20:40, 25 June 2017 (UTC)[reply]- @Alphos: Any progress to be expected? Lymantria (talk) 13:51, 31 May 2018 (UTC)[reply]