Difference between revisions of "Project:MyData/Finland/Mapping"

From Wikibase Personal data
Jump to navigation Jump to search
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== Mapping effort ==
 
== Mapping effort ==
This is part of a larger [[mapping]] effort.
+
This is part of a larger [[mapping]] effort. You should look at that page first.  
  
 
+
This page is focused on Finland {{Q|564}}.
This page is focused on Finland {{Q|564}}
 
  
 
== Data entry spreadsheet ==
 
== Data entry spreadsheet ==
 
[https://docs.google.com/spreadsheets/d/1f1R4OtOGOsJ6-sy3krkP3rnPSYz6zleNuxeJyWiLkTc/edit?usp=sharing Link to data entry spreadheets]
 
[https://docs.google.com/spreadsheets/d/1f1R4OtOGOsJ6-sy3krkP3rnPSYz6zleNuxeJyWiLkTc/edit?usp=sharing Link to data entry spreadheets]
== Queries ==
+
=Results=
=== Organisations ===
+
* Some [https://query.wikidata.org/embed.html#SELECT%20%3Fitem%20%3FitemLabel%20%20WHERE%20%7B%0A%20%20%3Fitem%20wdt%3AP463%20wd%3AQ59696014.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%0A%20%20%20%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20.%20%0A%20%20%7D%0A%7D%0ALIMIT%20100 Wikidata entries for MyData Global members] are there, you might get a head start from it (press play button, on the left, editable in Wikidata, exportable to CSV)
* Some [https://query.wikidata.org/#SELECT%20%3Fitem%20%3FitemLabel%20%20WHERE%20%7B%0A%20%20%3Fitem%20wdt%3AP463%20wd%3AQ59696014.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%0A%20%20%20%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20.%20%0A%20%20%7D%0A%7D%0ALIMIT%20100 Wikidata entries for MyData Global members] are there, you might get a head start from it (press play button, on the left, editable in Wikidata, exportable to CSV)
+
* [https://query.wikidata.org/embed.html#SELECT%20%3Fitem%20%3FitemLabel%20%20WHERE%20%7B%0A%20%20%3Fitem%20wdt%3AP463%20wd%3AQ59696014.%0A%20%20%3Fitem%20wdt%3AP17%20wd%3AQ33.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%0A%20%20%20%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20.%20%0A%20%20%7D%0A%7D%0ALIMIT%20100 MyData Global members from Finland]
* [https://query.personaldata.io/index.html#PREFIX%20pdio%3A%20%3Chttp%3A%2F%2Fwiki.personaldata.io%2Fentity%2F%3E%0APREFIX%20pdiot%3A%20%3Chttp%3A%2F%2Fwiki.personaldata.io%2Fprop%2Fdirect%2F%3E%0A%0ASELECT%20%3Fitem%20%3Fstr_item%20%3FitemLabel%20WHERE%20%7B%0A%20%20BIND%28REPLACE%28STR%28%3Fitem%29%2C%22http%3A%2F%2Fwiki.personaldata.io%2Fentity%2F%22%2C%22%22%29%20AS%20%3Fstr_item%29%0A%20%20%3Fitem%20pdiot%3AP3%20pdio%3AQ401.%0A%20%20%3Fitem%20pdiot%3AP55%20pdio%3AQ564.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%0A%20%20%20%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20.%20%0A%20%20%7D%0A%7D%0ALIMIT%20100 organisations in Finland] on PersonalData.IO
+
{{Project:MyData/Finland/Mapping/Results}}
 
 
=== Projects ===
 
* [https://query.personaldata.io/index.html#PREFIX%20pdio%3A%20%3Chttp%3A%2F%2Fwiki.personaldata.io%2Fentity%2F%3E%0APREFIX%20pdiot%3A%20%3Chttp%3A%2F%2Fwiki.personaldata.io%2Fprop%2Fdirect%2F%3E%0A%0ASELECT%20%3Fitem%20%3Fstr_item%20%3FitemLabel%20%3Fcountry%20%3FcountryLabel%20%3Fclass%20%3FclassLabel%20WHERE%20%7B%0A%20%20BIND%28REPLACE%28STR%28%3Fitem%29%2C%22http%3A%2F%2Fwiki.personaldata.io%2Fentity%2F%22%2C%22%22%29%20AS%20%3Fstr_item%29%0A%20%20BIND%28pdio%3AQ564%20AS%20%3Fcountry%29%0A%20%20BIND%28pdio%3AQ646%20AS%20%3Fclass%29%0A%20%20%3Fitem%20pdiot%3AP3%20%3Fclass.%0A%20%20%3Fitem%20pdiot%3AP55%20%3Fcountry.%0A%20%20%23%20Label%20service%2C%20produces%20%3FxxxLabel%20and%20%3FxxxDescription%20above%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%0A%20%20%20%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20.%20%0A%20%20%7D%0A%7D%0ALIMIT%20100 data operator projects in Finland]
 
 
 
=== Mapping ===
 
* [https://query.personaldata.io/index.html#PREFIX%20pdio%3A%20%3Chttp%3A%2F%2Fwiki.personaldata.io%2Fentity%2F%3E%0APREFIX%20pdiot%3A%20%3Chttp%3A%2F%2Fwiki.personaldata.io%2Fprop%2Fdirect%2F%3E%0A%0ASELECT%20%3Foperator%20%3FoperatorLabel%20%3Frgb%20%3Fproject%20%3FprojectLabel%20%3FprojectColor%20%0AWITH%20%7BSELECT%20%3Foperator%20%3FoperatorClass%20%3FoperatorColor%20WHERE%20%7B%0A%20%20%20%20BIND%28%3Fclass%20AS%20%3FoperatorClass%29%0A%20%20%20%20BIND%28%22FFA500%22%20AS%20%3FoperatorColor%29%0A%20%20%20%20BIND%28%3Fitem%20AS%20%3Foperator%29%0A%20%20%20%20BIND%28pdio%3AQ564%20AS%20%3Fcountry%29%0A%20%20%20%20BIND%28pdio%3AQ401%20AS%20%3Fclass%29%0A%20%20%20%20%3Fitem%20pdiot%3AP3%20%3Fclass.%0A%20%20%20%20%3Fitem%20pdiot%3AP55%20%3Fcountry.%0A%20%20%7D%7D%0AAS%20%25operator%0AWITH%20%7BSELECT%20%3Fproject%20%3FprojectClass%20%3FprojectColor%20WHERE%20%7B%0A%20%20%20%20BIND%28%3Fclass%20AS%20%3FprojectClass%29%0A%20%20%20%20BIND%28%22500%22%20AS%20%3FprojectColor%29%0A%20%20%20%20BIND%28%3Fitem%20AS%20%3Fproject%29%0A%20%20%20%20BIND%28pdio%3AQ564%20AS%20%3Fcountry%29%0A%20%20%20%20BIND%28pdio%3AQ646%20AS%20%3Fclass%29%0A%20%20%20%20%3Fitem%20pdiot%3AP3%20%3Fclass.%0A%20%20%20%20%3Fitem%20pdiot%3AP55%20%3Fcountry.%0A%20%20%7D%7D%0AAS%20%25project%0AWHERE%20%7B%0A%20%20BIND%28%3FoperatorColor%20AS%20%3Frgb%29%0A%20%20%7B%0A%20%20%20%20%20INCLUDE%20%25operator.%0A%20%20%20%20%20INCLUDE%20%25project.%0A%20%20%20%20%20%3Fproject%20pdiot%3AP111%20%3Foperator%0A%20%20%7D%0A%20%20UNION%0A%20%20%7B%0A%20%20%20%20%20INCLUDE%20%25operator.%0A%20%20%7D%0A%20%20UNION%0A%20%20%7B%0A%20%20%20%20%20INCLUDE%20%25project.%0A%20%20%7D%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%0A%20%20%20%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20.%20%0A%20%20%7D%0A%7D%0ALIMIT%2010000 first attempt] (kept for historic reasons)
 
* [https://query.personaldata.io/embed.html#%23defaultView%3AGraph%0APREFIX%20pdio%3A%20%3Chttp%3A%2F%2Fwiki.personaldata.io%2Fentity%2F%3E%0APREFIX%20pdiot%3A%20%3Chttp%3A%2F%2Fwiki.personaldata.io%2Fprop%2Fdirect%2F%3E%0A%0ASELECT%20%3Foperator%20%3FoperatorLabel%20%3Frgb%20%3Fproject%20%3FprojectLabel%20%0AWITH%20%7BSELECT%20%3Foperator%20WHERE%20%7B%0A%20%20%20%20BIND%28%3Fitem%20AS%20%3Foperator%29%0A%20%20%20%20BIND%28pdio%3AQ401%20AS%20%3Fclass%29%0A%20%20%20%20%3Fitem%20pdiot%3AP3%20%3Fclass.%0A%20%20%7D%7D%0AAS%20%25operator%0AWITH%20%7BSELECT%20%3Fproject%20WHERE%20%7B%0A%20%20%20%20BIND%28%3Fitem%20AS%20%3Fproject%29%0A%20%20%20%20BIND%28pdio%3AQ646%20AS%20%3Fclass%29%0A%20%20%20%20%3Fitem%20pdiot%3AP3%20%3Fclass.%0A%20%20%7D%7D%0AAS%20%25project%0AWHERE%20%7B%0A%20%20%7B%0A%20%20%20%20%20INCLUDE%20%25operator.%0A%20%20%7D%0A%20%20UNION%0A%20%20%7B%0A%20%20%20%20%20INCLUDE%20%25project.%0A%20%20%20%20%20BIND%28%22990000%22%20AS%20%3Frgb%29%0A%20%20%7D%0A%20%20UNION%0A%20%20%7B%0A%20%20%20%20%20INCLUDE%20%25operator.%0A%20%20%20%20%20INCLUDE%20%25project.%0A%20%20%20%20%20%3Fproject%20pdiot%3AP111%20%3Foperator%0A%20%20%20%20%20BIND%28%22FFFFFF%22%20AS%20%3Frgb%29%0A%20%20%7D%0A%20%20UNION%0A%20%20%7B%0A%20%20%20%20%20INCLUDE%20%25operator.%0A%20%20%20%20%20INCLUDE%20%25project.%0A%20%20%20%20%20%3Foperator%20pdiot%3AP111%20%3Fproject%0A%20%20%20%20%20BIND%28%22FFFFFF%22%20AS%20%3Frgb%29%0A%20%20%7D%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%0A%20%20%20%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20.%20%0A%20%20%7D%0A%7D%0ALIMIT%2010000 render of WIP]
 
* [https://query.personaldata.io/index.html#PREFIX%20pdio%3A%20%3Chttp%3A%2F%2Fwiki.personaldata.io%2Fentity%2F%3E%0APREFIX%20pdiot%3A%20%3Chttp%3A%2F%2Fwiki.personaldata.io%2Fprop%2Fdirect%2F%3E%0A%0ASELECT%20DISTINCT%20%3Foperator%20%3FoperatorLabel%20%3Fproject%20%3FprojectLabel%0AWHERE%20%7B%0A%20%20%7B%0A%20%20%20%20%3Foperator%20pdiot%3AP3%20pdio%3AQ401.%0A%20%20%20%20OPTIONAL%20%7B%3Fproject%20pdiot%3AP111%20%3Foperator%7D%0A%20%20%20%20OPTIONAL%20%7B%3Fproject%20pdiot%3AP111%20%3Foperator%7D%0A%20%20%7D%0A%20%20UNION%0A%20%20%7B%0A%20%20%20%20%3Fproject%20pdiot%3AP3%20pdio%3AQ646.%0A%20%20%20%20OPTIONAL%20%7B%3Fproject%20pdiot%3AP111%20%3Foperator%7D%0A%20%20%20%20OPTIONAL%20%7B%3Fproject%20pdiot%3AP111%20%3Foperator%7D%0A%20%20%7D%20%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%0A%20%20%20%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20.%20%0A%20%20%7D%0A%7D%0ALIMIT%2010000 spreadsheet with both]
 
 
 
 
 
== Queries ==
 
=== Organisations ===
 
* Some [https://query.wikidata.org/#SELECT%20%3Fitem%20%3FitemLabel%20%20WHERE%20%7B%0A%20%20%3Fitem%20wdt%3AP463%20wd%3AQ59696014.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%0A%20%20%20%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20.%20%0A%20%20%7D%0A%7D%0ALIMIT%20100 Wikidata entries for MyData Global members] are there, you might get a head start from it (press play button, on the left, editable in Wikidata, exportable to CSV)
 
* [https://query.personaldata.io/index.html#PREFIX%20pdio%3A%20%3Chttp%3A%2F%2Fwiki.personaldata.io%2Fentity%2F%3E%0APREFIX%20pdiot%3A%20%3Chttp%3A%2F%2Fwiki.personaldata.io%2Fprop%2Fdirect%2F%3E%0A%0ASELECT%20%3Fitem%20%3Fstr_item%20%3FitemLabel%20WHERE%20%7B%0A%20%20BIND%28REPLACE%28STR%28%3Fitem%29%2C%22http%3A%2F%2Fwiki.personaldata.io%2Fentity%2F%22%2C%22%22%29%20AS%20%3Fstr_item%29%0A%20%20%3Fitem%20pdiot%3AP3%20pdio%3AQ401.%0A%20%20%3Fitem%20pdiot%3AP55%20pdio%3AQ564.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%0A%20%20%20%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20.%20%0A%20%20%7D%0A%7D%0ALIMIT%20100 organisations in Finland] on PersonalData.IO
 
 
 
=== Projects ===
 
* [https://query.personaldata.io/index.html#PREFIX%20pdio%3A%20%3Chttp%3A%2F%2Fwiki.personaldata.io%2Fentity%2F%3E%0APREFIX%20pdiot%3A%20%3Chttp%3A%2F%2Fwiki.personaldata.io%2Fprop%2Fdirect%2F%3E%0A%0ASELECT%20%3Fitem%20%3Fstr_item%20%3FitemLabel%20%3Fcountry%20%3FcountryLabel%20%3Fclass%20%3FclassLabel%20WHERE%20%7B%0A%20%20BIND%28REPLACE%28STR%28%3Fitem%29%2C%22http%3A%2F%2Fwiki.personaldata.io%2Fentity%2F%22%2C%22%22%29%20AS%20%3Fstr_item%29%0A%20%20BIND%28pdio%3AQ564%20AS%20%3Fcountry%29%0A%20%20BIND%28pdio%3AQ646%20AS%20%3Fclass%29%0A%20%20%3Fitem%20pdiot%3AP3%20%3Fclass.%0A%20%20%3Fitem%20pdiot%3AP55%20%3Fcountry.%0A%20%20%23%20Label%20service%2C%20produces%20%3FxxxLabel%20and%20%3FxxxDescription%20above%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%0A%20%20%20%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20.%20%0A%20%20%7D%0A%7D%0ALIMIT%20100 data operator projects in Finland]
 

Latest revision as of 00:36, 27 January 2020

Mapping effort

This is part of a larger mapping effort. You should look at that page first.

This page is focused on Finland Finland (Q564).

Data entry spreadsheet

Link to data entry spreadheets

Results

PREFIX pdio: <https://wiki.personaldata.io/entity/>
PREFIX pdiot: <https://wiki.personaldata.io/prop/direct/>
PREFIX pdiop: <https://wiki.personaldata.io/prop/>
PREFIX pdiops: <https://wiki.personaldata.io/prop/statement/>
PREFIX pdiopq: <https://wiki.personaldata.io/prop/qualifier/>
#defaultView:Graph
SELECT ?item1 ?item1Label ?rgb ?item2 ?item2Label
WITH {
  SELECT ?predicateFilterValue ?predicateFilterValueRGB WHERE {
    VALUES (?predicateFilterValue ?predicateFilterValueRGB) {
       (pdio:Q401 "EEEEEE")(pdio:Q646 "222288")
    }  
  }
}
AS %predicateFilterValues
WITH {
  SELECT ?predicate ?subjectValue ?objectValue ?predicateRGB  WHERE {
    VALUES (?predicate ?subjectValue ?objectValue ?predicateRGB) {
     (pdiot:P111 pdio:Q401 pdio:Q646 "EEEEEE")(pdiot:P111 pdio:Q646 pdio:Q401 "222288")
    }
  }
}
AS %predicates
WITH {SELECT ?node ?nodeRGB WHERE {
    ?node pdiot:P55 pdio:Q564.
    ?node pdiot:P3 ?predicateFilterValue.
    INCLUDE %predicateFilterValues.
    BIND(?predicateFilterValueRGB AS ?nodeRGB)
  }
}
AS %nodes
WITH {SELECT ?subject ?object ?edgeRGB WHERE {
    INCLUDE %predicates.
    ?subject pdiot:P3 ?subjectValue.
    ?object pdiot:P3 ?objectValue.
    ?subject ?predicate ?object.
    # This is filtering for each edge twice, potentially a huge waste: |E|*|V| instead of |V|
    ?subject pdiot:P55 pdio:Q564.
    ?object pdiot:P55 pdio:Q564.
    BIND(?predicateRGB as ?edgeRGB)
  }
} AS %edges
WHERE {

  {  
     INCLUDE %nodes.
     BIND(?node AS ?item1).
     BIND(?nodeRGB AS ?rgb).
  }
  UNION
  {  
     INCLUDE %edges.
     BIND(?subject AS ?item1).
     BIND(?object AS ?item2).
     BIND(?edgeRGB AS ?rgb).
  }
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" . 
  }
}
LIMIT 10000

MyData/Finland ecosystem mapping (embedded)

PREFIX pdio: <https://wiki.personaldata.io/entity/>
PREFIX pdiot: <https://wiki.personaldata.io/prop/direct/>
PREFIX pdiop: <https://wiki.personaldata.io/prop/>
PREFIX pdiops: <https://wiki.personaldata.io/prop/statement/>
PREFIX pdiopq: <https://wiki.personaldata.io/prop/qualifier/>
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

organizations in Finland (embedded)

PREFIX pdio: <https://wiki.personaldata.io/entity/>
PREFIX pdiot: <https://wiki.personaldata.io/prop/direct/>
PREFIX pdiop: <https://wiki.personaldata.io/prop/>
PREFIX pdiops: <https://wiki.personaldata.io/prop/statement/>
PREFIX pdiopq: <https://wiki.personaldata.io/prop/qualifier/>
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

data operators project in Finland (embedded)

PREFIX pdio: <https://wiki.personaldata.io/entity/>
PREFIX pdiot: <https://wiki.personaldata.io/prop/direct/>
PREFIX pdiop: <https://wiki.personaldata.io/prop/>
PREFIX pdiops: <https://wiki.personaldata.io/prop/statement/>
PREFIX pdiopq: <https://wiki.personaldata.io/prop/qualifier/>
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

first attempt, kept for historic reasons (embedded)

PREFIX pdio: <https://wiki.personaldata.io/entity/>
PREFIX pdiot: <https://wiki.personaldata.io/prop/direct/>
PREFIX pdiop: <https://wiki.personaldata.io/prop/>
PREFIX pdiops: <https://wiki.personaldata.io/prop/statement/>
PREFIX pdiopq: <https://wiki.personaldata.io/prop/qualifier/>
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

spreadsheet with both (embedded)