First Fishing Expedition

Thanks to David’s hard work, we now have two ways of getting at FishBase data as RDF:

  1. Via a SPARQL endpoint: http://fishdelish.cs.man.ac.uk/sparql/
  2. Via a disorganized URIspace rooted at: http://fishdelish.cs.man.ac.uk/rdf/

These are almost enough to get started exploring the dataset.

My goto tool for poking a SPARQL endpoint is the Virtuoso SPARQL Query Demo. (The main problem with it is that, AFAICT, there’s no way to save your settings, e.g., as a URI.) As I couldn’t get the screen shot uploaded, I’ll just give a little description of how to get started with it.

Set the Query Processor to “Remote”.

Set the Query Service Endpoint to our endpoint: <http://fishdelish.cs.man.ac.uk/sparql/>.

You’re ready to write and run queries.

Alas, it’s a bit difficult to get going if you don’t have any knowledge of the dataset (e.g., the key URIs). The bluffer’s guide will be coming soon, but here’s a couple of queries to get you started. I happen to know the (current) URI for the “genus” relation, so:

  SELECT DISTINCT * WHERE
  {?s <http://fishdelish.cs.man.ac.uk/rdf/vocab/resource/SPECIES_Genus> ?o }

will grab you some species. (Note that Genuses themselves are currently represented by literals, not URIs. That will be fixed!)

If you take one of the bindings for the ?s (i.e., one of the species URIs) you can craft a nice query to grab the basic species info we’ve extracted from FishBase:

  SELECT * WHERE
  { <http://fishdelish.cs.man.ac.uk/rdf/SPECIES/24528> ?p ?o}

Given these, it’s pretty easy to generate additional queries (e.g., get all species of some genus). For example, the prior query tells me that our nameless species is “never/rarely” used as bait. Interesting! What is used as bait?

  SELECT DISTINCT * WHERE
  {?s <http://fishdelish.cs.man.ac.uk/rdf/vocab/resource/SPECIES_UsedasBait> ?o
  FILTER (?o != "never/rarely")}

Gives me a list of such species and, incidently, more values for the “UsedasBait” property.

This sort of spelunking can get tedious, after the initial thrill (thrill? well, I’ve been ill). Next post, I’ll explore whether the existing Linked Data browsers can do better.

UPDATE

Some of the URIs already changed! Woohoo! The queries are now updated.

I should also point out that the Query Demo does have a browsey feature. If you can get some output and the output has some URIs in it, then clicking that URI will generate a new query with the clicked URI as the subject and object of a UNION query, a la:

SELECT ?property ?hasValue ?isValueOf
WHERE {
  {  ?property ?hasValue }
  UNION
  { ?isValueOf ?property  }
}

This is a pretty good exploratory query, though I might add another disjunct with the clicked URI as the property.

I just wished the back button worked!

This entry was posted in 1 and tagged , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

One Trackback

  1. [...] fishDelish project have also just provided access to their FishBase species linked data, and the JISC OpenBibliography project expects to have data available soon as referred to in a [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>