PROD RDF

=About= 1) RDF files parse down to a bunch of facts that relate one object to another, statements like:

Tom | Is a friend of | James

Dick | A support person for | Mongoose

Mongoose | Is a | Project

Can access live RDF at http://prod.cetis.ac.uk/projects/ .rdf

See a live example at: http://prod.cetis.ac.uk/projects/viewpoints.rdf you should see the underlying data that is used to make up the human readable version of the page.

2) Every part of the triple has a URI

3) RDF Models can be merged and RDF exchanged over HTTP so that applications can be coupled to many different data sources from all over the web.

=Talis= PROD RDF is stored at: http://api.talis.com/stores/jisc-prod-dev1

Why Talis store:
 * Provides storage for data
 * Provides query interfaces for that data
 * Queries can be resource intensive

Things to remember:
 * Data is not live, updates at prod.cetis.ac.uk do not take effect straight away.
 * It is a development store!
 * Read and play more! API is at http://docs.api.talis.com/platform-api

SPARQL
SPARQL is a language for querying linked data sets, it pulls data from structured and semi-structured data. A SPARQL endpoint enables users to query a knowledge base. A SPARQL end point to PROD is available at: http://api.talis.com/stores/jisc-prod-dev1/services/sparql

Examples
SPARQL variables start with a ? and can match any node (resource or literal) in the RDF dataset.


 * Example 1) Find me all comments (?comments) in the PROD dataset


 * Head to http://api.talis.com/stores/jisc-prod-dev1/services/sparql
 * Copy and paste the following:

PREFIX foaf:  PREFIX prod:  SELECT ?object WHERE { ?subject prod:comment ?object. }


 * expand the query to return authors:

PREFIX foaf:  PREFIX prod:  PREFIX dc:  SELECT * WHERE { ?subject prod:comment ?comment. ?subject dc:author ?author. }


 * find comments from a particular author:

PREFIX foaf:  PREFIX prod:  PREFIX dc:  SELECT * WHERE { ?subject prod:comment ?comment. ?subject dc:author "dms2ect" }

PREFIX foaf:  PREFIX prod:  PREFIX dc:  PREFIX doap:  SELECT ?technology ?projectname WHERE { ?relationship prod:technology ?technology. ?relationship doap:Project ?project. ?project doap:name ?projectname. }
 * Example 2) Find me all technologies (?technology) and the projects (?projectname) in the PROD dataset
 * Head to http://api.talis.com/stores/jisc-prod-dev1/services/sparql
 * Copy and paste the following:


 * Find technologies in projects in a particular programme

PREFIX foaf:  PREFIX prod:  PREFIX dc:  PREFIX doap:  SELECT ?technology ?projectname WHERE { ?relationship prod:technology ?technology. ?relationship doap:Project ?project. ?project doap:name ?projectname. ?project prod:programme "Curriculum Delivery". }


 * Get the technologies projects in a particular programme in csv format
 * Head to http://data-gov.tw.rpi.edu/ws/sparqlproxy.php
 * In the SPARQL service box put: http://api.talis.com/stores/jisc-prod-dev1/services/sparql
 * Make sure CSV is ticked and in the SPARQL query box copy and paste:

PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX prod: <http://prod.cetis.ac.uk/vocab/> PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX doap: <http://usefulinc.com/ns/doap#> SELECT ?technology ?projectname WHERE { ?relationship prod:technology ?technology. ?relationship doap:Project ?project. ?project doap:name ?projectname. ?project prod:programme "Curriculum Delivery". }


 * For a CSV click query then File->save projects.csv :)
 * Copy and paste the URL
 * Open a GoogleDocs spreadsheet and in row A1 : =importData("URL")


 * Example 3) Geographical position of projects from the FSD programme that use Archimate

This one uses not just PROD data, it also uses an rdf version of the data held by the JISC Monitoring Unit. That rdf set is also in the PROD data store at Talis. To get an idea what a JISC MU organisational record looks like, put the following in a SPARQL client:

DESCRIBE <http://data.jiscmu.ac.uk/rest/organisations/id/515>

A nice human version is available here: http://www.jiscmu.ac.uk/organisations/view/515

Here's the sparql query that will grab projects, their name, then whittles them down to those in the FSD programme, then extracts the university that managed the project, then grabs the comments associated with the project, and specifically those that are about Archimate. Then the query looks up the freebase identifier (?fbID) that we use for mappings. Then we look up the JISC MU ID (?muID) that corresponds to the freebase ID, then we get the geo lat and long attributes from the JISC MU record.

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX dc:  <http://purl.org/dc/elements/1.1/> PREFIX prod: <http://prod.cetis.ac.uk/vocab/> PREFIX doap: <http://usefulinc.com/ns/doap#> PREFIX mu:  <http://www.jiscmu.ac.uk/schema/muweb/> PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> SELECT DISTINCT ?projectName ?lat ?long WHERE { ?project a doap:Project. ?project doap:name ?projectName. ?project prod:programme "Flexible Service Delivery". ?project doap:vendor ?uni. ?relation doap:Project ?project. ?relation prod:technology <http://prod.cetis.ac.uk/standard/Archimate>. ?uni owl:sameAs ?fbID. ?muID owl:sameAs ?fbID. ?muID geo:lat ?lat. ?muID geo:long ?long. }

If you get the sparql client to output CSV, you can stick that into a Google Spreadsheet (see above). In the Google Spreadsheet, insert a Google Map gadget, and give it all three columns as a range.

Tools for Visualisation
MooWheel Javascript library for showing connections between nodes highcharts

[http://prod.cetis.ac.uk/visualisation/demo/moowheel/large.html Example 2 With Moowheels Example 1 with highcharts
 * Very quick demos I did with these tools:

=Links=

Google Refine http://code.google.com/p/google-refine/

sparqlproxy Web Service http://data-gov.tw.rpi.edu/ws/sparqlproxy.php

SPARQL By Example: http://www.cambridgesemantics.com/2008/09/sparql-by-example/

OpenLink Virtuoso SPARQL Query: http://demo.openlinksw.com/sparql

RDF Gravity http://semweb.salzburgresearch.at/apps/rdf-gravity/download.html