User:ChristianSW/Examples: Difference between revisions

From biodiversity citizen science
Jump to navigation Jump to search
m (Try it!)
m (...)
Line 19: Line 19:


SELECT ?location ?iNatlink WHERE {
SELECT ?location ?iNatlink WHERE {
   VALUES ?observation {wb:Q130183}
   VALUES ?observation {wb:Q124485}
   ?observation wbt:P8 ?location ;
   ?observation wbt:P8 ?location ;
                 wbt:P6 ?iNatlink .
                 wbt:P6 ?iNatlink .

Revision as of 16:47, 2 February 2020

Observations by user with links to iNaturalist

The following query uses these:

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

SELECT DISTINCT ?iNatlink WHERE {
   ?observation wbt:P3 user:christiansw .
   ?observation wbt:P6 ?iNatlink .
}

Try it!


Single observation with location and link to iNaturalist

The following query uses these:

#defaultView:Map

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

SELECT ?location ?iNatlink WHERE {
  VALUES ?observation {wb:Q124485}
   ?observation wbt:P8 ?location ;
                wbt:P6 ?iNatlink .
}

Try it!


Link to Wikipedia

  ?observation     wbt:P9  ?scientific_name .
  ?scientific_name wbt:P11 ?wikidata_mapping .
SERVICE <https://query.wikidata.org/sparql> {
    ?wikipedia schema:about ?wikidata_mapping . ?wikipedia schema:inLanguage "en" .
    ?wikipedia schema:isPartOf <https://en.wikipedia.org/> .
    }

Link to Wikispecies

  ?observation     wbt:P9  ?scientific_name .
  ?scientific_name wbt:P11 ?wikidata_mapping .
SERVICE <https://query.wikidata.org/sparql> {
    ?wikispecies schema:about ?wikidata_mapping . 
    ?wikispecies schema:isPartOf <https://species.wikimedia.org/> .
    }