SPARQLing Archaeology: Knowledge Graphs, Wikidata, and QGIS in Practice

Examples from NFDI4Objects Task Area 2, TRAIL 2.5 and 2.8

Drill and Practice

A hands-on course introducing archaeologists to querying, analysing, and visualising Linked Open Data with SPARQL, Python, and QGIS, using Wikidata and the NFDI4Objects Knowledge Graph as primary examples.

Author
Affiliation

Florian Thiery

published on

10.04.2026

modified on

19.04.2026

Doi
Abstract

This Open Educational Resource introduces students to the practical use of archaeological Knowledge Graphs. Through browser-executable Python notebooks, learners query Wikidata and the NFDI4Objects Knowledge Graph with SPARQL, analyse the results, and visualise them on interactive maps. The course also covers fuzzy reasoning over RDF graphs with the Academic Meta Tool (AMT) and the integration of SPARQL queries into QGIS via the SPARQLing Unicorn plugin. No local installation is required — all notebooks run directly in the browser.

Keywords

Linked Open Data, Wikidata, NFDI4Objects, Knowledge Graph, Jupyter Notebook, QGIS, Vagueness

1 Introduction

How can we find out at which sites in Ireland Ogham stones have been documented? How can the production of Roman Samian ware be mapped across Europe — and how reliable is the attribution of a specific vessel to an individual potter? Which early medieval holy wells cluster around a particular patron saint, and where do the enigmatic Hogback grave-covers of northern Britain actually come from? And where — across the Eurasian continent — have ancient DNA samples been taken, and which laboratory protocols were used on them? Questions of this kind can today be addressed directly to open Knowledge Graphs such as Wikidata or the NFDI4Objects Knowledge Graph. This OER module is a hands-on course introducing archaeologists to querying, analysing, and visualising Linked Open Data with SPARQL, Python, and QGIS, using Wikidata and the NFDI4Objects Knowledge Graph as primary examples. All notebooks run directly in the browser, without any local installation. In addition, fuzzy reasoning with the Academic Meta Tool (AMT) and the integration of SPARQL into QGIS via the SPARQLing Unicorn Plugin are introduced.

Learning Objectives

In this module you will learn (Petersen et al. 2025):

  • to understand and articulate the core principles of Linked Data, RDF, and SPARQL;
  • to query public Knowledge Graphs (Wikidata, NFDI4Objects KG) with SPARQL and to process the results programmatically in Python;
  • to load and analyse local Turtle (TTL) files with rdflib;
  • to visualise query results as diagrams and as interactive Leaflet maps;
  • to apply fuzzy reasoning over RDF graphs using the Academic Meta Tool (AMT) and to model simple attribution scenarios;
  • to integrate SPARQL queries into a GIS workflow via the SPARQLing Unicorn QGIS Plugin.

Prerequisites

For an adequate understanding of this module, the following is assumed:

  • basic familiarity with Python (reading and adapting short scripts, working with lists and dictionaries);
  • a general understanding of structured data (tables, CSV, JSON);
  • a basic grasp of URIs/URLs and of the Web as a data space;
  • elementary knowledge of archaeological material culture (Roman Samian ware, early medieval Ogham inscriptions, early medieval religious landscapes and stone monuments, archaeogenetics) — helpful but not essential, as each notebook provides a short contextual introduction.

Learners unfamiliar with the application of Semantic Web technologies to archaeology will find accessible introductions in (Isaksen 2011) and (Thiery 2013), and a comprehensive survey of current practice in (Schmidt et al. 2022).

Relation to the Research Data Lifecycle

This module focuses primarily on the later phases of the research data lifecycle. In the phase enrich and analyse, SPARQL queries and fuzzy reasoning allow existing Knowledge Graphs to be interrogated, aggregated, and combined with local datasets (Tolle et al. 2026). In the phase share, publish, and discover, the module illustrates how openly published Linked Data — both from Wikidata and from domain-specific infrastructures such as the NFDI4Objects KG — becomes discoverable and reusable through standardised interfaces (SPARQL endpoints, Turtle files) (Schmidt et al. 2022, Thiery et al. 2026). Finally, the phase re-use and cite is addressed by demonstrating how persistent identifiers (Wikidata QIDs, Pleiades URIs) support the unambiguous citation of entities across datasets and publications (Thiery, Schubert, et al. 2025).

2 Content

2.1 A Short Primer on Linked Data and Wikidata

Linked Data is a set of principles for publishing structured data on the Web so that it can be interlinked and queried across sources. At its core sits the Resource Description Framework (RDF): every statement is expressed as a triple of the form subject – predicate – object, where each element is identified by an IRI (a Web-scale identifier) or, in the case of objects, a literal value. Collections of such triples form a Knowledge Graph, which can be queried using the SPARQL query language. For a detailed discussion of the uptake of Semantic Web technologies in archaeology, see (Isaksen 2011); an early worked example from the domain of Roman potters’ stamps is given in (Thiery 2013).

Wikidata is the largest openly available general-purpose Knowledge Graph. It is collaboratively edited, multilingual, and exposes a public SPARQL endpoint at https://query.wikidata.org/. For the archaeological and cultural heritage communities, Wikidata serves both as a source of authoritative identifiers — for places, persons, periods, and objects — and as a target for linking domain-specific data. A comprehensive survey of archaeological Linked Open Data practice and its realisation in Wikidata is provided by (Schmidt et al. 2022); concrete interdisciplinary case studies combining Wikidata and a dedicated Wikibase are discussed in (Thiery et al. 2026).

Alongside Wikidata, this module uses the NFDI4Objects Knowledge Graph — a domain-specific Knowledge Graph for material culture and archaeology — as well as small, self-contained TTL files that illustrate how the same techniques apply to local datasets (Thiery, Schenk, et al. 2025).

2.2 How this Module is Organised

The module is divided into three sections, each accessible from the navigation bar above. Every notebook in the first two sections is executable directly in the browser via quarto-live and Pyodide, so no local Python installation is required.

2.3 Jupyter Notebooks: Querying and Analysing Knowledge Graphs

This section contains browser-executable notebooks that demonstrate how to query public SPARQL endpoints, transform the results into Python data structures, and visualise them as diagrams or interactive maps. The notebooks progress from Wikidata, via the NFDI4Objects Knowledge Graph, to a fully self-contained local TTL file — so that you can see how the same patterns apply across different data sources and scales. The Ogham case study is described in detail in (Thiery and Thiery 2023) and (Thiery 2022); the Samian ware case study builds on (Mees and Thiery 2026); the Campanian Ignimbrite example is drawn from (Thiery et al. 2026). Three further case studies extend the scope: two Wikidata WikiProjects on early medieval religious landscapes — HolyWells in Ireland and the UK, and Hogback stones in northern Britain — illustrate how small, community-curated datasets can be analysed along both geographic and semantic axes (dedications, sites, materiality); and the Poseidon archaeogenetic archive, integrated into the NFDI4Objects KG via the ArNO ontology, shows how a natural-science dataset can be queried through the same SPARQL workflow as the cultural-heritage examples.

Each notebook is available in two variants: a browser-executable Quarto-Live document (runs in-page via Pyodide, no installation required) and a classical Jupyter notebook for local execution with the full scientific Python stack. The two variants share the same SPARQL queries, data schema, and visualisations; the only differences are runtime-specific library choices (e.g. pyfetch vs. SPARQLWrapper, custom Leaflet vs. folium). Use the Quarto-Live version for a zero-install first read-through and the Jupyter version when you want to modify queries, reuse the DataFrames in your own analyses, or work offline.

Available notebooks:

2.4 Jupyter Notebooks: AMT

The Academic Meta Tool (AMT) is a lightweight framework for fuzzy reasoning over RDF graphs. It allows the definition of axioms such as RoleChain, Inverse, and Disjoint, and their evaluation under different fuzzy logics (Łukasiewicz, Product, Gödel). This is particularly useful in archaeology, where classifications, attributions, and identifications are rarely crisp. The modelling rationale behind AMT — and its application to Samian ware within the NFDI4Objects consortium — is discussed in (Tolle et al. 2026).

The notebook in this section walks through a concrete worked example:

  • Academic Meta Tool — Potter Attribution Example — a fuzzy reasoning scenario on attributing Samian ware to a specific potter, using the PotterAttributionExample.ttl dataset. The notebook also demonstrates graph visualisation with pyvis and export to TTL and Cypher.

2.5 SPARQLing Unicorn QGIS Plugin

The SPARQLing Unicorn QGIS Plugin brings SPARQL queries directly into the QGIS desktop environment, so that results from Knowledge Graphs can be geocoded and styled like any other GIS layer. The design rationale and the broader tooling ecosystem of the Research Squirrel Engineers Network are described in (Thiery, Schubert, et al. 2025) and (Thiery, Schenk, et al. 2025). This section collects ready-to-use example queries that complement the browser notebooks above.

2.5.1 Install the SPARQLing Unicorn QGIS Plugin

2.5.2 Query Triplestores

Screenshot of the SPARQLing Unicorn QGIS Plugin showing archaeological sites

3 Literature

The works cited throughout this module are listed below with a brief note on what each contribution offers. Full bibliographic details are rendered in the automatically generated references section at the end of this document.

  • (Isaksen 2011) — A PhD thesis that surveys the early uptake of Semantic Web technologies in archaeology and distinguishes two competing visions: Mixed-Source Knowledge Representation (MSKR) and Linked Open Data (LOD). Recommended as a conceptual entry point for understanding why archaeological Linked Data looks the way it does today.
  • (Thiery 2013) — An early German-language case study on applying Linked Data to Roman potters’ stamps; useful as a concrete, small-scale example of modelling archaeological evidence as RDF.
  • (Schmidt et al. 2022) — A broad survey of Linked Open Data practice in archaeology, with a particular focus on how Wikidata is used as a hub for archaeological identifiers. The recommended starting point for readers new to the field.
  • (Thiery 2022) — A methodological paper on publishing Irish Ogham stones as Linked Open Data, including the SPARQL queries that underpin the Ogham notebooks in this course.
  • (Thiery and Thiery 2023) — A follow-up paper to (Thiery 2022) that discusses how heterogeneous Ogham datasets can be interlinked across repositories; directly relevant to the NFDI4Objects Ogham notebooks.
  • (Thiery, Schenk, et al. 2025) — Presents the Research Squirrel Engineers Network and its FAIRification tooling for archaeology and the geosciences, including the SPARQLing Unicorn Toolkit; sets the context for the QGIS section of this course.
  • (Thiery, Schubert, et al. 2025) — A best-practice case study on applying FAIR4RS principles to computational archaeology, with concrete examples from Ogham stones and Campanian Ignimbrite sites; useful for understanding the reproducibility framework behind this OER.
  • (Thiery et al. 2026) — An interdisciplinary paper showing how Wikidata and a dedicated Wikibase can be combined to model archaeological, archaeometric, and volcanological data together; the data source for the Campanian Ignimbrite notebook.
  • (Mees and Thiery 2026) — A paper on using Wikidata as a linking hub for Roman Samian ware data across multiple archaeological databases; the conceptual backbone of the Samian ware notebooks.
  • Straten, M. thor, Strohm, S., Thiery, F. & Renz, M. (2025). Data-Driven Community Standards for Interdisciplinary Heterogeneous Information Networks. E-Science-Tage 2025. Heidelberg: heiBOOKS. doi:10.11588/heibooks.1652.c23914 — Introduces the hybrid ArNO ontology for archaeo-natural research data developed in NFDI4Objects Task Area 3; the schema-level foundation of the Poseidon notebooks in this course.
  • Schmid, C., Ghalichi, A., Lamnidis, T. C., Mudiyanselage, D. B. A., Haak, W. & Schiffels, S. (2024). Poseidon — A framework for archaeogenetic human genotype data management. eLife 13. doi:10.7554/eLife.98317.1 — Describes the Poseidon framework itself; the data source for the Poseidon Community Archive that is loaded into the NFDI4Objects KG as collection/17.
  • (Tolle et al. 2026) — Introduces the Academic Meta Tool (AMT) and its fuzzy modelling approach for ambiguous archaeological relations, with Samian ware as a worked example; essential reading for the AMT section of this course.
  • (Petersen et al. 2025) — The reference learning-objectives matrix for Research Data Management in Germany (Version 3); used here to anchor the module’s learning objectives within a broader didactic framework.

Further Sources and Information

For readers who wish to explore the topics of this module further:

Re-Use

Disclaimer: Use of LLM

This OER module and its accompanying notebooks were drafted with the assistance of Claude (Anthropic, https://claude.ai/). The AI was used in particular for drafting prose, converting Jupyter notebooks to browser-executable Quarto documents, porting the Academic Meta Tool to Python, and structuring the didactic material. All content, code, and SPARQL queries have been reviewed, executed end-to-end, and validated by the author before publication. Remaining errors are the author’s sole responsibility.

The module is published with a licence but without warranty: it is provided “as is”, without any express or implied guarantee of correctness, completeness, or fitness for a particular purpose. See the licence statement below for details.

Bibliography

Isaksen, L. 2011 Archaeology and the Semantic Web, {PhD}, University of Southampton.
Mees, A.W. and Thiery, F. 2026 “Bridging Archaeological Samian Ware Data and the Knowledge Graph: Potentials and Challenges of Using Wikidata as a Linking Hub,” Journal of Open Humanities Data 12(16), 1–17. https://doi.org/10.5334/johd.427.
Petersen, B., Altemeier, F., Boße, S., Dalby, M., Düvel, N., Engelhardt, C., Fichtner, M., Hastik, C., Haugwitz, J.-M., Jacob, J., Koch, K., Kuntz, A., Manske, A., Mühlichen, A., Murcia Serra, J., Ortmeyer, J., Richter, M., Schranzhofer, H., Slowig, B., Trautwein-Bruns, U., Urbaum, D., Voigt, A., Werner, S., Wiljes, C., and Zollitsch, L. 2025 “Lernzielmatrix zum Themenbereich Forschungsdatenmanagement (FDM) (Version 3).” https://doi.org/10.5281/zenodo.15025246.
Schmidt, S.C., Thiery, F., and Trognitz, M. 2022 “Practices of Linked Open Data in Archaeology and Their Realisation in Wikidata,” Digital 2(3), 333–364. https://doi.org/10.3390/digital2030019.
Thiery, F. 2013 “Semantic Web und Linked Data: Generierung von Interoperabilität in archäologischen Fachdaten am Beispiel römischer Töpferstempel,” Squirrel Papers 4(1), #3. https://doi.org/10.5281/zenodo.292979.
Thiery, F. 2022 SPARQLing OghamIrische Ogham-Steine als Linked Open Data,” ZfdG - Zeitschrift für digitale Geisteswissenschaften Fabrikation von Erkenntnis – Experimente in den Digital Humanities.(Sonderband 5). https://doi.org/10.17175/SB005_010.
Thiery, F., Schenk, F., Stefan, D., Distel, A.-K., and Thiery, P.A. 2026 “From Stones and Wells to Tephra: Leveraging Wikidata and Wikibase for Interdisciplinary Humanities Linked Data,” Journal of Open Humanities Data 12(10), 1–16. https://doi.org/10.5334/johd.425.
Thiery, F., Schenk, F., and Thiery, P. 2025 “Das Research Squirrel Engineers Network: FAIRification Tools und LOD-Projekte aus der Archäoinformatik und den Geowissenschaften,” Archäologische Informationen 47(NWDVA 2024 Bochum: Digitale Archäologie), 115–140. https://doi.org/10.11588/ai.2024.1.110394.
Thiery, F., Schubert, L.K., Schenk, F., and Thiery, P. 2025 FAIR4RS in Action: Lightweight Tooling for Computational Archaeology,” Electronic Communications of the EASST 85(Electronic Communications of the EASST, Vol. 85 (2025): deRSE25 - Selected Contributions of the 5th Conference for Research Software Engineering in Germany). https://doi.org/10.14279/ECEASST.V85.2711.
Thiery, F. and Thiery, P. 2023 “Linked Open Ogham. How to publish and interlink various Ogham Data?” Archeologia e Calcolatori 34(1), 105–114. https://doi.org/10.19282/ac.34.1.2023.12.
Tolle, K., Gampe, S., and Thiery, F. 2026 “Fuzziness and Wobbliness in Numismatics and Ceramology: Examples from the NFDI4Objects Knowledge Graph,” CAA 2025 - Digital Horizons: Embracing heritage in an evolving world Proceedings CAA Proceedings(CAA 2025), 1–18. https://doi.org/10.5281/zenodo.18957128.

License

CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/) and MIT (https://opensource.org/license/mit)

Citation

BibTeX
@article{thiery2026,
  author = {Thiery, Florian},
  publisher = {Research Squirrel Engineers Network},
  title = {SPARQLing {Archaeology:} {Knowledge} {Graphs,} {Wikidata,}
    and {QGIS} in {Practice}},
  journal = {Squirrel Papers},
  volume = {8},
  number = {6},
  pages = {§1},
  date = {2026},
  url = {https://n4o-rse.github.io/oer-001-sparqling-archaeology/},
  doi = {10.5281/zenodo.19650452},
  langid = {en},
  abstract = {This Open Educational Resource introduces students to the
    practical use of archaeological Knowledge Graphs. Through
    browser-executable Python notebooks, learners query Wikidata and the
    NFDI4Objects Knowledge Graph with SPARQL, analyse the results, and
    visualise them on interactive maps. The course also covers fuzzy
    reasoning over RDF graphs with the Academic Meta Tool (AMT) and the
    integration of SPARQL queries into QGIS via the SPARQLing Unicorn
    plugin. No local installation is required — all notebooks run
    directly in the browser.}
}
Citation
Thiery, F. 2026 ‘SPARQLing Archaeology: Knowledge Graphs, Wikidata, and QGIS in Practice’, Squirrel Papers 8(6), §1. https://doi.org/10.5281/zenodo.19650452.