NFDI4Culture Data Story

EXAMPLE 03: Inscriptions

SUBTITLE

Author: Author
Persistent Identifier: LINK
Metadata: LINK
License: CC-BY 4.0

Introductory Image

caption

Abstract: TEXT


Introduction


Research questions

Wir wollen wissen, wieviele Inschriften es überhaupt gibt.

Dazu haben wir folgende SPARQL-QUERY geschrieben

Wir suchen nach einem source-Item (CTO_0001005), das is about real world entity CTO_0001025 vom rdf:type cidoc-crm/E34_Inscription


First

Show SPARQL query
query-inscription-count.rq
1
2
3
4
5
6
7
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX cto: <https://nfdi4culture.de/ontology/>
SELECT (COUNT(?sub) AS ?inscriptionCount) WHERE {
  ?sub a cto:CTO_0001005 ;
  cto:CTO_0001025/rdf:type <http://www.cidoc-crm.org/cidoc-crm/E34_Inscription> .
}

Second

Um zu verstehen, welche Informationen in einem inscription ITEM sind, laden wir uns eine Resource:

Show SPARQL query
query-inscription-details
1
2
3
4
5
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT * WHERE {
  <https://lod.academy/epidat/id/sb5-100> ?pred ?obj .
} 

Third

Mit welchem Ort ist die Inscription verbunden?

Show SPARQL query
place-inscription
1
2
3
4
5
6
7
8
9
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?locationExtId WHERE {
  <https://lod.academy/epidat/id/sb5-100> ?pred ?obj ;
                                          <https://nfdi4culture.de/ontology/CTO_0001011>/<https://nfdi.fiz-karlsruhe.de/ontology/NFDI_0001006>

 ?locationExtId.

} 

Fourth

Welche Inschriften gibt es außerdem an dem Ort?

Show SPARQL query
place-inscription-neunkirchen
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX cto: <https://nfdi4culture.de/ontology/>
PREFIX nfdicore: <https://nfdi.fiz-karlsruhe.de/ontology/>
SELECT DISTINCT ?sub ?label WHERE {
  ?sub a cto:CTO_0001005 .
  ?sub cto:CTO_0001025/rdf:type <http://www.cidoc-crm.org/cidoc-crm/E34_Inscription> .
  ?sub <https://nfdi4culture.de/ontology/CTO_0001011>/<https://nfdi.fiz-karlsruhe.de/ontology/NFDI_0001006> <https://vocab.getty.edu/tgn/1040470> .
  ?sub rdfs:label ?label .
  FILTER (lang(?label) = 'en')

} 

Five

Für welche Orte sind Personen bekannt?

Show SPARQL query
place-person
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX cto: <https://nfdi4culture.de/ontology/>
PREFIX nfdicore: <https://nfdi.fiz-karlsruhe.de/ontology/>
SELECT DISTINCT ?location WHERE {
  ?sub a cto:CTO_0001005 .
  ?sub cto:CTO_0001025/rdf:type <http://www.cidoc-crm.org/cidoc-crm/E34_Inscription> .
  ?sub <https://nfdi4culture.de/ontology/CTO_0001011>/<https://nfdi.fiz-karlsruhe.de/ontology/NFDI_0001006> ?location .
  ?sub <https://nfdi4culture.de/ontology/CTO_0001009>/<https://nfdi.fiz-karlsruhe.de/ontology/NFDI_0001006>  ?person .
  ?sub rdfs:label ?label .
  FILTER (lang(?label) = 'en')

}

Six

Welche Personen (externen IDs) sind mit Frankfurt verknüpft?

Show SPARQL query
place-person
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX cto: <https://nfdi4culture.de/ontology/>
PREFIX nfdicore: <https://nfdi.fiz-karlsruhe.de/ontology/>
SELECT DISTINCT ?person WHERE {
  ?sub a cto:CTO_0001005 .
  ?sub cto:CTO_0001025/rdf:type <http://www.cidoc-crm.org/cidoc-crm/E34_Inscription> .
  ?sub <https://nfdi4culture.de/ontology/CTO_0001011>/<https://nfdi.fiz-karlsruhe.de/ontology/NFDI_0001006> <https://vocab.getty.edu/tgn/7005293> .
  ?sub <https://nfdi4culture.de/ontology/CTO_0001009>/<https://nfdi.fiz-karlsruhe.de/ontology/NFDI_0001006>  ?person .
  ?sub rdfs:label ?label .
  FILTER (lang(?label) = 'en')

} 

Seven

Zeige mir die Label der Personen aus Wikidata an

Show SPARQL query
place-person
PREFIX wdtn: <http://www.wikidata.org/prop/direct-normalized/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX schema: <http://schema.org/>
PREFIX n4c: <https://nfdi4culture.de/id/>
PREFIX cto: <https://nfdi4culture.de/ontology/>
PREFIX nfdicore: <https://nfdi.fiz-karlsruhe.de/ontology/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

SELECT DISTINCT ?person ?wikidataIDPersonLabel WHERE {
  ?sub a cto:CTO_0001005 .
  ?sub cto:CTO_0001025/rdf:type <http://www.cidoc-crm.org/cidoc-crm/E34_Inscription> .
  ?sub <https://nfdi4culture.de/ontology/CTO_0001011>/<https://nfdi.fiz-karlsruhe.de/ontology/NFDI_0001006> <https://vocab.getty.edu/tgn/7005293> .
  ?sub <https://nfdi4culture.de/ontology/CTO_0001009>/<https://nfdi.fiz-karlsruhe.de/ontology/NFDI_0001006>  ?person .
  ?sub rdfs:label ?label .
  FILTER (lang(?label) = 'en')
  BIND(REPLACE(STR(?person), "^.*/", "") AS ?personGNDid)
    SERVICE <https://query.wikidata.org/sparql> {
    ?wikidataIDPerson wdt:P227 ?personGNDid .
    OPTIONAL { ?wikidataIDPerson rdfs:label ?wikidataIDPersonLabel . FILTER(lang(?wikidataIDPersonLabel) = "en" || lang(?wikidataIDPersonLabel) = "mul") }
  }

} 

Eight

Zeige mir dien Lebensweg von Yair Bacharch

Show SPARQL query
place-person
PREFIX wdtn: <http://www.wikidata.org/prop/direct-normalized/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX schema: <http://schema.org/>
PREFIX n4c: <https://nfdi4culture.de/id/>
PREFIX cto: <https://nfdi4culture.de/ontology/>
PREFIX nfdicore: <https://nfdi.fiz-karlsruhe.de/ontology/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX bd: <http://www.bigdata.com/rdf#>

SELECT
?headstone
?headstoneLabel
#?headstoneLocation
#?wikidataIDheadstoneLocation
?wikidataIDheadstoneLocationLabel
?headstoneDate
?headstoneYear
?wikidataIDPerson
(SAMPLE(?wikidataIDPersonLabel) AS ?personLabel)
#?gender
?genderLabel
#?placeOfBirth
?placeOfBirthLabel
(SAMPLE(?dateOfBirth) AS ?birthDate)
(SAMPLE(?birthYear) AS ?yearOfBirth)

WHERE {
  BIND(<https://d-nb.info/gnd/173368786> AS ?person)
  #cto:is referenced in
  ?headstone cto:CTO_0001006 n4c:E6317 ;
             # cto:has related person/nfdicore:has external identifier
             cto:CTO_0001009/nfdicore:NFDI_0001006 ?person ;
             rdfs:label ?headstoneLabel ;
             # cto:has related location/nfdicore:has external identifier
             cto:CTO_0001011/nfdicore:NFDI_0001006 ?headstoneLocation ;
             # cto:has approximate period
             cto:CTO_0001071 ?headstoneDate .
  # a nfdicore:GND identifier
  ?person a nfdicore:NFDI_0001009 .
  # a nfdicore:TGN identifier
  ?location a nfdicore:NFDI_0001055 .
  FILTER(lang(?headstoneLabel) = 'en')
  BIND(REPLACE(STR(?person), "^.*/", "") AS ?personGNDid)
  BIND(REPLACE(STR(?headstoneLocation), "^.*/", "") AS ?headstoneLocationTGNid)
  FILTER (datatype(?headstoneDate) = xsd:date)
  bind(year(xsd:date(?headstoneDate)) as ?headstoneYear) 
  SERVICE <https://query.wikidata.org/sparql> {
    ?wikidataIDPerson wdt:P227 ?personGNDid .
    OPTIONAL { ?wikidataIDPerson rdfs:label ?wikidataIDPersonLabel . FILTER(lang(?wikidataIDPersonLabel) = "en" || lang(?wikidataIDPersonLabel) = "mul") }
    ?wikidataIDheadstoneLocation wdt:P1667 ?headstoneLocationTGNid .
    OPTIONAL { ?wikidataIDheadstoneLocation rdfs:label ?wikidataIDheadstoneLocationLabel . FILTER(LANG(?wikidataIDheadstoneLocationLabel) = "en") }
    OPTIONAL {
      ?wikidataIDPerson wdt:P21 ?gender 
      OPTIONAL { ?gender rdfs:label ?genderLabel . FILTER(LANG(?genderLabel) = "en") }
    }
    OPTIONAL {
      ?wikidataIDPerson wdt:P19 ?placeOfBirth 
      OPTIONAL { ?placeOfBirth rdfs:label ?placeOfBirthLabel . FILTER(LANG(?placeOfBirthLabel) = "en") }
    }
    OPTIONAL {
      ?wikidataIDPerson wdt:P569 ?dateOfBirth
      BIND(YEAR(?dateOfBirth) AS ?birthYear) 
    }
  }
} ORDER BY ?headstoneDate 

Summary

TEXT