query-7594dd91073e837499f369cb1f16271d
Moderators of the General AssemblyData in enwiki probably needs to be scraped and used to enhance: not yet done
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 bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
SELECT DISTINCT (?Era as ?layer) ?loc ?modLabel ?mod ?bornwhereLabel ?livewhereLabel ?diedwhen WHERE {
?mod wdt:P39 wd:Q6888514.
optional {?mod wdt:P19 ?bornwhere.}
optional {?mod wdt:P551 ?livewhere. ?livewhere wdt:P625 ?lloc.}
optional {?mod wdt:P69 ?edwhere. ?edwhere wdt:P625 ?eloc.}
?mod wdt:P570 ?diedwhen.
BIND(year(?diedwhen) AS ?dyr).
optional {?mod wdt:P20 ?diedwhere. ?diedwhere wdt:P625 ?dloc.}.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
BIND (COALESCE(?lloc, COALESCE(?dloc, ?eloc)) AS ?loc).
BIND( IF (?dyr < 1700, "1 pre-1700", IF (?dyr < 1800, "2 18th century", IF (?dyr < 1900, "3 19th century", IF (?dyr < 2000, "4 20th century",
"5 Recent")))) AS ?Era).
} LIMIT 900
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v12("?Era"):::projected
v2("?bornwhere")
v7("?diedwhen"):::projected
v9("?diedwhere")
v10("?dloc")
v8("?dyr")
v5("?edwhere")
v6("?eloc")
v13("?layer")
v3("?livewhere")
v4("?lloc")
v11("?loc"):::projected
v1("?mod"):::projected
c10(["bd:serviceParam"]):::iri
c12(["#91;AUTO_LANGUAGE#93;"]):::literal
c2(["wd:Q6888514"]):::iri
v1 --"wdt:P39"--> c2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P19".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P551".-> v3
v3 --"wdt:P625"--> v4
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P69".-> v5
v5 --"wdt:P625"--> v6
end
v1 --"wdt:P570"--> v7
bind0[/"year-from-dateTime(?diedwhen)"/]
v7 --o bind0
bind0 --as--o v8
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P20".-> v9
v9 --"wdt:P625"--> v10
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end
bind1[/"?lloc?dloc?eloc"/]
v4 --o bind1
v10 --o bind1
v6 --o bind1
bind1 --as--o v11
bind2[/"if(?dyr < '1700^^xsd:integer','1 pre-1700',if(?dyr < '1800^^xsd:integer','2 18th century',if(?dyr < '1900^^xsd:integer','3 19th century',if(?dyr < '2000^^xsd:integer','4 20th century','5 Recent'))))"/]
v8 --o bind2
bind2 --as--o v12
bind3[/"?Era"/]
v12 --o bind3
bind3 --as--o v13