query-dda8726be2ee80fb1b01beaf28e04376
Map of narrative locations of TV series and episodes, view it with the following query: (P840)narrative location Depending on what's defined with
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#>
# Narrative locations of TV series and episodes
# define more on with P840 on items for series or episodes
# query by Jura1, 2018-04-25
#defaultView:Map
SELECT DISTINCT ?seriestitle ?narrativelocation ?narrativelocationLabel ?coor ?layer ?layerLabel ?episode ?episodeLabel
WHERE
{
{ ?layer wdt:P31 wd:Q5398426 ; wdt:P840 ?narrativelocation }
UNION { ?episode wdt:P31 wd:Q21191270 ; wdt:P179 ?layer ; wdt:P840 ?narrativelocation }
UNION { ?episode wdt:P31 wd:Q506240 ; wdt:P179 ?layer ; wdt:P840 ?narrativelocation . ?layer wdt:P31 wd:Q5398426 }
?narrativelocation wdt:P625 ?coor .
FILTER NOT EXISTS { ?layer wdt:P136 wd:Q182415 }
FILTER NOT EXISTS { ?layer wdt:P136 wd:Q93204 }
OPTIONAL { ?layer wdt:P1476 ?seriestitle }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?coor"):::projected
v3("?episode"):::projected
v1("?layer"):::projected
v2("?narrativelocation"):::projected
v5("?seriestitle"):::projected
c3(["wd:Q182415"]):::iri
c7(["wd:Q21191270"]):::iri
c13(["bd:serviceParam"]):::iri
c5(["wd:Q5398426"]):::iri
c2(["wd:Q93204"]):::iri
c15(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c9(["wd:Q506240"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P136"--> e0c2
e0v1("?layer"):::projected
e0c2(["wd:Q93204"]):::iri
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> c2
v1 --"wdt:P136"--> c2
f1[["not "]]
subgraph f1e1["Exists Clause"]
e1v1 --"wdt:P136"--> e1c2
e1v1("?layer"):::projected
e1c2(["wd:Q182415"]):::iri
end
f1--EXISTS--> f1e1
f1 --> v1
f1 --> c1
f1 --> c3
v1 --"wdt:P136"--> c3
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P31"--> c9
v3 --"wdt:P179"--> v1
v3 --"wdt:P840"--> v2
v1 --"wdt:P31"--> c5
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P31"--> c7
v3 --"wdt:P179"--> v1
v3 --"wdt:P840"--> v2
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> c5
v1 --"wdt:P840"--> v2
end
union0r <== or ==> union0l
end
v2 --"wdt:P625"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P1476".-> v5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c13 --"wikibase:language"--> c15
end