query-0d69eb27ff27dd7f7c6b434ae907072a

rq turtle/ttl

Layer does not displayI have the following query:

Use at

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 ?twin ?twinLabel ?geo ?pop ?image ?twinyear ?layer WHERE {
  ?city wdt:P190 ?twin .
  MINUS {?city wdt:P17 wd:Q30}
  ?twin wdt:P17 ?country .
  ?country wdt:P37 wd:Q1321 .
  ?twin wdt:P625 ?geo .
  ?twin wdt:P1082 ?pop .
  ?twin wdt:P571 ?inception .
  BIND(YEAR(?inception) AS ?twinyear)
  BIND(IF(?twinyear < 1700, "Pre-1700", 
          IF(?twinyear < 1751, "1700-1750", 
             IF(?twinyear < 1801, "1751-1800", 
                IF(?twinyear < 1851, "1801-1850", 
                   IF(?twinyear < 1901, "1851-1900", 
                      IF(?twinyear < 1951, "1901-1950", "Post-1950") 
                     ) 
                  ) 
               ) 
            )
         ) AS ?layer )
  FILTER (?pop < 100000 )
  FILTER (?pop > 10000 )
  OPTIONAL {?twin wdt:P18 ?image}
  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; v2("?city") v4("?country") v5("?geo"):::projected v9("?image"):::projected v6("?inception") v8("?layer"):::projected v1("?pop"):::projected v3("?twin"):::projected v7("?twinyear"):::projected c5(["wd:Q30"]):::iri c13(["bd:serviceParam"]):::iri c15(["#91;AUTO_LANGUAGE#93;,en"]):::literal c7(["wd:Q1321"]):::iri f0[["?pop > '10000^^xsd:integer'"]] f0 --> v1 f1[["?pop < '100000^^xsd:integer'"]] f1 --> v1 v2 --"wdt:P190"--> v3 subgraph minus2["MINUS"] style minus2 stroke-width:6px,fill:pink,stroke:red; v2 --"wdt:P17"--> c5 end v3 --"wdt:P17"--> v4 v4 --"wdt:P37"--> c7 v3 --"wdt:P625"--> v5 v3 --"wdt:P1082"--> v1 v3 --"wdt:P571"--> v6 bind3[/"year-from-dateTime(?inception)"/] v6 --o bind3 bind3 --as--o v7 bind4[/"if(?twinyear < '1700^^xsd:integer','Pre-1700',if(?twinyear < '1751^^xsd:integer','1700-1750',if(?twinyear < '1801^^xsd:integer','1751-1800',if(?twinyear < '1851^^xsd:integer','1801-1850',if(?twinyear < '1901^^xsd:integer','1851-1900',if(?twinyear < '1951^^xsd:integer','1901-1950','Post-1950'))))))"/] v7 --o bind4 bind4 --as--o v8 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P18".-> v9 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c13 --"wikibase:language"--> c15 end