Making SPARQL queries to Wikidata using Python

Published: Jun 11, 2022 by Steve Baskauf

I recently solved several annoying problems that I’d been having when using SPARQL queries to acquire data from Wikidata. My success inspired me to write a comprehensive Python class that will reliably carry out every kind of SPARQL Query and Update, with defaults to easily make SELECT queries to Wikidata.

To read the post, visit this link.

You can access the code from this file at GitHub

Share

Latest Posts

Enabling ecological survey data integration
Enabling ecological survey data integration

Our paper describing the Humboldt Extension to Darwin Core has been published in Ecography. The Humboldt Extension adds 55 terms that enrich the Darwin Core, providing the terms needed to capture and share multiple types of biodiversity survey data. The paper illustrates the benefits of implementing the Humboldt Extension with three case studies and demonstrates how richer data can be used in research, modelling, and to inform decision-making.

Biological survey and monitoring data publishing guide
Biological survey and monitoring data publishing guide

My coauthors and I have published a guide to help people understand how to use the new Humboldt Extension for Biological Inventories of the Darwin Core standard. The guide includes diagrams and detailed information about how to structure the data to capture the hierarchical structure typically found in monitoring projects.

Open Science recipes published
Open Science recipes published

My colleage from the Vanderbilt Libraries’ Digital Lab, Shenmeng Xu, an I have published two chapters in the ACRL’s 2025 Open Science Cookbook. The Cookbook is a lighthearted take on technical topics where instructions are given in “recipe” format to teach beginners new tech skills.