query-f6c00c1f70d414599c16e2a00794f45a

rq turtle/ttl

Map of birth place of authors colored by time period of birth 1801-1840 blue, 1841-1870 orang, 1871-1900 green

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
#defaultView:Map
SELECT DISTINCT ?person ?name ?birthplace ?birthyear ?coord ?layer ?image
WHERE {
  VALUES ?collection { wd:Q106936149 wd:Q109123373  }
  { ?novel wdt:P747 ?edition;
           wdt:P50 ?person.
    ?edition  wdt:P1433 ?collection.
  }
  ?person wdt:P19 ?place.
  ?place wdt:P625 ?coord.
  OPTIONAL { ?person wdt:P569 ?dob. }
  OPTIONAL {?person wdt:P18 ?image.}
  BIND(YEAR(?dob) AS ?birthyear)
BIND(IF(?birthyear < 1801 , "-1800", IF(?birthyear < 1831 , "1801-1840",  IF(?birthyear < 1871 , "1841-1870", IF(?birthyear < 1901 , "1871-1900", "Post-1900")))) AS ?layer)
  ?person rdfs:label ?name.
  FILTER((LANG(?name)) = "sr")
  ?place rdfs:label ?birthplace.
  FILTER((LANG(?birthplace)) = "sr")
}
ORDER BY (?birthyear)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?birthplace"):::projected v12("?birthyear"):::projected v4("?collection") v9("?coord"):::projected v10("?dob") v6("?edition") v11("?image"):::projected v12("?layer"):::projected v3("?name"):::projected v5("?novel") v7("?person"):::projected v8("?place") f0[["?birthplace = 'sr'"]] f0 --> v2 f1[["?name = 'sr'"]] f1 --> v3 bind2[/VALUES ?collection/] bind2-->v4 bind20(["wd:Q106936149"]) bind20 --> bind2 bind21(["wd:Q109123373"]) bind21 --> bind2 v5 --"wdt:P747"--> v6 v5 --"wdt:P50"--> v7 v6 --"wdt:P1433"--> v4 v7 --"wdt:P19"--> v8 v8 --"wdt:P625"--> v9 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v7 -."wdt:P569".-> v10 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v7 -."wdt:P18".-> v11 end bind3[/"year-from-dateTime(?dob)"/] v10 --o bind3 bind3 --as--o v12 bind4[/"if(?birthyear < '1801^^xsd:integer','-1800',if(?birthyear < '1831^^xsd:integer','1801-1840',if(?birthyear < '1871^^xsd:integer','1841-1870',if(?birthyear < '1901^^xsd:integer','1871-1900','Post-1900'))))"/] v12 --o bind4 bind4 --as--o v12 v7 --"rdfs:label"--> v3 v8 --"rdfs:label"--> v2