Linked Open Data British Museum practical

authored by Frank Lynam at 01/12/2014 17:44:46


Get a list of all of the granodiorite sarcophagi in the British Museum collection. Find out where they were discovered and use the Google Maps Geocoding API to get the geo-coordinates (longitude, latitude, elevation) for these find spots.


  1. Go to the BM’s SPARQL endpoint at
  2. Enter the following query:

#Get all of the find locations of the granodiorite sarcophagi that are housed in the BM
PREFIX ecrm: <>
PREFIX skos: <>
PREFIX bmo: <>
SELECT ?s ?findDicoveryEventPlaceName { ?s bmo:PX_object_type ?objecttype. ?objecttype skos:prefLabel "sarcophagus". ?s ecrm:P45_consists_of ?material. ?material skos:prefLabel "granodiorite" . ?s ecrm:P12i_was_present_at ?findDiscoveryEvent . ?findDiscoveryEvent ecrm:P7_took_place_at ?findDicoveryEventPlace . ?findDicoveryEventPlace skos:prefLabel ?findDicoveryEventPlaceName . } LIMIT 100
  1. Read through and make sure that you understand the logic of the query.
  2. When satisfied, click <Submit> to run the query.
  3. Download the results as JSON data.
  4. Open up Google Refine (or OpenRefine).
  5. Create a new project using your JSON file as the source data.
  6. Follow the instructions on how to parse this JSON data correctly.
  7. Select the column that lists the discovery location place-names.
  8. Click on <Edit column>/<Add column by fetching URLs…>.
  9. Enter a name for your new column (this will store the geo-coordinates that correspond to your place-names).
  10. In the <Expression> field enter the following:

""+escape(value, "url")+"&key=[GMAPS API KEY]"
  1. Here you are going to have to fill in Google Maps API key in the place shown. You can get this by signing up to use the Google Maps API. You can do this at
  2. Once you have your API key, replace ‘[GMAPS API KEY]’ in the <Expression> field and click <OK> to start the Web API calls.
  3. All going well, your new column should be populated with a list of JSON data that correspond to the place-name of the row.


Further work

Parse the geo-coordinates into longitude, latitude and elevation values and plot these values on a map using Google Maps, OpenLayers or Leaflet.js.