Reputation: 11
I'm trying to generate a list of former counties and county equivalents in the United States, but the query isn't returning what I would otherwise expect.
My test case is Illinois County, Virginia.
My query is intended to grab all instances and subclasses of county or county equivalents, as well as instances or subclasses of historical regions. Unfortunately, while the query returns some items of interest, it does not return Illinois County, Virginia.
SELECT DISTINCT ?county ?countyLabel ?stateLabel ?page_titleEN ?coordinate_location ?inception ?dissolved ?role WHERE {
?county (wdt:P31/(wdt:P279*)) wd:Q47168;
(wdt:P31/(wdt:P279*)) wd:Q1620908.
OPTIONAL { ?county wdt:P131 ?state. }
OPTIONAL {
?article schema:about ?county;
schema:isPartOf <https://en.wikipedia.org/>;
schema:name ?page_titleEN.
}
OPTIONAL { ?county wdt:P625 ?coordinate_location. }
OPTIONAL { ?county wdt:P571 ?inception. }
OPTIONAL { ?inception wdt:p2868 ?role. }
OPTIONAL { ?county wdt:P576 ?dissolved.}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY (?countyLabel)
I was expecting Illinois County, Virginia to be returned, as it is both a subclass of County and County Equivalents in the United States (wd:Q47168), as well as a subclass of Historical Regions (wd:Q1620908).
Upvotes: 1
Views: 47