Wikidata:WikiProject Alba amicorum National Library of the Netherlands/Album owners
This project is part of the Wikidata efforts of the Koninklijke Bibliotheek Nederland
Home | Pilot projects | Overviews | Source data | All project pages |
List of album namegivers/owners edit
Canonical, minimal items edit
- Owner/namegiver: Johannes van Aelhuijsen (Q108704808)
- Album: Album studio forum created by Johannes van Aelhuijsen (1626-1685), rector of the Latin school in Tiel (Q98277859)
SPARQL edit
Basic query - properties that need to be in the minimal datamodel for an album namegiver/owner/creator
- named after (P138) (required, primary key)
- owned by (P127) (optional?)
- dedicated to (P825) (optional?)
- sex or gender (P21) (required)
- Nationale Thesaurus voor Auteursnamen ID (P1006) (optional)
- VIAF ID (P214) (optional)
- ISNI (optional)
- image (P18) (optional)
- Commons category (P373) (optional)
- name in native language (P1559) (required)
- date of birth (P569) (optional)
- sourcing circumstances dob (optional, qualifier)
- date of death (P570) (optional)
- sourcing circumstances dod (optional, qualifier)
- owner of (P1830) (reverse check)
- notable work (P800) (required)
- on focus list of Wikimedia project (P5008) (required - items of album owners are on the radar of the Wikiproject, to keep an eye on them)
- maintained by WikiProject (P6104) (optional - items of album owners are not necessarily maintained by the Wikiproject, as it is not the primary responsbility of the project to keep those items up-to-date, except for the album-related info in each item)
- has works in the collection (P6379) (required)
- copyright status as a creator (P7763) (required?)
Comment/uncomment variables in the query below to iteratively check the relation between
- the alba,
- the namegivers/owners (names, gender, birthyear, deathyear),
- the KB as collectionholder and
- external IDs (NTA, VIAF, ISNI)
- some other things
#Namegivers of alba amicorum of KB
SELECT DISTINCT
?item ?itemLabel
?namedafter ?namedafterLabel
?owner ?ownerLabel
?dedicatedto ?dedicatedtoLabel
?nameNL
?genderLabel
?image
?commonscat
(GROUP_CONCAT(DISTINCT ?dob_year ; separator = " -- ") as ?birth_year)
(GROUP_CONCAT(DISTINCT ?dod_year ; separator = " -- ") as ?death_year)
(GROUP_CONCAT(DISTINCT ?nta_url ; separator = " -- ") as ?nta_urls)
(GROUP_CONCAT(DISTINCT ?viaf_url ; separator = " -- ") as ?viaf_urls)
?ownerofLabel
?notableworkLabel
?onfocuslistLabel
?maintainedbyLabel
?hasworksincollectionLabel ?KBcollectionItemLabel
?copyrightstatusLabel
WHERE
{
?item p:P31/ps:P31 wd:Q457843 .
?item p:P195/ps:P195 wd:Q1526131.
# Consideration: We might want to do a UNION between ?owner, ?namedafter and ?dedicatedto, as ?owner is not always present in a Qitem
?item wdt:P138 ?namedafter.
OPTIONAL {?item wdt:P127 ?owner.
FILTER(?owner = ?namedafter) # The FIRST, ORGINAL owner of the album, after whom the album was named
}
OPTIONAL {?item wdt:P825 ?dedicatedto.}
OPTIONAL {?namedafter wdt:P21 ?gender.}
OPTIONAL {?namedafter wdt:P1559 ?nameNL.}
FILTER(LANG(?nameNL) = "nl") .
OPTIONAL {?namedafter wdt:P1006 ?nta.
BIND(URI(CONCAT("http://data.bibliotheken.nl/doc/thes/p", ?nta)) as ?nta_url).}
OPTIONAL {?namedafter wdt:P214 ?viaf.
BIND(URI(CONCAT("https://viaf.org/viaf/", ?viaf)) as ?viaf_url).}
OPTIONAL {?namedafter wdt:P18 ?image.} # Add images to items
OPTIONAL {?namedafter wdt:P373 ?commonscat.}
OPTIONAL {?namedafter wdt:P569 ?dob.
BIND(year(?dob) as ?dob_year).}
OPTIONAL {?namedafter wdt:P570 ?dod.
BIND(year(?dod) as ?dod_year).}
OPTIONAL {?namedafter wdt:P1830 ?ownerof. # Reverse check
FILTER(?ownerof = ?item)
}
OPTIONAL {?namedafter wdt:P800 ?notablework.
FILTER(?notablework = ?item)
}
OPTIONAL {?namedafter wdt:P5008 ?onfocuslist.
FILTER(?onfocuslist = wd:Q99484628)
}
OPTIONAL {?namedafter wdt:P6104 ?maintainedby.
FILTER(?maintainedby = wd:Q99484628)
}
OPTIONAL {?namedafter p:P6379 ?x.
?x ps:P6379 ?hasworksincollection.
FILTER(?hasworksincollection = wd:Q1526131) # only KB
?x pq:P518 ?KBcollectionItem #aplies to part = P518
FILTER(?KBcollectionItem = ?item)
}
OPTIONAL {?namedafter wdt:P7763 ?copyrightstatus.}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],nl". }
}
GROUP BY ?item ?itemLabel ?owner ?ownerLabel ?namedafter ?namedafterLabel ?dedicatedto ?dedicatedtoLabel ?genderLabel ?nameNL
?image ?commonscat ?ownerofLabel ?notableworkLabel ?onfocuslistLabel ?maintainedbyLabel ?hasworksincollectionLabel ?KBcollectionItemLabel ?copyrightstatusLabel
ORDER BY ?itemLabel
Listeria edit
to add
TODOs edit
- Owners are not unique, an album can have multiple owners, such as Album amicorum of Jacobus Heyblocq (1623-1690), rector of the Latin school in Amsterdam (Q72752496) --> in the above sparql query, the ?owner is actually meant to be the first, original owner --> perhaps ?namedafter is a better primary key (then ?owner) to filter alba owners/namegivers with)
- How to deal with albums that do not have clear/unique/single-person owners, namedafters or dedicatetos, such as
- * Collection of contributions to several alba amicorum of Dutch and German scientists (Q106018049) or Album amicorum of the Concordia company in The Hague (Q98277326) (and all other diffuse 'group owners'
- * Album with signatures of 157 publishers and antiquarians from home and abroad who contributed to a gift for the Martinus Nijhoff company on its 50th anniversary on January 1, 1903 (Q98277847) or Album with 75 framed signatures of booksellers, artists, scientists, etc. who contributed to a gift for the Martinus Nijhoff company on its 50th anniversary on January 1, 1903 (Q98277851) (and all other 'organisational owners'
- * Album amicorum of N.N.1600ca_d (Q98277587) or Album presented to a schoolmaster at his 50th anniversary in 1898 (Q98277578) (and all other anonymous alba)
Retrieve NTA, VIAF and Wikidata ids from ISNI id edit
(see https://plein.kb.nl/thoughts/18515)
Goals: start with a person name + a ISNI identifier, find NTA, VIAF and Wikidata identifiers
For instance, we start with ISNI=0000000029132470 for Marcgravius, Christianus
Method 1: SPARQL NTA on data.bibliotheken.nl edit
Go to http://data.bibliotheken.nl/sparql? and copy-paste this query:
PREFIX schema: <http://schema.org/> SELECT DISTINCT (GROUP_CONCAT(DISTINCT(?isni1); separator="") as ?isni) (GROUP_CONCAT(DISTINCT(?nta1); separator="") as ?nta) (GROUP_CONCAT(DISTINCT(?viaf1); separator="") as ?viaf) (GROUP_CONCAT(DISTINCT(?wikidata1); separator="") as ?wikidata) WHERE{ ?person schema:sameAs ?x. BIND(STRAFTER(STR(?person),"http://data.bibliotheken.nl/id/thes/") AS ?nta1). BIND(STRAFTER(STR(?x),"http://www.isni.org/isni/") AS ?isni1). BIND(STRAFTER(STR(?x),"http://viaf.org/viaf/") AS ?viaf1). BIND(STRAFTER(STR(?x),"http://www.wikidata.org/entity/") AS ?wikidata1). { SELECT DISTINCT ?person ?id WHERE { ?person schema:mainEntityOfPage/schema:isPartOf <http://data.bibliotheken.nl/id/dataset/persons> . ?person schema:sameAs ?id. FILTER(regex(?id, '0000000029132470', 'i')). }}}
Try it! - Result of this query (takes some time...)
JSON response can be selected from the Results Format dropdown
Method 2: Webscrape ISNI website edit
Scrape from webpage ISNI=0000000029132470 using Chrome plugin from webscraper.io
The other 2 methods seem to much more work/slower than this one, so it seems to be the quickest method
Method 3: From VIAF datadump edit
Download http://viaf.org/viaf/data/viaf-20210802-links.txt.gz (1.2GB zipped, inzipped 7.7GB, 125M lines!!) and process that on your machine
Data looks like this:
http://viaf.org/viaf/100001249 PTBNP|835968 http://viaf.org/viaf/100001249 ISNI|0000000069727399 http://viaf.org/viaf/100009494 PTBNP|85905 http://viaf.org/viaf/100012436 Identities@https://www.worldcat.org/identities/viaf-100012436 http://viaf.org/viaf/100012436 ISNI|0000000068921720 http://viaf.org/viaf/100012436 PTBNP|867238 http://viaf.org/viaf/10001407 Wikipedia@https://cs.wikipedia.org/wiki/Pavel_Hrach http://viaf.org/viaf/10001407 Identities@https://www.worldcat.org/identities/lccn-nb2002057643 http://viaf.org/viaf/10001407 LC|nb2002057643 http://viaf.org/viaf/10001407 SUDOC|188652647 http://viaf.org/viaf/10001407 WKP|Q46479622 http://viaf.org/viaf/10001407 ISNI|0000000055120174 http://viaf.org/viaf/10001407 BNF|13491530 http://viaf.org/viaf/10001407 NKC|jo20010086910 .... .... .. 125 million lines of that!
Method 4: Using OpenRefine edit
- via OpenRefine, waarmee je een opgegeven lijstje ISNIs heel eenvoudig kunt reconcileren tegen de VIAF.
- Using the VIAF extenstion for OR
- https://github.com/OpenRefine/OpenRefine/wiki/Reconcilable-Data-Sources
- http://refine.codefork.com/
- https://iphylo.blogspot.com/2013/04/reconciling-author-names-using-open.html
Method 5: Custiom API via grlc.io + Github edit
- Input 1: http://grlc.io/
- Input 2: https://github.com/KBNLdataservices/nta-queries/blob/main/isni-lookup.rq
- Output: http://grlc.io/api/kbnldataservices/nta-queries
- API-call examples
- Docs: