Dreams:location: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 1: | Line 1: | ||
== | == Steddata == | ||
{{SPARQL | query= | {{SPARQL | query= | ||
PREFIX target: <https://dreams.wikibase.cloud/entity/Q306> | PREFIX target: <https://dreams.wikibase.cloud/entity/Q306> | ||
Line 7: | Line 7: | ||
PREFIX dreamspsv: <https://dreams.wikibase.cloud/prop/statement/value/> | PREFIX dreamspsv: <https://dreams.wikibase.cloud/prop/statement/value/> | ||
SELECT DISTINCT ? | SELECT DISTINCT ?beskrivelse ?value ?valueLabel ?valueUrl | ||
WHERE { | WHERE { | ||
{ | { | ||
BIND(1 AS ?order) | BIND(1 AS ?order) | ||
BIND(" | BIND("Sted" AS ?beskrivelse) | ||
BIND(target: AS ?value) . | BIND(target: AS ?value) . | ||
} | } | ||
Line 17: | Line 17: | ||
{ | { | ||
BIND(10 AS ?order) | BIND(10 AS ?order) | ||
BIND("OpenStreetMap" AS ? | BIND("OpenStreetMap" AS ?beskrivelse) | ||
target: dreamsp:P13 ?geo_statement . | target: dreamsp:P13 ?geo_statement . | ||
?geo_statement dreamspsv:P13 / wikibase:geoLatitude ?latitude . | ?geo_statement dreamspsv:P13 / wikibase:geoLatitude ?latitude . | ||
Line 28: | Line 28: | ||
{ | { | ||
BIND(21 AS ?order) | BIND(21 AS ?order) | ||
BIND("Scholia" AS ? | BIND("Scholia" AS ?beskrivelse) | ||
target: dreamst:P3 ?value_ . | target: dreamst:P3 ?value_ . | ||
BIND(CONCAT(STR(?value_), " ↗") AS ?value) | BIND(CONCAT(STR(?value_), " ↗") AS ?value) |
Revision as of 13:56, 9 December 2022
Steddata
PREFIX target: <https://dreams.wikibase.cloud/entity/Q306> 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 DISTINCT ?beskrivelse ?value ?valueLabel ?valueUrl WHERE { { BIND(1 AS ?order) BIND("Sted" AS ?beskrivelse) BIND(target: AS ?value) . } UNION { BIND(10 AS ?order) BIND("OpenStreetMap" AS ?beskrivelse) target: dreamsp:P13 ?geo_statement . ?geo_statement dreamspsv:P13 / wikibase:geoLatitude ?latitude . ?geo_statement dreamspsv:P13 / wikibase:geoLongitude ?longitude . BIND(CONCAT(STR(?latitude), "/", STR(?longitude), " ↗") AS ?value) BIND(CONCAT("https://www.openstreetmap.org/#map=15/", STR(?latitude), "/", STR(?longitude)) AS ?valueUrl) } UNION { BIND(21 AS ?order) BIND("Scholia" AS ?beskrivelse) target: dreamst:P3 ?value_ . BIND(CONCAT(STR(?value_), " ↗") AS ?value) BIND(CONCAT("https://scholia.toolforge.org/topic/", STR(?value_)) AS ?valueUrl) } SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". } } ORDER BY ?order
Reports
PREFIX target: <https://dreams.wikibase.cloud/entity/Q306> PREFIX dreams: <https://dreams.wikibase.cloud/entity/> PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/> SELECT ?report ?reportLabel (CONCAT("#report/", SUBSTR(STR(?report), 38)) AS ?reportUrl) WHERE { ?report dreamst:P12 target: . SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],da,en". } }
Co-mentioned locations
PREFIX target: <https://dreams.wikibase.cloud/entity/Q306> PREFIX dreams: <https://dreams.wikibase.cloud/entity/> PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/> SELECT (COUNT(?report) AS ?count) ?location ?locationLabel (CONCAT("#location/", SUBSTR(STR(?location), 38)) AS ?locationUrl) WHERE { ?report dreamst:P12 target: , ?location . FILTER (target: != ?location) SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],da,en". } } GROUP BY ?location ?locationLabel ?locationUrl
Nearby locations
PREFIX target: <https://dreams.wikibase.cloud/entity/Q306> 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 ?distance ?location ?locationLabel ?locationUrl WHERE { target: dreamst:P13 ?geo . ?location dreamst:P13 ?other_geo . FILTER(target: != ?location) BIND(geof:distance(?other_geo, ?geo) AS ?distance) BIND(CONCAT("#location/", SUBSTR(STR(?location), 38)) AS ?locationUrl) SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". } } ORDER BY ?distance