Created
July 6, 2020 13:19
-
-
Save tmtmtmtm/1e1a0ff621b9aa03da943c4a90d73fa3 to your computer and use it in GitHub Desktop.
Fix 'position held' qualifiers for merged constituencies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Update 'position held' statements for Members of the Parliament of Ghana | |
# to point at the correct constituency items, after merging | |
# | |
# wd sparql migrate-merged-constituencies.rq | jq -r '.[] | "\(.ps) P768 \(.old) \(.new)"' | wd update-qualifier --batch --summary "Update constituencies qualifiers after merges" | |
SELECT DISTINCT ?ps ?id ?old ?new WHERE { | |
?id p:P39 ?ps . | |
?ps ps:P39 wd:Q61659845 ; pq:P768 ?old . | |
?old owl:sameAs ?new . | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I ran a first batch of these as https://editgroups.toolforge.org/b/wikibase-cli/0dcca21f3dfdf/ — there will be more later, after I've merged more items.