Bringing (some) joy to a library catalogue

  • 🇨🇦 Music & Belonging in Canada @ 150 project
  • A proof of concept for Why?
  • One small JavaScript file dropped into an Evergreen library catalogue
  • Example: 1985 Juno Awards Collection

Dan Scott (@denials), Laurentian University

SELECT DISTINCT ?item ?itemLabel ?itemDescription ?image
  ?birthPlace ?birthPlaceLabel ?website
  ?musicbrainz ?songKick ?twitter ?facebook 
WHERE { 
    ?item rdfs:label|skos:altLabel|wdt:P1449 "' + entity_name + '"@en . 
    { ?item (wdt:P31/wdt:P279*) wd:Q215380 }
  UNION 
    { ?item (wdt:P106/wdt:P279*) wd:Q639669 } 
  OPTIONAL { ?item wdt:P3478 ?songKick } . 
  OPTIONAL { ?item wdt:P19 ?birthPlace } . 
  OPTIONAL { ?item wdt:P856 ?website } . 
  OPTIONAL { ?item wdt:P434 ?musicbrainz } . 
  OPTIONAL { ?item wdt:P2002 ?twitter } . 
  OPTIONAL { ?item wdt:P2013 ?facebook } . 
  OPTIONAL { ?item wdt:P18 ?image } . 
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } 
} 
LIMIT 10

Limitations (MANY)

  • Matches only on exact name
    • Add QIDs to our records
  • Leaps/links of faith!
    • Run lookups on page load; hide icon if no result
  • Hard-coded UI (language, HTML elements)
    • Be smart!

More at https://coffeecode.net/enriching-catalogue-pages-in-evergreen-with-wikidata.html

Dan Scott (@denials), Laurentian University