Using Wikidata to Generate an Open Library Collection

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?

  1. 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)

  2. Since the kingdom no longer exists, there shouldn’t be too many updates needed for the page.

  3. 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:

  1. An Open Library author ID

  2. 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!