Enhancing Library Discovery with
Linked Open Data

code{4}lib 2018

Steve Meyer, Data Strategist, UW-Madison Libraries


A Little Context


Sample URLs

Catalog Enhanced with Linked Data:

Example In Context

Gergrude Stein on Picasso - UW-Madison Catalog

Systems in Play

System/Data Source Role Description/Relevant Pieces
Local Catalog User Interface
  • Ruby on Rails + Solr web app
  • Client of Alma APIs
    circ availability, request functionality, etc.
  • Think Blacklight/VuFind
Alma Resource Management Platform
  • JSON-LD bibliographic data API
  • JSON-LD API returns entity URIs
    based on LCNAF authority control
Virtual International Authority File
Identity Hub
  • Inbound: resolve Person data from LCNAF IDs
  • Outbound: Person entities link to other data
    related resources/entities on Web
Getty Vocabularies Linked Open Data source Contains cited entity descriptions
DBpedia Linked Open Data source Linked Data descriptions from Wikipedia info
Wikidata Linked Open Data source
  • Linked Data descriptions from Wikipedia info
  • Contains cited entity descriptions

Bibliographic Identity Crawl

High level diagram for crawling bibliographic data


Linked Data Classifieds

URI Want Ads

Looking for Love

LCNAF URI seeking VIAF companion. Non-smoker. Must be schema:sameAs compatible. owl:sameAs a plus. Looking for care-free companionship. Love nature, painting, abstraction.

Travel With Me!

VIAF URI seeking DBpedia companion. Must be owl:sameAs compatible. schema:sameAs should not contact. Let's travel the world wide web together.

VIAF as an Entity Hub

Subject <http://viaf.org/viaf/15873>
Predicate <http://schema.org/sameAs>
Object <http://dbpedia.org/resource/Pablo_Picasso>

Again. Again. Again.

Until all 3 Linked Open Data source URIs are found
  1. <http://vocab.getty.edu/ulan/500009666-agent>
  2. <http://www.wikidata.org/entity/Q5593>
  3. <http://dbpedia.org/resource/Pablo_Picasso>

Crawl or Query?

Method Pros Cons
  • Simple HTTP requests to fetch data
  • Keep data processing based in RDF triples

Each response only references related entities by URI
Related data requires subsequent HTTP requests


A few queries encapsulate all required data to
significantly reduce number of HTTP requests

Introduces complexity in the form of:

  • Another technology, SPARQL
  • Results processing taken out of flow of RDF/triples


Browse View
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dbo: <http://dbpedia.org/ontology/>

SELECT ?influenced ?influencedGivenName ?influencedSurname ?influencedSameAs
    <http://dbpedia.org/resource/Pablo_Picasso> dbo:influenced ?influenced .
    ?influenced dbo:influencedBy <http://dbpedia.org/resource/Pablo_Picasso> .
  ?influenced foaf:givenName ?influencedGivenName .
  ?influenced foaf:surname ?influencedSurname .
    ?influenced owl:sameAs ?influencedSameAs .
    FILTER regex(STR(?influencedSameAs), "viaf.org").

Crawl vs. Query Comparison

Picasso's influence according to DBpedia

  • SPARQL query: 1 HTTP request
  • HTTP Crawl: 54 HTTP requests
    • Initial HTTP request for primary subject
    • 1 HTTP request per influence related entity
      Picasso was an influence upon 53 other entities in DBpedia


https://github.com/UW-Madison-Library/bibcard-demo BibCard README

BibCard Core Responsibilities

  1. Fetch data that can be cached
  2. Instantiate Person object

1) Fetch Cacheable Data

# Given an LCNAF or VIAF URI,
# Resolve the related URIs,
# Query for relevant data points,
# Return a micrograph
data = BibCard.person_data("http://id.loc.gov/authorities/names/n78086005")

puts data

# <http://viaf.org/viaf/15873> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Person> .
# <http://viaf.org/viaf/15873> <http://schema.org/deathDate> "1973-04-09" .
# <http://viaf.org/viaf/15873> <http://schema.org/sameAs> <http://id.loc.gov/authorities/names/n78086005> .
# ...


A small heterogeneous collection of RDF triples from multiple sources

<http://viaf.org/viaf/85312226> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Person> .
<http://viaf.org/viaf/85312226> <http://schema.org/name> "Tim Berners-Lee"@en .
<http://viaf.org/viaf/85312226> <http://schema.org/birthDate> "1955-06-08" .
<http://viaf.org/viaf/85312226> <http://schema.org/sameAs> <http://dbpedia.org/resource/Tim_Berners-Lee> .
<http://viaf.org/viaf/85312226> <http://schema.org/sameAs> <http://www.wikidata.org/entity/Q80> .
<http://dbpedia.org/resource/Tim_Berners-Lee> <http://dbpedia.org/ontology/influencedBy> <http://dbpedia.org/resource/Paul_Otlet> .
<http://dbpedia.org/resource/Tim_Berners-Lee> <http://dbpedia.org/ontology/influencedBy> <http://dbpedia.org/resource/Jon_Postel> .
<http://dbpedia.org/resource/Tim_Berners-Lee> <http://dbpedia.org/ontology/abstract> "Professor Sir Timothy John Berners-Lee, OM, KBE, FRS, FREng, FRSA, DFBCS (born 8 June 1955), also known as TimBL, is an English computer scientist, best known as the inventor of the World Wide Web. He made a proposal for an information management system in March 1989, and he implemented the first successful communication between a Hypertext Transfer Protocol (HTTP) client and server via the Internet sometime around mid-November of that same year.Berners-Lee is the director of the World Wide Web Consortium (W3C), which oversees the Web's continued development. He is also the founder of the World Wide Web Foundation, and is a senior researcher and holder of the Founders Chair at the MIT Computer Science and Artificial Intelligence Laboratory (CSAIL).He is a director of the Web Science Research Initiative (WSRI), and a member of the advisory board of the MIT Center for Collective Intelligence.  In 2011 he was named as a member the Board of Trustees of the Ford Foundation.In 2004, Berners-Lee was knighted by Queen Elizabeth II for his pioneering work. In April 2009, he was elected a foreign associate of the United States National Academy of Sciences. He was honoured as the \"Inventor of the World Wide Web\" during the 2012 Summer Olympics opening ceremony, in which he appeared in person, working with a vintage NeXT Computer at the London Olympic Stadium. He tweeted \"This is for everyone\", which instantly was spelled out in LCD lights attached to the chairs of the 80,000 people in the audience." .
<http://dbpedia.org/resource/Paul_Otlet> <http://xmlns.com/foaf/0.1/givenName> "Paul" .
<http://dbpedia.org/resource/Paul_Otlet> <http://xmlns.com/foaf/0.1/surname> "Otlet" .
<http://dbpedia.org/resource/Paul_Otlet> <http://www.w3.org/2002/07/owl#sameAs> "http://viaf.org/viaf/54277595" .
<http://dbpedia.org/resource/Jon_Postel> <http://xmlns.com/foaf/0.1/givenName> "Jon" .
<http://dbpedia.org/resource/Jon_Postel> <http://xmlns.com/foaf/0.1/surname> "Postel" .
<http://www.wikidata.org/entity/Q80> <http://www.wikidata.org/prop/direct/P69> <http://www.wikidata.org/entity/Q73094> .
<http://www.wikidata.org/entity/Q80> <http://www.wikidata.org/prop/direct/P69> <http://www.wikidata.org/entity/Q5369138> .
<http://www.wikidata.org/entity/Q80> <http://www.wikidata.org/prop/P69> <http://www.wikidata.org/entity/statement/q80-166977F2-448C-48BB-B4B1-C14A3714DE82> .
<http://www.wikidata.org/entity/Q80> <http://www.wikidata.org/prop/P69> <http://www.wikidata.org/entity/statement/Q80-E892C384-4E42-4E6E-9A3D-6E6FE3201954> .
<http://www.wikidata.org/entity/Q80> <http://schema.org/description> "Web developer" .
<http://www.wikidata.org/entity/Q80> <http://www.wikidata.org/prop/direct/P937> <http://www.wikidata.org/entity/Q42944> .
<http://www.wikidata.org/entity/Q73094> <http://www.w3.org/2000/01/rdf-schema#label> "The Queen's College" .
<http://www.wikidata.org/entity/statement/q80-166977F2-448C-48BB-B4B1-C14A3714DE82> <http://www.wikidata.org/prop/statement/P69> <http://www.wikidata.org/entity/Q73094> .
<http://www.wikidata.org/entity/Q5369138> <http://www.w3.org/2000/01/rdf-schema#label> "Emanuel School" .
<http://www.wikidata.org/entity/statement/Q80-E892C384-4E42-4E6E-9A3D-6E6FE3201954> <http://www.wikidata.org/prop/statement/P69> <http://www.wikidata.org/entity/Q5369138> .
<http://www.wikidata.org/entity/Q42944> <http://www.w3.org/2000/01/rdf-schema#label> "European Organization for Nuclear Research" .
Info card for Tim Berners-Lee

2) Instantiate Code Objects

Instantiating a BibCard::Person

Pseudo Code: instantiate a BibCard::Person within a Rails app & using Rails' caching

Ruby Spira

"The name is from Latin, for 'breath of life'--it's time to give those resource URIs some character." - Spira: A Linked Data ORM for Ruby

"Spira is a framework for using the information in RDF.rb repositories as model objects."

- github.com/ruby-rdf/spira

Using Spira Objects in View Code

Web app view code for rendering HTML for a person's alma maters Web application view code for rendering HTML for a person's alma maters

Spira Model Objects

Intended to look similar to Rails ActiveRecord associations

Closing Thoughts:
How come this is even possible?

  • Authority file data was well positioned to be Linked Data
  • Major library systems players are cooperating
    Vendors, Maintainers of National and/or Union Catalogs
  • Well established, flexible technology patterns
    caching, async web apps, object models
  • Having a major data hub in VIAF

Contact Info


Image Credits

Man With Mustache Seeks Love Matt Niemi Attribution, Non-Commercial, No Derivatives
Breath of Life KellyB. Attribution
an open book kate hiscock Attribution