User:ChristianSW/Snippets: Difference between revisions

From biodiversity citizen science
Jump to navigation Jump to search
(+1)
 
m (...)
Line 1: Line 1:
== States of Germany with iNat-place-ID ==
== States of Germany with iNaturalist Search URLs ==
<sparql tryit="1" list="1">
<sparql tryit="1">
#defaultView:Map
#defaultView:Map


Line 7: Line 7:
   ?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)

Revision as of 18:58, 4 February 2020

States of Germany with iNaturalist Search URLs

#defaultView:Map

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!