query-bce6622cf29f5a817ca3a7a14df71353
Gender bias in the PM20 persons archivesGender assignment from Wikidata (empty gender labels mean: unknown)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
select (count(?item) as ?count) ?gender ?genderLabel
where {
# persons
?item wdt:P31 wd:Q5 ;
# with PM20 id
wdt:P4293 ?pm20Id .
# restrict to items with online accessible articles
?item p:P4293/pq:P5592 ?workCount .
filter(?workCount > 0)
# get gender (if available)
optional { ?item wdt:P21 ?gender . }
# add labels
service wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en, de". }
}
group by ?gender ?genderLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?count")
v4("?gender"):::projected
v2("?item"):::projected
v3("?pm20Id")
v1("?workCount")
a1((" "))
c9(["bd:serviceParam"]):::iri
c11(["#91;AUTO_LANGUAGE#93;,en, de"]):::literal
c3(["wd:Q5"]):::iri
f0[["?workCount > '0^^xsd:integer'"]]
f0 --> v1
v2 --"p:direct/P31"--> c3
v2 --"p:direct/P4293"--> v3
v2 --"p:P4293"--> a1
a1 --"p:qualifier/P5592"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P21".-> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end
bind2[/"count(?item)"/]
v2 --o bind2
bind2 --as--o v5