8

Click here to load reader

DHWI Linked Open Data - What I Did

Embed Size (px)

DESCRIPTION

Some of the exercises we did during a week-long class on "Publishing and Using Linked Open Data" at the University of Maryland Digital Humanities Winter Institute.

Citation preview

Page 1: DHWI Linked Open Data - What I Did

Digital Humanities Winter Institute

Publishing and Using Linked Open Data January 7-11, 2013

http://mith.umd.edu/dhwiwiki/index.php/DHWI_Wiki:Publishing_and_Using_Linked_Open_Data Syllabus with readings: http://lod4h.pbworks.com/w/page/58948790/DHWI_Syllabus

What I Did

Kindly note: This is all just practice and play. None of this is real.

Georgina Goodlander @bathlander

Page 2: DHWI Linked Open Data - What I Did

Brought some sample museum data

Page 3: DHWI Linked Open Data - What I Did

Cleaned it up in Open Refine, assigned URIs

Split display names into first and last names, cleaned up dates, converted fractions to decimals, split dimensions into separate columns then put them back together again, trimmed white spaces. GERL to combine columns for dimensions (very impressed that I wrote this): if(isBlank(cells["Dimensions"].value), "0", cells["Dimensions"].value) + " x " + if(isBlank(cells["Width in inches"].value), "0", cells["Width in inches"].value) + " x " + if(isBlank(cells["Depth in inches"].value), "0", cells["Depth in inches"].value)

Page 4: DHWI Linked Open Data - What I Did

Assigned properties (foaf, dcterms, dc)

Page 5: DHWI Linked Open Data - What I Did

Exported as RDF/XML

<?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dcterms="http://purl.org/dc/terms/"> <rdf:Description rdf:about="http://americanart.si.edu/objects2011.25.2"> <foaf:name>Felrath Hines</foaf:name> <foaf:givenName>Felrath</foaf:givenName> <foaf:familyName>Hines</foaf:familyName> <dcterms:identifier>2011.25.2</dcterms:identifier> <dcterms:title>Abstract Landscape</dcterms:title> <dcterms:medium>oil on linen</dcterms:medium> <dc:date>1964</dc:date> <dcterms:rights>Gift of Dorothy C. Fisher, wife of the artist</dcterms:rights> <dcterms:extent>72 x 72 x 0.875</dcterms:extent> </rdf:Description>

Page 6: DHWI Linked Open Data - What I Did

Imported into Sesame

At this point the data is published and link-able, but not yet linked to other data sets. It is also important to publish under an open license, such as CC0.

Page 7: DHWI Linked Open Data - What I Did

Ran SPARQL Queries SELECT ?familyName WHERE { ?s foaf:familyName ?familyName . } ORDER BY ASC(?familyName) SELECT ?title WHERE { ?s dcterms:title ?title . ?s dcterms:medium ?medium . FILTER (regex (?medium, "oil", "i")) } SELECT ?familyName ?objectid ?date WHERE { ?s foaf:familyName ?familyName . ?s dcterms:identifier ?objectid . ?s dc:date ?date . FILTER (?date > "1950") . }

Returns all family names in ascending order

Returns all titles for artworks that have “oil” in the medium

Returns family names, object IDs, and dates for works made after 1950

Page 8: DHWI Linked Open Data - What I Did

Helpful Resources

Links from the Instructor, Richard Urban: http://www.diigo.com/user/musebrarian/dhwi_example Cool URIs: http://www.w3.org/TR/cooluris RDF validator: http://rdfabout.com/demo/validator/ Semantic web stack: http://en.wikipedia.org/wiki/Semantic_Web_Stack Protege Ontology Editor: http://protege.stanford.edu Foaf: http://xmlns.com/foaf/spec/20100809.html SKOS: www.w3.org/2004/02/skos/vocabs Dublin Core: http://purl.org/dc/terms/ SPARQL Examples: http://MITH.umd.edu/dhwiwiki/index.php/SPARQL_Examples More SPARQL: http://www.w3.org/TR/rdf-sparql-query/#tests Even more SPARQL: http://www.w3.org/2009/Talks/0615-qbe/ SPARQL endpoint for Dbpedia: http://DBPedia.org/snorql Using GERL functions: http://code.google.com/p/google-refine/wiki/GRELStringFunctions Publishing Linked Open Data (table): http://linkeddatabook.com/editions/1.0/#htoc61 Dbpedia ontologies mapping: http://mappings.dbpedia.org/server/ontology/classes/ Creative Commons 0: creativecommons.org/choose/zero GLAM open data sets: http://datahub.io/group/open-glam