[tdwg-content] Second Example - SPARQL Query for Mammals Expected in Wisconsin view by Order

Peter DeVries pete.devries at gmail.com
Tue May 3 04:20:09 CEST 2011


Here is another example based on a different query.

*Mammals expected in Wisconsin*

I have bundled the screenshots and the query into this bit,ly bundle

http://bit.ly/lBTFDf

The SPARQL Query Looks like this. Note I am only requesting a subset of the
information about each of these species.

PREFIX txn:     <http://lod.taxonconcept.org/ontology/txn.owl#>
PREFIX rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX wisconsin:  <http://sws.geonames.org/5279468/>
PREFIX dbpedia_owl:  <http://dbpedia.org/ontology/>


select distinct ?s, ?o as ?image,  ?kingdom, ?phylum, ?class, ?order,
?family, ?genus, ?sciname, ?cname, ?author where {
 ?s rdf:type txn:SpeciesConcept.
 ?s txn:inDBpediaClade dbpedia_owl:Mammal.
 ?s txn:isExpectedIn wisconsin:.
 ?s txn:kingdom ?kingdom.
 ?s txn:phylum  ?phylum.
 ?s txn:class   ?class.
 ?s txn:order   ?order.
 ?s txn:family  ?family.
 ?s txn:genus   ?genus.
 ?s txn:hasScientificName   ?sciname.
 optional {?s  txn:thumbnail ?o.
               ?s txn:commonName  ?cname.
               ?s txn:scientificNameAuthorship  ?author}.
 }

 limit 2000

This uses the optional section so that those species that might not have a
thumbnail or common name still show up in the query results.

You can modify this query and run it yourself on
http://uriburner.com/isparql/  Click on the "Advanced" tab to see the box
for entering the query.


- Pete

------------------------------------------------------------------------------------
Pete DeVries
Department of Entomology
University of Wisconsin - Madison
445 Russell Laboratories
1630 Linden Drive
Madison, WI 53706
Email: pdevries at wisc.edu
TaxonConcept <http://www.taxonconcept.org/>  &
GeoSpecies<http://about.geospecies.org/> Knowledge
Bases
A Semantic Web, Linked Open Data <http://linkeddata.org/>  Project
--------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.tdwg.org/pipermail/tdwg-content/attachments/20110502/38965d9a/attachment.html 


More information about the tdwg-content mailing list