Using Wikidata to Generate an Open Library Collection
Back in April, I generated this Open Library collection about the Kingdom of Hawai’i.
Here’s a short blog post about how and why.
Why did I pick this topic?
I lived in Hawai'i for about a year so I have an affinity for the topic. (I also maintain a list of documentaries about Hawai’i)
Since the kingdom no longer exists, there shouldn’t be too many updates needed for the page.
The kingdom was around recently enough that people alive then probably published some books.
How did I do it?
I queried Wikidata for all people with:
An Open Library author ID
Their place of birth or country of citizenship set to the Kingdom of Hawai’i
It took a bit of tinkering to get the query to work because of the place of birth can have the country encoded in different ways.
I used that data to generate the collection page. The whole script is here.
Results
The result are... a bit lackluster because there are only a handful of authors and most of their works don’t have covers. However, it’s a good start to see how we can use Wikidata to power more interesting pages on Open Library.
On the plus side, there really wasn't much information readily searchable about authors in the Kingdom of Hawai'i so maybe this will be useful to someone one day.
PS: My pull request to augment the Open Library author pages with information from Wikidata was recently merged so more to come soon!
Subscribe to my newsletter
Read articles from Ray Berger directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Ray Berger
Ray Berger
MSc Candidate in Urban Studies, Software Engineer