Talis Logo

Practical Exercises for A Two Day Introduction to the Web of Data

These exercises accompany the training material found here.

Practical exercises are an essential aspect of learning any new technology. This page provides some introductory level practical exercises that will take you through the six main steps in creating and publishing linked data:

  1. Modelling Data using RDF
  2. Writing RDF using Turtle, and choosing URIs for things
  3. Creating an RDF Schema
  4. Converting Data into RDF
  5. Publishing RDF Data into a Triple Store
  6. Querying Data using SPARQL

These exercises are all based on space flight data published by the NASA Space Science Data Center as part of their Master Catalog.

A word about text editors

Most of these exercises will require a text editor. You may have Notepad on your Windows machine, but you may find that an editor that supports syntax highlighting will allow you to see where you have gone wrong more easily (though of course we know you will get it right first time!). You might find an online editor that understands turtle/n3 to be of use: http://buzzword.org.uk/2010/n3edit/

A couple of free text editors in no particular order:

You may also find it useful to dump your sparql queries and answers to a text file so that you have a record of your progress, as an aid memoir.

Exercise 1: Modelling Data using RDF

In this exercise you will model some space flight data using the core RDF model.

Assignment

Draw an RDF graph showing the resources being described in the following web pages:

Suggested Approach

Exercise 2: Writing RDF using Turtle, and choosing URIs for things

In this exercise you will learn to write your model down in a machine-readable format called Turtle.

Assignment

Take the RDF graph you drew in Exercise 1 and write the statements down using Turtle.

Suggested Approach

Exercise 3: Describing your data with RDF Schema

In this exercise you will create an RDF Schema to describe your space model.

Assignment

Starting with the model you created in Exercises 1 and 2, write an RDF Schema to describe the properties and classes you are defining.

Suggested Approach

Exercise 4: Linking to existing data

The purpose of this exercise is to understand how to link your data to the web of data.

Assignment

Using the model you created in Exercises 1, 2 and 3, take your sample data set and:

Suggested Approach

Exercise 5: Publishing RDF Data using a Triple Store

In this exercise you will publish the data from Exercise 4 into a triple store.

Assignment

Using the data you converted in Exercise 4, publish this data into the training-exercises store on the Talis Platform.

Suggested Approach

Sample upload command:

curl --digest -u USER:PASS -H content-type:application/rdf+xml -d @file.rdf.xml http://api.talis.com/stores/training-exercises/meta

Exercise 6: Querying the Data

In this exercise you will write queries against an example model built from the NASA data. You can browse through the data at the space linked data incubator.

Assignment

Use this basic SPARQL editor to execute queries that answer these questions:

  1. What properties are in use in the space data?
  2. What classes are in use in the space data?
  3. Are there are any resources that have an rdf:type of http://purl.org/net/schemas/space/Discipline?
  4. Which resources have an rdf:type of http://purl.org/net/schemas/space/Discipline?
  5. DESCRIBE one of the resources that you found in the previous question
  6. What are the labels of the Disciplines?
  7. What are the URIs, international designators and names of all spacecraft associated with the "Planetary Science" discipline?
  8. What are the names and masses of all of the spacecraft associated with the launch http://nasa.dataincubator.org/launch/1969-059?
  9. What are the names of all the launch vehicles?
  10. Which space agencies have launched Spacecraft in the "Human Crew" discipline?
  11. What was the mass of the heaviest spacecraft launched in the "Human Crew" discipline?
  12. What was the mass of the lightest spacecraft launched in the "Human Crew" discipline?