Linked Vocabulary API for the Earth Sciences Community AGU Fall Meeting 2014 Stephan Zednik Peter...

24
Linked Vocabulary API for the Earth Sciences Community AGU Fall Meeting 2014 Stephan Zednik Peter Fox Linyun Fu Patrick West Xiaogang Ma

Transcript of Linked Vocabulary API for the Earth Sciences Community AGU Fall Meeting 2014 Stephan Zednik Peter...

Linked Vocabulary API for the Earth

Sciences CommunityAGU Fall Meeting 2014

Stephan ZednikPeter FoxLinyun FuPatrick WestXiaogang Ma

2

Background

The Coastal and Marine Spatial Planning Vocabularies (CMSPV) project focused on vocabulary and ontology development within the context of the Coastal and Marine Spatial Planning (CMSP) and Ocean and Coastal Mapping (OCM) portals for environmental inter-agency collaboration. The CMSP and OCM portals reference data tagged using a multitude of science vocabularies which have overlapping scopes.

3

The Vocabulary Problem

• Data from numerous agencies using numerous vocabularies

• Varying state of vocabulary – Representation

– Publication

– Usage

– Mapping

4

CMSPV Objectives

Address the need for a standard manner for agencies to publish and consume hierarchical vocabularies on the web• Vocabulary Representation Recommendations

– Use existing semantic vocabulary • Vocabulary Access Recommendations

– Open license– Non-proprietary format– Resolvable Identifiers

• Vocabulary Service Recommendations– Text-based search– Collections– Relationship inference

• Best-practices for mapping between vocabularies– Formally defined mapping– machine-readable

5

CMSPV Testbed Vocabulary

National Information Management Systems (NIMS) Data Categories

• Data categories for marine spatial planning

• Revised copy to be formally released under different name

• From Excel document

• 8 top-level categories

• 94 terms

6

Simple Knowledge Organization System

(SKOS)• Model for expressing concept

schemes in RDF• Low-cost solution for porting

existing knowledge organization systems to the Semantic Web

• Supports mapping between concept schemes

• W3C Recommendation (2009)• SKOS Primer - http://bit.ly/1Bi6Br3

7

SKOS Model

• Resources– Concept Scheme, Concepts

• Hierarchical relations– broader/narrower/related– broaderTransitive/narrowerTransitive

• Mapping relations– narrowMatch/broadMatch/relatedMatch/closeMatch/exactMatch

• Annotations– Labels– Documentation (e.g. definition, example, scope,

history note)

8

NIMS SKOS

### http://cmspv.tw.rpi.edu/rdf/vocab/nims/term/0043

term:0043 rdf:type owl:NamedIndividual , skos:Concept ; skos:prefLabel "Threatened and Endangered Species"@en ; skos:inScheme vocab:nims ; skos:narrower term:0044 , term:0100 .

### http://cmspv.tw.rpi.edu/rdf/vocab/nims/term/0044

term:0044 rdf:type owl:NamedIndividual , skos:Concept ; skos:prefLabel "State Listed Threatened and Endangered Species"@en ; skos:inScheme vocab:nims .

Linked Data

• Use URIs as names for things• Use HTTP URIs so people can look up

those names• When someone looks up a URI

provide useful information, using the standards (RDF*, SPARQL)

• Include links to other URIs so that they can discover more things

9

10

Epimorphics Linked Data API (ELDA)

• Easy-to-use web interface onto linked data

• User-defined (read-only) RESTful API over linked data resources

• Configurable– API URLs– Queries– Filters– Response Types (e.g. RDF, XML, JSON,

HTML)

11

Linked Vocabulary Architecture

12

Linked Vocabulary API

• URI base-template– /vocab/{vocab_id}/term/{term_id}– ex: /vocab/nims/term/0006

• Collections– /vocab/{vocab_id}/terms– /vocab/{vocab_id}/term/{term_id}/related

• Text-based Search– /vocab/{vocab_id}/terms?anyLabelContains={text}

• Mapping– /vocab/{vocab_id}/term/{term_id}/closeMatch

• For full API see http://bit.ly/12ztZnS

13

CMSPV HTML View

14

CMSPV Outcomes

• Recommendation– Publish vocabularies as Linked Open

Data using SKOS• Development of vocabulary service

– SKOS-based RESTful API– http://bit.ly/1IG8vGX

• Service hosting preliminary NIMS Data Categories Vocabulary– http://bit.ly/1zVd7To

15

Next Steps

• More vocabularies• Feedback from greater community• Vocabulary mapping in the wild!• Iterate on API (especially vocab

mapping)• Possible Research Data Alliance

(RDA) interest group on vocabulary services

16

Thanks

• CMSP/OCM Workshop• Epimorphics Ltd.• W3C SKOS Working Group

17

QUESTIONS/COMMENTS?

18

Links

• CMSPV Project Page– http://tw.rpi.edu/web/project/CMSPV

• CMSPV NIMS Linked Vocabulary API– http://cmspv.tw.rpi.edu/elda/cmspv/vocab/nims

• Linked Vocabulary API on Github– https://github.com/tetherless-world/linked-vocabulary-api

• W3C SKOS Primer– http://www.w3.org/TR/skos-primer/

• Linked Data – Design Issues– http://www.w3.org/DesignIssues/LinkedData.html

• Linked Data API Specification– https://code.google.com/p/linked-data-api/wiki/Specification

• ELDA on Github– https://github.com/epimorphics/elda

19

BACKUP SLIDES

20

CMSPV JSON{ "format" : "linked-data-api", "version" : "0.2", "result" : {"_about" : "http://cmspv.tw.rpi.edu/rdf/cmspv/vocab/nims/term/0006.json", "definition" : "http://cmspv.tw.rpi.edu/rdf/cmspv/meta/vocab/_vocabulary/term/_term.json", "extendedMetadataVersion" : "http://cmspv.tw.rpi.edu/rdf/cmspv/vocab/nims/term/0006.json?_metadata=all", "primaryTopic" : {"_about" : "http://cmspv.tw.rpi.edu/rdf/vocab/nims/term/0006", "inScheme" : {"_about" : "http://cmspv.tw.rpi.edu/rdf/vocab/nims", "prefLabel" : "NIMS Data Categories"} , "label" : ["Cultural and Historic"], "narrower" : [{"_about" : "http://cmspv.tw.rpi.edu/rdf/vocab/nims/term/0026", "prefLabel" : "Locations of Artifacts Reflecting US Maritime History"} , {"_about" : "http://cmspv.tw.rpi.edu/rdf/vocab/nims/term/0027", "prefLabel" : "Areas + Resources of Cultural Significance to Native Peoples"} , {"_about" : "http://cmspv.tw.rpi.edu/rdf/vocab/nims/term/0028", "prefLabel" : "Important View-sheds"} , {"_about" : "http://cmspv.tw.rpi.edu/rdf/vocab/nims/term/0029", "prefLabel" : "Historically Significant Properties"} , {"_about" : "http://cmspv.tw.rpi.edu/rdf/vocab/nims/term/0030", "prefLabel" : "Protected Areas"} ], "narrowerTransitive" : [{"_about" : "http://cmspv.tw.rpi.edu/rdf/vocab/nims/term/0026", "prefLabel" : "Locations of Artifacts Reflecting US Maritime History"} , {"_about" : "http://cmspv.tw.rpi.edu/rdf/vocab/nims/term/0027", "prefLabel" : "Areas + Resources of Cultural Significance to Native Peoples"} , {"_about" : "http://cmspv.tw.rpi.edu/rdf/vocab/nims/term/0028", "prefLabel" : "Important View-sheds"} , {"_about" : "http://cmspv.tw.rpi.edu/rdf/vocab/nims/term/0029", "prefLabel" : "Historically Significant Properties"} , {"_about" : "http://cmspv.tw.rpi.edu/rdf/vocab/nims/term/0030", "prefLabel" : "Protected Areas"} ], "prefLabel" : "Cultural and Historic", "semanticRelation" : [{"_about" : "http://cmspv.tw.rpi.edu/rdf/vocab/nims/term/0026", "prefLabel" : "Locations of Artifacts Reflecting US Maritime History"} , {"_about" : "http://cmspv.tw.rpi.edu/rdf/vocab/nims/term/0027", "prefLabel" : "Areas + Resources of Cultural Significance to Native Peoples"} , {"_about" : "http://cmspv.tw.rpi.edu/rdf/vocab/nims/term/0028", "prefLabel" : "Important View-sheds"} , {"_about" : "http://cmspv.tw.rpi.edu/rdf/vocab/nims/term/0029", "prefLabel" : "Historically Significant Properties"} , {"_about" : "http://cmspv.tw.rpi.edu/rdf/vocab/nims/term/0030", "prefLabel" : "Protected Areas"} ], "topConceptOf" : {"_about" : "http://cmspv.tw.rpi.edu/rdf/vocab/nims", "prefLabel" : "NIMS Data Categories"} , "type" : ["http://www.w3.org/2002/07/owl#NamedIndividual", "http://www.w3.org/2004/02/skos/core#Concept"]} , "type" : ["http://purl.org/linked-data/api/vocab#Page"]}}

21

SKOS (cont.)

22

5-Star Linked Open Data

★ Make your stuff available on the web (whatever format) under an open license

★★ Make it available as structured data (e.g. Excel instead of image scan of a table)

★★★ Use non-proprietary formats (e.g. CSV instead of Excel)

★★★★ Use URIs to denote things, so that people can point at your stuff

★★★★★ Link your data to other data to provide contexthttp://www.w3.org/DesignIssues/LinkedData.html

24

LDA Specification

lva:vocabularyTermsEndpoint a api:ListEndpoint ; rdfs:comment “…" ; api:uriTemplate "/vocab/{vocabulary}/terms" ; api:exampleRequestPath "/vocab/nims/terms" ; api:variable [ api:name "scheme" ; api:value "{base}/vocab/{vocabulary}" ; api:type rdfs:Resource ; ] ; api:selector [ api:where "?item skos:inScheme ?scheme. ?item skos:prefLabel ?label." ; api:orderBy "?label" ; ] ; .