Skip to content

Example: 5 star data timbl.png

Timothy Lebo edited this page Feb 14, 2012 · 67 revisions
csv2rdf4lod-automation is licensed under the [Apache License, Version 2.0](https://github.com/timrdf/csv2rdf4lod-automation/wiki/License)

Tim Berners-Lee uses a 5-star rating system to describe the transition from traditional data representations to Linked Data.

The ratings of his system are enumerated in a variety of places on the web, including:

Are the Linked Data principles available as Linked Data?

It is ironic that this fundamental aspect of the Linked Data is not available as Linked Data. We aim to resolve that problem by using it as an example for how to use csv2rdf4lod-automation.

The following content is featured at http://my.umbc.edu/news/4146:

5 star rating for linked data

Sadly, the content earns a mere "2-star" Linked Data rating (it is an image scan of a table).

Let's fix it, and get this important information into Linked Data!

Step 1: Cache the original data source.

pcurl.sh http://ebiquity.umbc.edu/blogger/wp-content/uploads/2010/12/5-star-data-timbl-e1293294319499.png

Step 2: Transcribe it into machine-readable structured data.

(first, a Google Spreadsheet - by typing like a monkey)

(next, a CSV)

pcurl.sh 'http://spreadsheets.google.com/tq?tqx=out:csv&tq=select%20*&key=tO0FEKaui02L9vAXsAZcZ8A' -n 5-star-data-timbl -e csv

Step 3: Create an RDF encoding using the (brain-dead) verbatim interpretation:

cr-create-convert-sh.sh -w source/5-star-data-timbl.csv
./convert-from-tables-to-5-star-linked-data.sh

Step 4: Specify interpretation parameters for a clean, enhanced interpretation:

Check out the conversion parameters in this github repository.

Step 5: Create a clean, enhanced interpretation:

./convert-from-tables-to-5-star-linked-data.sh

Step 6: Load the void:dataDump into a SPARQL endpoint:

publish/bin/virtuoso-load-ebiquity-umbc-edu-from-tables-to-5-star-linked-data-2011-Mar-08.sh

Step 7: Make sure the URIs are dereferencable with HTTP 303 redirects:

Dereference http://logd.tw.rpi.edu/source/ebiquity-umbc-edu/dataset/from-tables-to-5-star-linked-data/version/2011-Mar-08/rule_rating_2, then dereference http://logd.tw.rpi.edu/source/ebiquity-umbc-edu/dataset/from-tables-to-5-star-linked-data/version/2011-Mar-08/rule/rule_2.

Step 8: Query the SPARQL endpoint:

(results):

PREFIX dcterms:    <http://purl.org/dc/terms/>
PREFIX conversion: <http://purl.org/twc/vocab/conversion/>
PREFIX e1: 
<http://logd.tw.rpi.edu/source/ebiquity-umbc-edu/dataset/from-tables-to-5-star-linked-data/vocab/enhancement/1/>

SELECT ?rating ?description
WHERE {
  GRAPH 
  <http://logd.tw.rpi.edu/source/ebiquity-umbc-edu/dataset/from-tables-to-5-star-linked-data/version/2011-Mar-08> {
    ?rule_rating e1:rule [ dcterms:description ?description ];
                 e1:rating ?rating .
                
  }
} order by ?rating

Acknowledgments

  • J.W. Marriott and their beautiful hotel
  • Joanne Luciano wants her foaf URI here, but her document is currently a foaf:Person!

Another source!

Mug featuring TBL's 5-star Linked Data ratings

(results):

PREFIX dcterms:        
<http://purl.org/dc/terms/>
PREFIX ebiquity_vocab: 
<http://logd.tw.rpi.edu/source/ebiquity-umbc-edu/dataset/from-tables-to-5-star-linked-data/vocab/>
PREFIX e1:             
<http://logd.tw.rpi.edu/source/ebiquity-umbc-edu/dataset/from-tables-to-5-star-linked-data/vocab/enhancement/1/>

SELECT ?rating ?description ?terse
WHERE {
   GRAPH <http://logd.tw.rpi.edu/source/ebiquity-umbc-edu/dataset/from-tables-to-5-star-linked-data/version/2011-Mar-08> {
      [] e1:rule [ dcterms:description ?description ];
         e1:rating ?rating .
   }
   GRAPH <http://logd.tw.rpi.edu/source/cafepress-com/dataset/w3c-shop-480759174/version/2011-Mar-08> {
      [] e1:rule [ dcterms:description ?terse ];
         e1:rating ?rating .
   }
} order by ?rating desc(?description) desc(?terse)

Notes

@cygri - Indirectly, with dcat. You can state license and available formats. For the star #5 you can use VoID to state what it's linking to

See also

  • Examples of using csv2rdf4lod-automation to convert other third-party data sources to RDF.

Clone this wiki locally