Use this file to discover all available pages before exploring further.
Session 1 of Going Meta (broadcast February 1, 2022) takes the British National Bibliography (BNB) — a rich, openly published RDF dataset from the British Library — and loads it into Neo4j using the neosemantics (n10s) plugin. Once the data is in the graph, Jesús walks through a set of practical questions answered with both Cypher and SPARQL, making it easy to compare the two query languages on identical problems with real data.
Go to the British Library downloads page and download the British National Bibliography (BNB) Books LOD in N-Triples format. Unzip the archive locally.
The BNB download contains numbered files. The snippet below imports files 101 through 149 in a single loop — adjust the absolute path to match your local download folder.
UNWIND range(101,149) AS idWITH "BNBLODB_202112_f" + substring(tostring(id),1) + ".nt" AS filenameCALL n10s.rdf.import.fetch( "file:///<absolute path to your downloads folder>/bnb/" + filename, "N-Triples") YIELD terminationStatus, triplesLoaded, triplesParsed, extraInfoRETURN filename, terminationStatus, triplesLoaded, triplesParsed, extraInfo;
MATCH (:Concept { label: "Crystallography" })<-[:subject]-(cb:Book)-[:creator]->(auth:Person)RETURN auth.label AS auth, count(DISTINCT cb.title) AS bookcount, collect(DISTINCT cb.title) AS booklistORDER BY bookcount DESC
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>PREFIX skos: <http://www.w3.org/2004/02/skos/core#>PREFIX dct: <http://purl.org/dc/terms/>PREFIX sch: <http://schema.org/>SELECT ?author (COUNT(DISTINCT ?title) AS ?count) (GROUP_CONCAT(DISTINCT ?title; SEPARATOR=", ") AS ?booklist)WHERE { ?crys a skos:Concept ; rdfs:label "Crystallography" . ?book dct:subject ?crys ; dct:title ?title ; dct:creator [ a sch:Person ; rdfs:label ?author ] .} ORDER BY DESC(?count)
MATCH (:Concept { label: "Crystallography" })-[:subject]-(b:Book)-[:subject]-(related:Concept:TopicLCSH)RETURN related.label AS relatedconcept, count(b) AS coocurenceORDER BY coocurence DESC
The co-occurrence pattern above finds SKOS concepts that share books with Crystallography. This is an informal measure of subject similarity and is a precursor to the semantic search techniques explored in Session 2.