Samian ware: production centres and their kiln regions

This browser-executable notebook queries the NFDI4Objects Knowledge Graph for Samian-ware production centres, retrieves their geographic coordinates and their assignment to higher-level kiln regions, and visualises the result on an interactive map.

Note

On first load, your browser downloads the Python runtime (Pyodide, ~10 MB). Please allow a moment for it to initialise.

Warning

The NFDI4Objects Knowledge Graph is a research prototype. If this notebook fails to load data with a network error, the endpoint may be temporarily unreachable or may not allow cross-origin browser requests from this page’s domain. The local .ipynb companion is not affected by this and is always a reliable fallback.

About this notebook

Samian ware (terra sigillata) was produced across the Roman Empire between the 1st century BCE and the 3rd century CE at a set of well-known workshop locations — La Graufesenque, Lezoux, Rheinzabern, and many others. The NFDI4Objects Knowledge Graph models each workshop as a lado:ProductionCentre and groups centres into higher-level KilnRegion clusters (e.g. South Gaulish, Central Gaulish).

This notebook fetches that structure and plots it. A companion local notebook, n4okg-samian-production-centres.ipynb, runs the same pipeline against the full scientific Python stack (SPARQLWrapper, folium) for readers who prefer a Jupyter environment.

Why this dataset?

Samian-ware production is a particularly good pedagogical dataset for geographic SPARQL visualisation: the number of centres is small enough (around 100) to plot as individual markers without clutter, the categorical grouping by kiln region gives a natural colour dimension, and the research tradition is mature enough that workshop locations and their clustering are well established.

What you’ll learn

  • how to query a GeoSPARQL-typed asWKT literal from a Wikibase-style knowledge graph
  • how to parse WKT point literals robustly across endpoints
  • how to build a categorical Leaflet marker map directly from a pandas DataFrame

Data-context notes

  • ProductionCentreKilnRegion is modelled via lado:clusteredAs
  • geometries use geosparql:hasGeometry / geosparql:asWKT — a two-step indirection (the asWKT is attached to the geometry node, not directly to the centre)
  • WKT literals on this endpoint use POINT(lon lat) (uppercase); the parser below handles both casings defensively
  • one centre may in principle have more than one kiln-region label attached; the code de-duplicates to one row per centre for the map

Tooling notes

In the browser, SPARQL access goes through pyodide.http.pyfetchSPARQLWrapper is not available in Pyodide (it depends on requests, which requires a system-level networking stack absent in WebAssembly). Mapping uses a hand-rolled Leaflet block returned via _repr_html_ rather than folium, because folium writes its output to disk and relies on file-system paths that Pyodide cannot expose to the parent page.

Step 1 — Define the SPARQL query

We retrieve every ProductionCentre, its label, its WKT geometry, and the label of its associated KilnRegion. The join across the geometry blank node (?item_geom) is a common pattern in GeoSPARQL data: the geometry literal is never attached directly to the feature, always via an intermediate node.

Step 2 — Load the data

The bindings from a SPARQL JSON result are flattened into a DataFrame. The WKT literal POINT(lon lat) is split into separate latitude and longitude columns using a case-insensitive regex parser — the same endpoint occasionally uses mixed casing across different collections, so we avoid brittle string slicing.

Step 3a — Centres per kiln region (sanity check)

Before the map, a simple bar chart confirms the data shape and gives a numerical anchor for the spatial view that follows. Very uneven bars (one region with many centres, several with just one or two) are typical for Samian-ware production: research attention and survival bias favour the large South-Gaulish and Central-Gaulish clusters.

Step 3b — Map of production centres

Each centre becomes a circleMarker on a Leaflet map. Markers are coloured by kiln region, and the overlay control in the top-right corner doubles as a legend with coloured swatches: click a swatch to hide or show that group. Four basemaps are available via the same control.

Step 4 — Explore

The df DataFrame stays in scope — modify the cell below to filter, aggregate, or re-join however you like.


Part of an Open Educational Resource series on knowledge graphs and linked open data, produced in the context of NFDI4Objects.