579
edits
Line 920: | Line 920: | ||
?person bnwdt:P16 ?signatory . #select women who were nominated for election to FSA | ?person bnwdt:P16 ?signatory . #select women who were nominated for election to FSA | ||
FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team | FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team | ||
?person bnwdt:P29 ?residence . # select residences | |||
?residence bnwdt:P33 ?district . #select districts | |||
?district bnwdt:P33 ?county . #select counties | |||
optional { ?county bnwdt:P153 ?geo2 . } # for geocoords added to BN | |||
optional { | |||
?county bnp:P117 ?ws . # wikidata id P117 | |||
?ws bnpq:P14 ?wikidata_url . | |||
BIND(IRI(REPLACE(?wikidata_url, "https://www.wikidata.org/wiki/", "http://www.wikidata.org/entity/")) as ?wikidata ) | |||
SERVICE <https://query.wikidata.org/sparql> { | |||
optional { ?wikidata wdt:P625 ?geo1 . } # geocoords if available | |||
} # /wikidata service | |||
} #/wikidata optional | |||
BIND(COALESCE(?geo1, ?geo2) AS ?geo). # if geo1 available use that, then try geo2 | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | |||
} | |||
</sparql> | |||
==== Counties of residence for women nominated to RAI, on a map ==== | |||
<sparql tryit="1"> | |||
# Counties of residence for women nominated to RAI | |||
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/> | |||
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/> | |||
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/> | |||
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/> | |||
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/> | |||
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/> | |||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | |||
#defaultView:Map{"hide":["?geo", "?wikidata"]} | |||
SELECT distinct ?person ?personLabel ?county ?countyLabel ?wikidata ?geo | |||
WHERE { | |||
?person bnwdt:P3 bnwd:Q3 . # select women | |||
FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team | |||
?person bnwdt:P7 ?signatory . #select women who were nominated for election to RAI | |||
?person bnwdt:P29 ?residence . # select residences | ?person bnwdt:P29 ?residence . # select residences |
edits