In this presentation I will show why Linked Open Data is the best technique available to publish government data and how can you use LODSPeaKr, a simple kit for publishing Linked Data, to create from prototypes in minutes to Open Data Portals, APIs and mobile webapps.
1. Publishing
Linked Open Data
in 15 minutes
Alvaro Graves
Tetherless World Constellation
Rensselaer Polytechnic Institute
gravea3@rpi.edu
@alvarograves
1
2. Agenda
• How do we publish data?
• What is Linked Data ...
• ...and why should I care?
• Publishing using LODSPeaKr
• Conclusions
2
3. How do we publish data?
• Upload file on a web/ftp server as a dump
• Easy to publish
• Hard to find/use
• Export as a HTML page
• Easy to publish and find
• Very hard to use
• Publish as Linked Data
• (Not that) easy to publish
• Easy to use and find
3
4. What is Linked Data?
• Set of best practices (based on Semantic Web
technologies) to publish structured data on the Web
• Use of Web technologies (RDF, HTTP, URIs)
• Connect my data to other people’s data by links
4
5. What is Linked Data? (2)
http://logd.tw.rpi.edu/id/us/state/New_York rdfs:label New York
dcterms:identifier
NY
5
6. What is Linked Data? (2)
http://www.ny.gov
foaf:homepage
http://dbpedia.org/resource/New_York
owl:sameAs
dbpedia-owl:capital
http://dbpedia.org/resource/Albany,_New_York
http://logd.tw.rpi.edu/id/us/state/New_York rdfs:label New York
dcterms:identifier
NY
6
7. What is Linked Data? (3)
• When somebody lookup those URIs, provide useful
information
• HTML for humans
• RDF for machines
• Link to other relevant datasets so people can discover
more data
7
8. Why should I care?
• LOD makes it easier to access data by applications
• “Breaks the walls of data silos”, a Web of Data
• It also makes it easier to discover new data
• Easy integration of heterogeneous data
8
9. From Government Data to
Linked Open Goverment Data
fm:farmersMarket_4239 a fm:FarmersMarket ;
con:address implicit_address:address_4239 ;
dcterms:title "Troy Neighborhood Farmers Market - Downtown" ;
wgs:lat "-73.68599"^^xsd:decimal ;
State Name Address City Zipcode Lat Long
wgs:long "42.73168"^^xsd:decimal ;
Troy Neighborhood ov:csvRow "4239"^^xsd:integer .
New York Farmers Market - 6th Ave Troy 12180 -73.686 42.73168
Downtown
fm:farmersMarket_4243 a fm:FarmersMarket ;
The con:address implicit_address:address_4243 ;
Troy Neighborhood MarketPlace, Hill dcterms:title "Troy Waterfront Farmers Market" ;
New York Farmers Market- Little Street, btw Troy 12181 -73.6898 42.72478
Italy Washington & wgs:lat "-73.68942"^^xsd:decimal ;
Liberty Sts. wgs:long "42.73491"^^xsd:decimal ;
ov:csvRow "4243"^^xsd:integer .
Data Conversion
Publication Publication
Creation to RDF
Enhancements
9
10. Example: Data about farmers markets
State Name Address City Zipcode Lat Long
Troy Neighborhood
New York Farmers Market - 6th Ave Troy 12180 -73.686 42.73168
Downtown
The
Troy Neighborhood MarketPlace, Hill
New York Farmers Market- Little Street, btw Troy 12181 -73.6898 42.72478
Italy Washington &
Liberty Sts.
10
11. Conversion
• csv2rdf4lod
• Encodes data +
conversion process
• Replicable
conversions
• Google Refine
• Nice interface
• Easy to use 11
12. Example: Data about Farmers Markets
State Name Address City Zipcode Lat Long
Troy Neighborhood
New York Farmers Market - 6th Ave Troy 12180 -73.68599 42.73168
Downtown
The MarketPlace,
Troy Neighborhood Hill Street, btw
New York Troy 12181 -73.68983 42.72478
Farmers Market- Little Italy Washington &
Liberty Sts.
fm:farmersMarket_4239 a fm:FarmersMarket ;
con:address implicit_address:address_4239 ;
dcterms:title "Troy Neighborhood Farmers Market - Downtown" ;
wgs:lat "-73.68599"^^xsd:decimal ;
wgs:long "42.73168"^^xsd:decimal ;
ov:csvRow "4239"^^xsd:integer .
fm:farmersMarket_4243 a fm:FarmersMarket ;
con:address implicit_address:address_4243 ;
dcterms:title "Troy Waterfront Farmers Market" ;
wgs:lat "-73.68942"^^xsd:decimal ;
wgs:long "42.73491"^^xsd:decimal ;
ov:csvRow "4243"^^xsd:integer .
I can load it into a triple store. Now what?
12
13. LODSPeaKr
Simple kit for Publishing Linked Open Data
bash < <(curl http://lodspeakr.org/install)
13
14. LODSPeaKr
• Site running in 15
minutes
• Publish in different
formats (RDF/XML,
Turtle, RDFJSON, etc.)
• Highly customizable
using templates
• Facilitates data
exploration
14
17. ...But I want the raw data
$ curl http://graves.cl/farmersmarket/version/2010-Oct-22/farmersMarket_4239.rdf
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:ns0="http://purl.org/dc/terms/"
xmlns:ns1="http://www.w3.org/2000/10/swap/pim/contact#"
xmlns:ns2="http://www.w3.org/2003/01/geo/wgs84_pos#"
xmlns:ns3="http://open.vocab.org/terms/">
<rdf:Description rdf:about="http://graves.cl/farmersmarket/version/2010-Oct-22/
farmersMarket_4239">
<ns0:isReferencedBy rdf:resource="http://graves.cl/farmersmarket/version/2010-Oct-22"/>
<rdf:type rdf:resource="http://graves.cl/farmersmarket/vocab/FarmersMarket"/>
<ns1:address rdf:resource="http://graves.cl/farmersmarket/version/2010-Oct-22/
http_www_w3_org_2000_10_swap_pim_contact_address/address_4239"/>
<ns0:title>Troy Neighborhood Farmers Market - Downtown</ns0:title>
<ns2:lat rdf:datatype="http://www.w3.org/2001/XMLSchema#decimal">-73.68599</ns2:lat>
<ns2:long rdf:datatype="http://www.w3.org/2001/XMLSchema#decimal">42.73168</ns2:long>
<ns3:csvRow rdf:datatype="http://www.w3.org/2001/XMLSchema#decimal">4239.0</ns3:csvRow>
</rdf:Description>
</rdf:RDF>
Data available as RDFJSON, RDF/XML,
N-Triples and N3/Turtle
18. Use Linked Data to find more information
http://foo.com/a
owl:sameAs
http://bar.com/a
http://bar.com/a
owl:sameAs
http://yuu.com/a
http://foo.com/sparql
LODSPeaKr
http://bar.com/sparql
http://yuu.com/sparql
Final Page
18
19. Multiple queries from
multiple sources
Endpoint A Endpoint C
Endpoint F
LODSPeaKr
Endpoint B
Endpoint D
Final Page
19
21. SPECIAL URIs
• Sometimes is useful to create (exploratory)
documents not related to one specific URI
• Users can create their own using templating system
21
22. Conclusions
• It is possible to publish Linked Open Data in a
rapid, simple way
• From here it is possible to start creating webapps
based on Linked Open Data
• Open Data Portals
• Machine-readable APIs
• Mobile webapps
22
23. Future work
• Integrate LODSPeaKr with Drupal,
WordPress, etc.
• “A Framework for Linked Data apps”
• Comments, suggestions and bug reports
are welcome!
23
24. LODSpeaKr
http://lodspeakr.org
Farmers Market data
http://graves.cl/farmersmarket
gravea3@rpi.edu
@alvarograves
24