User:ChristianSW/Snippets: Difference between revisions

From biodiversity citizen science
Jump to navigation Jump to search
(+1)
 
m (...)
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
== States of Germany with iNat-place-ID ==
== GBIF occurrence link ==
<sparql tryit="1" list="1">
<sparql tryit="1">
#defaultView:Map
PREFIX wb: <http://biodiversity.wiki.opencura.com/entity/>
PREFIX wbt: <http://biodiversity.wiki.opencura.com/prop/direct/>
 
SELECT ?GBIFlink  WHERE {
  VALUES ?observation {wb:Q120840}
  ?observation wbt:P14 ?GBIF_ID .
  BIND(URI(CONCAT("https://www.gbif.org/occurrence/", STR(?GBIF_ID))) AS ?GBIFlink)
}
</sparql>
 
== Wikidata: States of Germany with iNaturalist Search URLs ==
<sparql tryit="1">
#defaultView:Map{"hide":"?coord"}


SELECT ?placename ?pic ?coord ?iNatlinkI ?iNatlinkII  WHERE {
SELECT ?placename ?pic ?coord ?iNatlinkI ?iNatlinkII  WHERE {
Line 7: Line 19:
   ?place wdt:P31  wd:Q1221156 ;
   ?place wdt:P31  wd:Q1221156 ;
         wdt:P7471 ?iNat_place_ID ;
         wdt:P7471 ?iNat_place_ID ;
         wdt:P625  ?coord.
         wdt:P625  ?coord .
  OPTIONAL { ?place wdt:P18 ?pic . }
OPTIONAL { ?place wdt:P18 ?pic . }
  BIND(URI(CONCAT("https://www.inaturalist.org/places/", STR(?iNat_place_ID))) AS ?iNatlinkI)
BIND(URI(CONCAT("https://www.inaturalist.org/places/", STR(?iNat_place_ID))) AS ?iNatlinkI)
  BIND(URI(CONCAT("https://www.inaturalist.org/observations?subview=grid&view=species&place_id=", STR(?iNat_place_ID))) AS ?iNatlinkII)
BIND(URI(CONCAT("https://www.inaturalist.org/observations?subview=grid&view=species&place_id=", STR(?iNat_place_ID))) AS ?iNatlinkII)
   ?place rdfs:label ?placename FILTER (lang(?placename) = "de") .
   ?place rdfs:label ?placename FILTER (lang(?placename) = "de") .
   }
   }
}
}
</sparql>
</sparql>
== Sophox -> Biodiversity on Opencura ==
<syntaxhighlight>
#defaultView:Map
PREFIX wbt: <http://biodiversity.wiki.opencura.com/prop/direct/>
PREFIX observer: <https://www.inaturalist.org/people/>
SELECT ?location ?iNatlink WHERE {
  SERVICE <https://biodiversity.wiki.opencura.com/query/sparql> {
  ?observation wbt:P3 observer:christiansw ;
                wbt:P8 ?location ;
                wbt:P6 ?iNatlink .
  }
}
</syntaxhighlight>
[https://tinyurl.com/t9vj3ro Sophox Query]
== Wikidata -> Sophox -> Biodiversity on Opencura ==
<syntaxhighlight>
#defaultView:Map
PREFIX wbt: <http://biodiversity.wiki.opencura.com/prop/direct/>
PREFIX observer: <https://www.inaturalist.org/people/>
SELECT ?location ?iNatlink WHERE {
  SERVICE <https://sophox.org/sparql> {
  SERVICE <https://biodiversity.wiki.opencura.com/query/sparql> {
  ?observation wbt:P3 observer:christiansw ;
                wbt:P8 ?location ;
                wbt:P6 ?iNatlink .
  }}
}
</syntaxhighlight>
[https://w.wiki/Gpj Wikidata Query]

Latest revision as of 22:27, 26 February 2020

GBIF occurrence link

PREFIX wb: <http://biodiversity.wiki.opencura.com/entity/>
PREFIX wbt: <http://biodiversity.wiki.opencura.com/prop/direct/>

SELECT ?GBIFlink  WHERE {
  VALUES ?observation {wb:Q120840}
   ?observation wbt:P14 ?GBIF_ID .
  BIND(URI(CONCAT("https://www.gbif.org/occurrence/", STR(?GBIF_ID))) AS ?GBIFlink) 
}

Try it!


Wikidata: States of Germany with iNaturalist Search URLs

#defaultView:Map{"hide":"?coord"}

SELECT ?placename ?pic ?coord ?iNatlinkI ?iNatlinkII  WHERE {
SERVICE <https://query.wikidata.org/sparql> {
  ?place wdt:P31   wd:Q1221156 ;
         wdt:P7471 ?iNat_place_ID ;
         wdt:P625  ?coord .
OPTIONAL { ?place wdt:P18 ?pic . }
BIND(URI(CONCAT("https://www.inaturalist.org/places/", STR(?iNat_place_ID))) AS ?iNatlinkI)
BIND(URI(CONCAT("https://www.inaturalist.org/observations?subview=grid&view=species&place_id=", STR(?iNat_place_ID))) AS ?iNatlinkII)
  ?place rdfs:label ?placename FILTER (lang(?placename) = "de") .
  }
}

Try it!


Sophox -> Biodiversity on Opencura

#defaultView:Map

PREFIX wbt: <http://biodiversity.wiki.opencura.com/prop/direct/>
PREFIX observer: <https://www.inaturalist.org/people/>

SELECT ?location ?iNatlink WHERE {
  SERVICE <https://biodiversity.wiki.opencura.com/query/sparql> {
   ?observation wbt:P3 observer:christiansw ;
                wbt:P8 ?location ;
                wbt:P6 ?iNatlink .
  }
}

Sophox Query

Wikidata -> Sophox -> Biodiversity on Opencura

#defaultView:Map

PREFIX wbt: <http://biodiversity.wiki.opencura.com/prop/direct/>
PREFIX observer: <https://www.inaturalist.org/people/>

SELECT ?location ?iNatlink WHERE {
  SERVICE <https://sophox.org/sparql> {
  SERVICE <https://biodiversity.wiki.opencura.com/query/sparql> {
   ?observation wbt:P3 observer:christiansw ;
                wbt:P8 ?location ;
                wbt:P6 ?iNatlink .
  }}
}

Wikidata Query