W3C home > Mailing lists > Public > public-lod@w3.org > September 2009

Example Queries of GeoSpecies Data Set

From: Peter DeVries <pete.devries@gmail.com>
Date: Sat, 19 Sep 2009 18:04:51 -0500
Message-ID: <3833bf630909191604h62ee607ek82cacea9408a1254@mail.gmail.com>
To: public-lod@w3.org
Here are some example SPARQL queries of the current GeoSpecies Data Set.
They should work on your local triple store or, on the LOD once the new data
set is updated.

Note the difference between

*geospecies:isExpectedIn* (could be expected in area even if unlikely)

and

*geospecies:wasObservedIn* (a record for a species observation in that area
is in the knowledge base)

The *isExpectedIn* can be used to get a presumptive species list for an
area.


#1 Mosquitoes (Culicidae) Expected in Wisconsin
PREFIX geospecies: <http://rdf.geospecies.org/ont/geospecies#>
PREFIX culicidae: <http://lod.geospecies.org/families/wQViY>
PREFIX state: <http://sws.geonames.org/5279468/>
PREFIX dcterms: <http://purl.org/dc/terms/>

SELECT DISTINCT ?family_name ?cannonicalName ?speciesconcept ?geospeciespage

WHERE {
?x geospecies:hasFamilyName ?family_name;
 geospecies:hasCanonicalName ?cannonicalName;
 dcterms:identifier ?speciesconcept;
 geospecies:hasGeoSpeciesPage ?geospeciespage;
 geospecies:inFamily <http://lod.geospecies.org/families/wQViY>;
 geospecies:isExpectedIn <http://sws.geonames.org/5279468/>.
}
ORDER BY ?family_name ?cannonicalName



#2 "Strigidae" OWLs Expected in Wisconsin
PREFIX geospecies: <http://rdf.geospecies.org/ont/geospecies#>
PREFIX strigidae: <http://lod.geospecies.org/families/a4vTG>
PREFIX state: <http://sws.geonames.org/5279468/>
PREFIX dcterms: <http://purl.org/dc/terms/>

SELECT DISTINCT ?family_name ?cannonicalName ?speciesconcept ?geospeciespage

WHERE {
?x geospecies:hasFamilyName ?family_name;
geospecies:hasCanonicalName ?cannonicalName;
dcterms:identifier ?speciesconcept;
geospecies:hasGeoSpeciesPage ?geospeciespage;
geospecies:inFamily <http://lod.geospecies.org/families/a4vTG>;
geospecies:isExpectedIn<http://sws.geonames.org/5279468/>.
}
ORDER BY ?family_name ?cannonicalName


#3 Species Observed in Door County, Wisconsin
PREFIX geospecies: <http://rdf.geospecies.org/ont/geospecies#>
PREFIX county: <http://sws.geonames.org/5279468/>
PREFIX dcterms: <http://purl.org/dc/terms/>

SELECT DISTINCT ?family_name ?cannonicalName ?speciesconcept ?geospeciespage

WHERE {
?x geospecies:hasFamilyName ?family_name;
 geospecies:hasCanonicalName ?cannonicalName;
 dcterms:identifier ?speciesconcept;
 geospecies:hasGeoSpeciesPage ?geospeciespage;
 geospecies:wasObservedIn<http://sws.geonames.org/5279468/>.
}
ORDER BY ?family_name ?cannonicalName

----------------------------------------------------------------
Pete DeVries
Department of Entomology
University of Wisconsin - Madison
445 Russell Laboratories
1630 Linden Drive
Madison, WI 53706
GeoSpecies Knowledge Base http://lod.geospecies.org/
About the GeoSpecies Knowledge Base
http://about.geospecies.org/
------------------------------------------------------------
Received on Saturday, 19 September 2009 23:05:32 UTC

This archive was generated by hypermail 2.3.1 : Sunday, 31 March 2013 14:24:23 UTC