query-4eec984fda1273d33768a255123f63a2

rq turtle/ttl

TODO

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
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:BubbleChart
SELECT ?clabel ?count
WHERE {
  {
    SELECT ?placeLabel (count(?item) as ?count)
    WHERE {  {
  SELECT DISTINCT ?item ?place ?placeLabel ?publishing_date ?gender ?language
  WHERE {
    ?item wdt:P291 ?place ;
      wdt:P577 ?publishing_date; 
      wdt:P31 ?inst. 
    FILTER(?inst IN (wd:Q1261026, wd:Q732577))
    FILTER(?place IN (wd:Q8692, wd:Q10313, wd:Q497801, wd:Q14318, wd:Q10282, wd:Q134674))
    FILTER(?publishing_date >= "1700-01-01"^^xsd:date && ?publishing_date < "1800-01-01"^^xsd:dat)
    ?place rdfs:label ?placeLabel. FILTER(LANG(?placeLabel)="en")
    OPTIONAL { ?item wdt:P872/wdt:P21/rdfs:label ?gender_ . FILTER(LANG(?gender_)="en") }
    OPTIONAL { ?item wdt:P407/rdfs:label ?language_ . FILTER(LANG(?language_)="en") }
    BIND(COALESCE(?gender_, "unspecified") AS ?gender)
    BIND(COALESCE(?language_, "unspecified") AS ?language)
  }
}}
    GROUP BY ?placeLabel
  }
  BIND(CONCAT(?placeLabel, " ", STR(?count)) AS ?clabel)
}
ORDER BY DESC(?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v11("?clabel"):::projected v11("?count"):::projected v9("?gender") v7("?gender_") v6("?inst") v8("?item") v10("?language") v2("?language_") v5("?place") v3("?placeLabel") v4("?publishing_date") a1((" ")) a2((" ")) a3((" ")) f0[["?placeLabel = 'en'"]] f0 --> v3 f1[["?publishing_date >= '1700-01-01^^xsd:date'?publishing_date < s1800-01-01^^<http://www.w3.org/2001/XMLSchema#dat>'"]] f1 --> v4 list0c5(["wd:Q10282"]):::iri list0c1(["wd:Q8692"]):::iri list0c3(["wd:Q497801"]):::iri list0c6(["wd:Q134674"]):::iri list0c4(["wd:Q14318"]):::iri list0c2(["wd:Q10313"]):::iri list0c1 --o f2 list0c2 --o f2 list0c3 --o f2 list0c4 --o f2 list0c5 --o f2 list0c6 --o f2 f2[[" in "]] f2 --> v5 list1c1(["wd:Q1261026"]):::iri list1c2(["wd:Q732577"]):::iri list1c1 --o f3 list1c2 --o f3 f3[[" in "]] f3 --> v6 v8 --"wdt:P291"--> v5 v8 --"wdt:P577"--> v4 v8 --"wdt:P31"--> v6 v5 --"rdfs:label"--> v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v8 -."wdt:P872".-> a1 a1 --"wdt:P21"--> a2 a2 --"rdfs:label"--> v7 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v8 -."wdt:P407".-> a3 a3 --"rdfs:label"--> v2 end bind4[/"?gender_'unspecified'"/] v7 --o bind4 bind4 --as--o v9 bind5[/"?language_'unspecified'"/] v2 --o bind5 bind5 --as--o v10 bind7[/"count(?item)"/] v8 --o bind7 bind7 --as--o v11 bind8[/"concat(?placeLabel,' ',str(?count))"/] v3 --o bind8 v11 --o bind8 bind8 --as--o v11