Wikidata:WikiProject Heads of state and government/Contrast Report:Head of Government/problems
Jump to navigation
Jump to search
Try it!
Head of Government Problem report: This list shows inconsistencies in how the Head of Government has been entered for a country. It is a version of the Head of Government Contrast Report with only obviously inconsistent data shown.
To use this report:
- Check that a value exists in each column, and is the same across all three. If not, you will need to correct the data in the relevant place:
- If the value for On Country is wrong, edit this on the country item (you can navigate there by clicking the link in the “Country” column).
- If the value for On Office is wrong, edit this on the item for the office (you can navigate there by clicking the link in the "Office" column).
- If the value for On Person is wrong, update the “position held” statements on the item for that person directly. Note: if the person was previously the head of government but is not any more, ensure they have their dates of service: both a start and an end time qualifier
This list is periodically updated by a bot. Manual changes to the list will be removed on the next update!
WDQS | PetScan | TABernacle | Find images | Recent changes | Query:SELECT DISTINCT ?item ?head ?office ?officeholder ?person WHERE { ?item wdt:P31 wd:Q3624078 ; wdt:P1313 ?office . FILTER NOT EXISTS { ?office wdt:P576 ?end_date } . FILTER (?item != wd:Q238) OPTIONAL { ?person p:P39 ?posn ; wdt:P31 wd:Q5 . ?posn ps:P39 ?office ; pq:P580 ?start_date . FILTER (?start_date < NOW()) . OPTIONAL { ?posn pq:P582 ?end_date } FILTER ( !bound(?end_date)
End of automatically generated list.
---
The underlying query behind this report is:
SELECT DISTINCT ?country ?countryLabel ?head ?headLabel ?office ?officeLabel ?officeholder ?officeholderLabel ?person ?personLabel
WHERE {
?country wdt:P31 wd:Q3624078 ; # find all countries
wdt:P1313 ?office . # and the office held by head of government
FILTER NOT EXISTS { ?office wdt:P576 ?end_date } . # (non-dissolved)
FILTER (?country != wd:Q238) # ignoring San-Marino's co-heads
OPTIONAL {
?person p:P39 ?posn ; wdt:P31 wd:Q5 . # find all humans with a position
?posn ps:P39 ?office ; # of that office
pq:P580 ?start_date . # where the position statement has a start date
FILTER (?start_date < NOW()) . # but not in the future
OPTIONAL { ?posn pq:P582 ?end_date }
FILTER ( !bound(?end_date) || isBLANK(?end_date) ) . # but with no end date
}
OPTIONAL { ?country wdt:P6 ?head } # and compare with the Head of Government on the country
OPTIONAL { ?office wdt:P1308 ?officeholder } # and the holder of the HoG office
OPTIONAL { ?country wdt:P1082 ?population }
FILTER ((?officeholder != ?head) || (?head != ?person) )
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }
}
ORDER BY DESC(?population)