Main Page: Difference between revisions

From DREAMS
Jump to navigation Jump to search
Line 28: Line 28:
== Queries ==
== Queries ==
* Endpoint: https://dreams.wikibase.cloud/query/
* Endpoint: https://dreams.wikibase.cloud/query/
* [tinyurl.com/y7jzsap9 All items and properties]
* All items and properties: [https://dreams.wikibase.cloud/query/index.html#%23defaultView%3AGraph%0ASELECT%20%3Fitem1%20%3Fitem1Label%20%3Fitem2%20%3Fitem2Label%20%3FedgeLabel%20%20%7B%0A%20%20%3Fitem1%20%3Fproperty%20%3Fitem2%20.%0A%20%20%3Fproperty_item%20wikibase%3AdirectClaim%20%3Fproperty%20.%0A%20%20%3Fproperty_item%20rdfs%3Alabel%20%3FedgeLabel%20.%0A%20%20FILTER%28LANG%28%3FedgeLabel%29%20%3D%20%27da%27%29%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cda%2Cen%22.%20%7D%0A%7D] tinyurl.com/2pocudcq
* [tinyurl.com/yhvzw8p7 Geographical map]
* [tinyurl.com/yhvzw8p7 Geographical map]



Revision as of 09:33, 11 August 2022

Items

Dokuments

Projects

Superpatterns

Query

Ontology

Items

Properties

Queries

Graph example

#defaultView:Map
PREFIX dreams: <https://dreams.wikibase.cloud/entity/>
PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/>

SELECT ?report ?reportLabel ?location ?locationLabel ?geo {
  ?report dreamst:P12 ?location .
  ?location dreamst:P13 ?geo
  SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". }
}

Sustainable Development Goals

PREFIX dreams: <https://dreams.wikibase.cloud/entity/>
PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/>

SELECT ?sdg ?sdgLabel {
  ?sdg dreamst:P2 dreams:Q22 .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Impact graph from ontology

#defaultView:Graph
PREFIX dreams: <https://dreams.wikibase.cloud/entity/>
PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/>

SELECT ?concept2 ?concept2Label ?concept1 ?concept1Label {
  ?concept2 dreamst:P14 ?concept1 .
  { BIND (dreams:Q49 AS ?concept1) }
  UNION
  {
    ?concept1 dreamst:P14+ dreams:Q49 .
    ?concept2 dreamst:P14+ dreams:Q49 .
  }    
  SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". }
}

Subactivities ontology

#defaultView:Graph
PREFIX dreams: <https://dreams.wikibase.cloud/entity/>
PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/>

SELECT ?concept1 ?concept1Label ?rgb ?concept2 ?concept2Label  {
    ?concept1 dreamst:P14 ?concept2 .
    { BIND (dreams:Q106 AS ?concept2) }
    UNION
    {
      ?concept1 dreamst:P14+ dreams:Q106 .
    }
    OPTIONAL {
      ?concept1 dreamst:P19 ?project_phase1 . 
      BIND( IF(?project_phase1 = dreams:Q97, "3182BD", "E6550D") AS ?rgb)
    } 
  SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". }
}

Query

Effect graph

#defaultView:Graph
PREFIX dreams: <https://dreams.wikibase.cloud/entity/>
PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/>

SELECT
  ?subactivity ?subactivityLabel ?rgb
  ?impact ?impactLabel
{
  BIND( IF(EXISTS { ?subactivity dreamst:P14+ dreams:Q106 }, "3182BD", "E6550D") AS ?rgb)
  # ?impact dreamst:P14+ dreams:Q49 .
  ?subactivity dreamst:P9 ?impact .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". }
} 

Project types

#defaultView:Graph
PREFIX dreams: <https://dreams.wikibase.cloud/entity/>
PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/>

SELECT
  ?project1 ?project1Label
  ?project2 ?project2Label
WHERE {
  { ?project1 dreamst:P14+ dreams:Q91 .
    ?project2 dreamst:P14+ dreams:Q91 }
  UNION
  { BIND(dreams:Q91 AS ?project1) }
  ?project2 dreamst:P14 ?project1 .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". }
}