query-eada0907875357843066605beca205f2

rq turtle/ttl

Vizualizace častých vlastností v položkách s ID - jen české identifikátory

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:BubbleChart
SELECT ?property ?propertyLabel ?procento WHERE {
{
SELECT ?property ?procento WHERE {
{
SELECT ?property (count(?item) as ?numberof) WHERE {
      {
SELECT distinct ?property ?item WHERE {

  ?item ?p [] .
  ?property wikibase:claim ?p .
  ?property wikibase:propertyType wikibase:ExternalId filter( ?property != wd:P691) .
  #{?property wdt:P31/wdt:P279 wd:Q18614948 .} union { ?property wdt:P31 wd:Q18614948 .}
  {?property wdt:P17 wd:Q213 . } union {?property wdt:P1629/wdt:P17 wd:Q213 .} union {?property wdt:P2378/wdt:P17 wd:Q213 .}

  {
  select ?item where 
         {
     ?item wdt:P691 [] .
     ?item wdt:P31 wd:Q5 .
         }
  }

} 
limit 10000
      }
  }
GROUP BY ?property
         }
  bind((100 * ?numberof / 10000) as ?procento)
         }
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "cs,en". }

}
order by desc(?procento)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?item") v5("?numberof") v4("?p") v6("?procento"):::projected v2("?property"):::projected a1((" ")) a4((" ")) a2((" ")) a3((" ")) c4(["wikibase:ExternalId"]):::iri c15(["cs,en"]):::literal c6(["wd:Q213"]):::iri c13(["bd:serviceParam"]):::iri c11(["wd:Q5"]):::iri f0[["?property != 'wd:P691'"]] f0 --> v2 v3 -->v4--> a1 v2 --"wikibase:claim"--> v4 v2 --"wikibase:propertyType"--> c4 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; v2 --"wdt:P2378"--> a3 a3 --"wdt:P17"--> c6 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P1629"--> a2 a2 --"wdt:P17"--> c6 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P17"--> c6 end union0r <== or ==> union0l end v3 --"wdt:P691"--> a4 v3 --"wdt:P31"--> c11 bind2[/"count(?item)"/] v3 --o bind2 bind2 --as--o v5 bind3[/"'100^^xsd:integer' * ?numberof / '10000^^xsd:integer'"/] v5 --o bind3 bind3 --as--o v6 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c13 --"wikibase:language"--> c15 end