query-f9c8cb2f81d83e570a3c3bbbbd77bf8a
NGO packed bubble chart draft
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#>
#defaultView:BubbleChart
SELECT ?item ?headq ?country ?countryLabel ?count WHERE {
{
SELECT ?country (COUNT(?item) AS ?count) WHERE {
?item wdt:P31 wd:Q79913 .
?item wdt:P159 ?headq .
?headq wdt:P17 ?country .
}
GROUP BY ?country
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
ORDER BY DESC(?count)
LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?count"):::projected
v4("?country"):::projected
v3("?headq"):::projected
v2("?item"):::projected
c2(["wd:Q79913"]):::iri
c6(["bd:serviceParam"]):::iri
c8(["en"]):::literal
v2 --"wdt:P31"--> c2
v2 --"wdt:P159"--> v3
v3 --"wdt:P17"--> v4
bind1[/"count(?item)"/]
v2 --o bind1
bind1 --as--o v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end