Library-related wikidata queries for wikidata's 13th birthday

From: Stuart A. Yeates <syeates_at_nyob>
Date: Wed, 29 Oct 2025 07:21:02 +1300
To: CODE4LIB_at_LISTS.CLIR.ORG
It's Wikidata's 13th birthday.

To celebrate, here are three library-related queries that I'm curating at
the moment.

I'm posting links into wikidata talk pages because SPARQL queries rapidly
grow beyond the limits of the wikimedia URL shortener (or any URL
shortener, as far as I can tell).

I'm a relative newcomer to wikidata, just over ten years editing, unlike
wikipedia with closer to twenty years. True to form my first edit was
gender nonsense:  https://www.wikidata.org/w/index.php?diff=42756571



This is a query that I worked on for the recent OpenAccessWeek / #OAWeek.

It's a list of DiamondOpenAccess journals in Australia and New Zealand,
using seven possible ways to attribute a journal to a country (ISSN and
DOAJ use a single boring value).

Much of the query is formatting the data nicely, by default most values are
returned as a URL pointing to a complex value, rather than a textual value
in a human language.
https://www.wikidata.org/wiki/User:Stuartyeates/DiamondOpenAccess



This one is actually a set of queries, which aim to embody the kinds of
things librarians put on as physical displays of physical books in physical
libraries.

The primary returned result is an LCCN, since most library management
software can import a list of LCCNs and give you a list of held works by
those authors.

These queries can get you a list of local LGBTI authors, or authors born
this day/week/month or authors associated with an institution.

Your LMS can then give you a list of holdings of those authors, based on
that list.

This set of queries was originally built for a feature request for our
library management software to better support linked data (link in comments
in the query). My library is in the early adopter program for linked data
features in the LMS.

https://www.wikidata.org/wiki/User:Stuartyeates/PeopleForBookDisplays



In my library we run a lot of promotional events related to Pacifika
languages; Māori language week, Tongan language week, Samoan language week,
etc.

This is a query which aims to find authors appropriate for those events and
searches by ethnicity and language.

Again, LCCN is used as the author identifier.

This is a work in progress, both because many of these people are not
tagged by ethnicity / language (I'll be tagging people based in the lists
we've used in previous years) and because I'm not really happy with the way
I'm dealing with (or not dealing with) some of the very large language
groups, as noted in the query.

https://www.wikidata.org/wiki/User:Stuartyeates/InterestingPeopleQuery#Pacifica_people_by_ethnicity_or_language_III

Ethnicity is _hard_ and every jurisdiction does ethnicity differently.

I've written up how I do local ethnicities and how I encourage others to do
them.

https://www.wikidata.org/wiki/User:Stuartyeates/New_Zealand_personal_info_guidelines


cheers

stuart
--
...let us be heard from red core to black sky
Received on Tue Oct 28 2025 - 14:22:16 EDT