query-dfde96f0abd46b03fc27539b371c0c69

rq turtle/ttl

Example query 3 Wikidata map of Global Administrative Areas with links to GBIF datasets

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
SELECT DISTINCT ?item ?itemLabel ?pic ?coord ?GBIFlink WHERE {
  ?item wdt:P8714 ?GADM .
  ?item wdt:P625 ?coord .
  OPTIONAL { ?item wdt:P18 ?pic . }
  BIND(URI(CONCAT("https://www.gbif.org/occurrence/map?gadm_gid=", STR(?GADM))) AS ?GBIFlink)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?GADM") v5("?GBIFlink"):::projected v3("?coord"):::projected v1("?item"):::projected v4("?pic"):::projected c5(["bd:serviceParam"]):::iri c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal v1 --"wdt:P8714"--> v2 v1 --"wdt:P625"--> v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P18".-> v4 end bind0[/"concat('https://www.gbif.org/occurrence/map?gadm_gid=',str(?GADM))"/] v2 --o bind0 bind0 --as--o v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end