User:ChristianSW/Examples: Difference between revisions

From biodiversity citizen science
Jump to navigation Jump to search
m (+2)
m (...)
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Observations by user with links to iNaturalist ==
== Observations by observer with links to iNaturalist ==
<syntaxhighlight>
<sparql tryit="1">
PREFIX wbt: <http://biodiversity.wiki.opencura.com/prop/direct/>
PREFIX wbt: <http://biodiversity.wiki.opencura.com/prop/direct/>
PREFIX wb: <http://biodiversity.wiki.opencura.com/entity/>
PREFIX observer: <https://www.inaturalist.org/people/>
PREFIX user: <https://www.inaturalist.org/people/>


SELECT DISTINCT ?iNatlink WHERE {
SELECT ?iNatlink WHERE {
   ?observation wbt:P3 user:christiansw .
   ?observation wbt:P3 observer:christiansw .
   ?observation wbt:P6 ?iNatlink .
   ?observation wbt:P6 ?iNatlink .
}
}
</syntaxhighlight>
</sparql>


== Single observation with location and link to iNaturalist ==
== Single observation with location and link to iNaturalist ==
<syntaxhighlight>
<sparql tryit="1">
#defaultView:Map
#defaultView:Map


Line 19: Line 18:


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 .
}
}
</syntaxhighlight>
</sparql>
 
== Link to German Wikipedia ==
<sparql tryit="1">
#defaultView:Map
 
PREFIX wb: <http://biodiversity.wiki.opencura.com/entity/>
PREFIX wbt: <http://biodiversity.wiki.opencura.com/prop/direct/>
 
SELECT ?location ?iNatlink ?wikipedia WHERE {
  VALUES ?observation {wb:Q124625}
  ?observation    wbt:P8  ?location ;
                    wbt:P6  ?iNatlink ;
                    wbt:P9  ?scientific_name .
  ?scientific_name wbt:P11 ?wikidata_mapping .
SERVICE <https://query.wikidata.org/sparql> {
    ?wikipedia schema:about ?wikidata_mapping .
    ?wikipedia schema:inLanguage "de" .
    ?wikipedia schema:isPartOf <https://de.wikipedia.org/> .
    }
}
</sparql>
 
== Link to Wikispecies ==
<sparql tryit="1">
#defaultView:Map
 
PREFIX wb: <http://biodiversity.wiki.opencura.com/entity/>
PREFIX wbt: <http://biodiversity.wiki.opencura.com/prop/direct/>


== Link to Wikipedia ==
SELECT ?location ?iNatlink ?wikispecies WHERE {
<syntaxhighlight>
  VALUES ?observation {wb:Q131704}
  ?observation  wbt:P9 ?scientific_name .
  ?observation     wbt:P8 ?location ;
  ?scientific_name wbt:P11 ?wikidata_mapping .
                    wbt:P6  ?iNatlink ;
                    wbt:P9 ?scientific_name .
  ?scientific_name wbt:P11 ?wikidata_mapping .
SERVICE <https://query.wikidata.org/sparql> {
SERVICE <https://query.wikidata.org/sparql> {
     ?wikispecies schema:about ?wikidata_mapping .  
     ?wikispecies schema:about ?wikidata_mapping .  
     ?wikispecies schema:isPartOf <https://species.wikimedia.org/> .
     ?wikispecies schema:isPartOf <https://species.wikimedia.org/> .
     }
     }
</syntaxhighlight>
}
</sparql>
 
== My ladybirds ==
<sparql tryit="1">
#defaultView:Map{"hide":"?location"}
 
PREFIX wb: <http://biodiversity.wiki.opencura.com/entity/>
PREFIX wbt: <http://biodiversity.wiki.opencura.com/prop/direct/>
PREFIX observer: <https://www.inaturalist.org/people/>


== Link to Wikispecies ==
SELECT DISTINCT ?location ?iNatlink ?layer WHERE {
<syntaxhighlight>
  ?observation    wbt:P3  observer:christiansw ;
  ?observation wbt:P9 ?scientific_name .
                    wbt:P8  ?location ;
  ?scientific_name wbt:P11 ?wikidata_mapping .
                    wbt:P6 ?iNatlink ;
                    wbt:P9 ?scientific_name .
  ?scientific_name wbt:P11 ?wikidata_mapping .
FILTER(?scientific_name IN (wb:Q5053, wb:Q5526, wb:Q97245, wb:Q128695, wb:Q96351)).
SERVICE <https://query.wikidata.org/sparql> {
SERVICE <https://query.wikidata.org/sparql> {
    ?wikipedia schema:about ?wikidata_mapping . ?wikipedia schema:inLanguage "en" .
  ?wikidata_mapping rdfs:label ?label FILTER (lang(?label) = "de") .
    ?wikipedia schema:isPartOf <https://en.wikipedia.org/> .
  BIND(?label AS ?layer).
    }
  }
</syntaxhighlight>
}
</sparql>

Latest revision as of 22:25, 26 February 2020

Observations by observer with links to iNaturalist

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

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

Try it!


Single observation with location and link to iNaturalist

#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 German Wikipedia

#defaultView:Map

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

SELECT ?location ?iNatlink ?wikipedia WHERE {
  VALUES ?observation {wb:Q124625}
   ?observation     wbt:P8  ?location ;
                    wbt:P6  ?iNatlink ;
                    wbt:P9  ?scientific_name .
   ?scientific_name wbt:P11 ?wikidata_mapping .
SERVICE <https://query.wikidata.org/sparql> {
    ?wikipedia schema:about ?wikidata_mapping . 
    ?wikipedia schema:inLanguage "de" .
    ?wikipedia schema:isPartOf <https://de.wikipedia.org/> .
    }
}

Try it!


Link to Wikispecies

#defaultView:Map

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

SELECT ?location ?iNatlink ?wikispecies WHERE {
  VALUES ?observation {wb:Q131704}
   ?observation     wbt:P8  ?location ;
                    wbt:P6  ?iNatlink ;
                    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/> .
    }
}

Try it!


My ladybirds

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

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

SELECT DISTINCT ?location ?iNatlink ?layer WHERE {
   ?observation     wbt:P3  observer:christiansw ;
                    wbt:P8  ?location ;
                    wbt:P6  ?iNatlink ;
                    wbt:P9  ?scientific_name .
   ?scientific_name wbt:P11 ?wikidata_mapping .
FILTER(?scientific_name IN (wb:Q5053, wb:Q5526, wb:Q97245, wb:Q128695, wb:Q96351)).
SERVICE <https://query.wikidata.org/sparql> {
   ?wikidata_mapping rdfs:label ?label FILTER (lang(?label) = "de") .
   BIND(?label AS ?layer).
   }
}

Try it!