query-17c4bf3af73d6ca5831b6364f05ea689
Selection and data modeling good enough for selecting the accounts to show, or should we have a finer level or detail or hard code it? (Q105388954)Wikidata property to identify online accounts and its subclasses or something else? Is (Q2659904)government organization Figure out where the line should be drawn. Is it A naïve approach to find all online accounts can be seen below with the choices above and limited to Sweden.
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#>
SELECT DISTINCT ?item ?itemLabel ?property ?propertyLabel (IRI(CONCAT(SUBSTR(?formatter,1,STRLEN(?formatter)-2), ?value)) AS ?URL) WHERE {
?property wdt:P31 wd:Q105388954;
wikibase:directClaim ?wdt;
wdt:P1630 ?formatter .
?item ?wdt ?value;
wdt:P31/wdt:P279* wd:Q2659904 ;
wdt:P17 wd:Q34 .
SERVICE wikibase:label { bd:serviceParam wikibase:language "sv,en". }
} ORDER BY ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?URL")
v4("?formatter"):::projected
v5("?item"):::projected
v1("?itemLabel"):::projected
v2("?property"):::projected
v6("?value"):::projected
v3("?wdt")
a1((" "))
c6(["wd:Q2659904"]):::iri
c2(["wd:Q105388954"]):::iri
c10(["bd:serviceParam"]):::iri
c12(["sv,en"]):::literal
c8(["wd:Q34"]):::iri
v2 --"wdt:P31"--> c2
v2 --"wikibase:directClaim"--> v3
v2 --"wdt:P1630"--> v4
v5 -->v3--> v6
v5 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c6
v5 --"wdt:P17"--> c8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end
bind0[/"concat(substring(?formatter,'1^^xsd:integer',string-length(?formatter) + '-2^^xsd:integer'),?value)"/]
v4 --o bind0
v6 --o bind0
bind0 --as--o v7