| Line 1: |
Line 1: |
| | {{SPARQL|query={{SPARQLcountry|country=Q564}}|label=MyData/Finland ecosystem mapping|state=collapsed}} | | {{SPARQL|query={{SPARQLcountry|country=Q564}}|label=MyData/Finland ecosystem mapping|state=collapsed}} |
| | + | {{SPARQL|query= |
| | + | SELECT ?item ?str_item ?itemLabel WHERE { |
| | + | BIND(REPLACE(STR(?item),"http://wiki.personaldata.io/entity/","") AS ?str_item) |
| | + | ?item pdiot:P3 pdio:Q401. |
| | + | ?item pdiot:P55 pdio:Q564. |
| | + | SERVICE wikibase:label { |
| | + | bd:serviceParam wikibase:language "en" . |
| | + | } |
| | + | } |
| | + | LIMIT 100 |
| | + | |label=organizations in Finland |
| | + | |state=collapsed}} |
| | + | {{SPARQL|query= |
| | + | SELECT ?item ?str_item ?itemLabel ?country ?countryLabel ?class ?classLabel WHERE { |
| | + | BIND(REPLACE(STR(?item),"http://wiki.personaldata.io/entity/","") AS ?str_item) |
| | + | BIND(pdio:Q564 AS ?country) |
| | + | BIND(pdio:Q646 AS ?class) |
| | + | ?item pdiot:P3 ?class. |
| | + | ?item pdiot:P55 ?country. |
| | + | # Label service, produces ?xxxLabel and ?xxxDescription above |
| | + | SERVICE wikibase:label { |
| | + | bd:serviceParam wikibase:language "en" . |
| | + | } |
| | + | } |
| | + | LIMIT 100 |
| | + | |label=data operators project in Finland |
| | + | |state=collapsed}} |
| | + | {{SPARQL|query= |
| | + | SELECT ?operator ?operatorLabel ?rgb ?project ?projectLabel ?projectColor |
| | + | WITH {SELECT ?operator ?operatorClass ?operatorColor WHERE { |
| | + | BIND(?class AS ?operatorClass) |
| | + | BIND("FFA500" AS ?operatorColor) |
| | + | BIND(?item AS ?operator) |
| | + | BIND(pdio:Q564 AS ?country) |
| | + | BIND(pdio:Q401 AS ?class) |
| | + | ?item pdiot:P3 ?class. |
| | + | ?item pdiot:P55 ?country. |
| | + | } |
| | + | } |
| | + | AS %operator |
| | + | WITH {SELECT ?project ?projectClass ?projectColor WHERE { |
| | + | BIND(?class AS ?projectClass) |
| | + | BIND("500" AS ?projectColor) |
| | + | BIND(?item AS ?project) |
| | + | BIND(pdio:Q564 AS ?country) |
| | + | BIND(pdio:Q646 AS ?class) |
| | + | ?item pdiot:P3 ?class. |
| | + | ?item pdiot:P55 ?country. |
| | + | } |
| | + | } |
| | + | AS %project |
| | + | WHERE { |
| | + | BIND(?operatorColor AS ?rgb) |
| | + | { |
| | + | INCLUDE %operator. |
| | + | INCLUDE %project. |
| | + | ?project pdiot:P111 ?operator |
| | + | } |
| | + | UNION |
| | + | { |
| | + | INCLUDE %operator. |
| | + | } |
| | + | UNION |
| | + | { |
| | + | INCLUDE %project. |
| | + | } |
| | + | SERVICE wikibase:label { |
| | + | bd:serviceParam wikibase:language "en" . |
| | + | } |
| | + | } |
| | + | LIMIT 10000 |
| | + | |state=collapsed |
| | + | |label=first attempt, kept for historic reasons}} |
| | + | {{SPARQL|query=SELECT DISTINCT ?operator ?operatorLabel ?project ?projectLabel |
| | + | WHERE { |
| | + | { |
| | + | ?operator pdiot:P3 pdio:Q401. |
| | + | OPTIONAL {?project pdiot:P111 ?operator} |
| | + | OPTIONAL {?project pdiot:P111 ?operator} |
| | + | ?operator pdiot:P55 pdio:Q564. |
| | + | } |
| | + | UNION |
| | + | { |
| | + | ?project pdiot:P3 pdio:Q646. |
| | + | OPTIONAL {?project pdiot:P111 ?operator} |
| | + | OPTIONAL {?project pdiot:P111 ?operator} |
| | + | ?project pdiot:P55 pdio:Q564. |
| | + | } |
| | + | SERVICE wikibase:label { |
| | + | bd:serviceParam wikibase:language "en" . |
| | + | } |
| | + | } |
| | + | LIMIT 10000 |
| | + | |label=spreadsheet with both |
| | + | |state=collapsed}} |