Dreams:projecttype: Difference between revisions

From DREAMS
Jump to navigation Jump to search
No edit summary
(Add "Effects" panel)
Line 1: Line 1:
== Patterns ==
== Effects ==
 
{{SPARQL query=
{{SPARQL | query=  
PREFIX target: <https://dreams.wikibase.cloud/entity/Q264>
PREFIX target: <https://dreams.wikibase.cloud/entity/Q170>
PREFIX dreams: <https://dreams.wikibase.cloud/entity/>
PREFIX dreams: <https://dreams.wikibase.cloud/entity/>
PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/>
PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/>
PREFIX dreamsp: <https://dreams.wikibase.cloud/prop/>
PREFIX dreamspsv: <https://dreams.wikibase.cloud/prop/statement/value/>
SELECT
  ?number_of_patterns


SELECT
   ?effect ?effectLabel
   ?pattern ?patternLabel
   (CONCAT("#effect/", SUBSTR(STR(?effect), 38)) AS ?effectUrl)
   (CONCAT("#pattern/", SUBSTR(STR(?pattern), 38)) AS ?patternUrl)


WHERE {   
  ?example_pattern ?example_patternLabel
   ?pattern dreamst:P2 dreams:Q263
  (CONCAT("#pattern/", SUBSTR(STR(?example_pattern), 38)) AS ?example_patternUrl) 
  ?pattern dreamst:P16 / dreamst:P10* target:
   SERVICE wikibase:label { bd:serviceParam wikibase:language "en,da". }
WITH {
   SELECT
    (COUNT(?pattern) AS ?number_of_patterns)
    (SAMPLE(?pattern) AS ?example_pattern)
    ?effect
   WHERE {
    ?pattern dreamst:P2 dreams:Q263 ;
            dreamst:P16 / dreamst:P10* target:
    ?pattern dreamst:P33 | dreamst:P34 ?effect .
  }
  GROUP BY ?effect
} AS %result
WHERE {
  INCLUDE %result
   SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". }
}
}
ORDER BY DESC(?number_of_patterns)
}}
}}


Line 35: Line 53:
           dreamst:P16 ?project_type .
           dreamst:P16 ?project_type .
   SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en,it". }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en,it". }
}
}}
== Patterns ==
{{SPARQL | query=
PREFIX target: <https://dreams.wikibase.cloud/entity/Q170>
PREFIX dreams: <https://dreams.wikibase.cloud/entity/>
PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/>
SELECT
  ?pattern ?patternLabel
  (CONCAT("#pattern/", SUBSTR(STR(?pattern), 38)) AS ?patternUrl)
WHERE { 
  ?pattern dreamst:P2 dreams:Q263 . 
  ?pattern dreamst:P16 / dreamst:P10* target:
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,da". }
}
}
}}
}}

Revision as of 18:57, 12 August 2022

Effects

{{SPARQL query= PREFIX target: <https://dreams.wikibase.cloud/entity/Q264> PREFIX dreams: <https://dreams.wikibase.cloud/entity/> PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/> PREFIX dreamsp: <https://dreams.wikibase.cloud/prop/> PREFIX dreamspsv: <https://dreams.wikibase.cloud/prop/statement/value/>

SELECT

 ?number_of_patterns
 ?effect ?effectLabel
 (CONCAT("#effect/", SUBSTR(STR(?effect), 38)) AS ?effectUrl)  
 ?example_pattern ?example_patternLabel
 (CONCAT("#pattern/", SUBSTR(STR(?example_pattern), 38)) AS ?example_patternUrl)  

WITH {

 SELECT 
   (COUNT(?pattern) AS ?number_of_patterns)
   (SAMPLE(?pattern) AS ?example_pattern)
   ?effect
 WHERE {
   ?pattern dreamst:P2 dreams:Q263 ;
            dreamst:P16 / dreamst:P10* target:
   ?pattern dreamst:P33 | dreamst:P34 ?effect .
 }
 GROUP BY ?effect

} AS %result WHERE {

 INCLUDE %result
 SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". }

} ORDER BY DESC(?number_of_patterns) }}

Reports

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

SELECT 
  ?project_type ?project_typeLabel
  (CONCAT("#project-type/", SUBSTR(STR(?project_type), 38)) AS ?project_typeUrl)

  ?report ?reportLabel
  (CONCAT("#report/", SUBSTR(STR(?report), 38)) AS ?reportUrl)

WHERE {
  ?project_type dreamst:P10* target: .
  ?report dreamst:P2 / dreamst:P10* dreams:Q8 ;   
          dreamst:P16 ?project_type .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en,it". }
}


Patterns

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

SELECT 
  ?pattern ?patternLabel
  (CONCAT("#pattern/", SUBSTR(STR(?pattern), 38)) AS ?patternUrl)

WHERE {   
  ?pattern dreamst:P2 dreams:Q263 .   
  ?pattern dreamst:P16 / dreamst:P10* target:
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,da". }
}