Hands on exercises Dutch Ships and Sailors

Send any questions to Victor de Boer (v.de.boer at vu.nl)

This page (http://tinyurl.com/dh2015dsssparql) lists SPARQL Queries that you can test on a Dutch Ships and Sailors SPARQL Endpoint. There are two ClioPatria triple stores: one hosted at Huygens ING (http://dutchshipsandsailors.nl/data/) and one hosted at VU (http://semanticweb.cs.vu.nl/dss/). It is best to use the second one for this EXERCISE. On the web interface you can browse the data (through the menu item "Places"->"Graphs" or through the search box in the top right). For live SPARQL Queries you find a number of options under the "Query" menu This includes the great Yasgui interface with all kinds of query assistance or the simple form. I suggest using that one.

If you want to use an external tool for these queries (such as CURL or SPARQL for R), you should use the endpoint for machines which is at "/sparql/" (Don't forget the slash at the end ie. http://semanticweb.cs.vu.nl/dss/sparql/?query=PREFIX...).

The data

These following example queries work on the Dutch Asiatic Shipping subset of the DSS data. The dataset lists voyages of VOC ships in the 17th Century, including the ship, its name, the captain, date and place of departure and arrival. To get an overview over what is in this data, you can look at its main named graph in the ClioPatria interface or, more specifically at the list of predicates used in that graph. Another way is to look at an instance of a specific voyage, for example this one: http://purl.org/collections/nl/dss/das/voyage-5580_1.

Example queries and exercises

Below you will find the queries, which you can copy-paste into the interactive query fields. "#" denotes a comment. In between the examples there are a few open exercises to expand on the queries. For inspiration and checking syntax, you can look at a SPARQL tutorial or this page with SPARQL examples for statistical queries.

# EXERCISE 1: Find all distinct classes. What are these?

# EXERCISE 2: FIND all shiptypes in DAS. How many are there? What are there preferred labels (skos:prefLabel)?
# EXERCISE 3: Find all ship names of shiptypes with the word "hoeker" in the ship type name

Alternatively, you can also see this in the ClioPatria interface: http://semanticweb.cs.vu.nl/dss/browse/list_resource?r=http://sws.geonames.org/2745738/

#EXERCISE 4: What are the latitude/longitudes for the place of arrival of das:voyage-5087_1
#EXERCISE 5: How many "pinas" ships (type) sailed to an island (geonames featureCode http://www.geonames.org/ontology#T.ISL)


These queries are about another dataset in DSS: the Generale Zeemonsterrollen VOC or GZMVOC. It is related to the DAS set but this contains data about counting and payment of ships and sailors rather than the voyages. It also is in the Dutch language data. First have a look at one such counting through the CLioPatria interface: http://purl.org/collections/nl/dss/gzmvoc/telling-2240-De_Brugh. THis will show you the type of triples that GZMVOC contains.

# EXERCISE 6: For a GZMVOC record, get the number of people counted on board. Do this only for records of ships that sailed from "China" (Through the link with DAS)

# EXERCISE 7: For a GZMVOC record, get the number of people counted on board. Do this only for records of ships that sailed from "China" (Through the link with DAS)

Some links and further exercises


When you are finished or bored with these exercises, you can try to do SPARQL queries from an external tool. For example, the statistical package R has a nice library SPARQL which allows you to do queries and process the results for further analysis and visualisation. If you are familiar with R, as an exercise, get SPARQL for R running and do an interesting query on the DSS data. Then, process the results to derive statistical results or visualise in a graph (for example, visualise the wages of asiatic sailors vs non-asiatic in a bar chart). The links below should help you get started.

Talk of Europe Dataset and exercises

If you are interested in political data: A completely different dataset, plus nice exercises is presented in these Polimedia Tutorial slides.