Wordlwide OSM polygons with linked knowledge

Dataset overview

Wikidata connects real places in OpenStreetMap to multilingual Wikipedia and Wikivoyage text.

Snapshot: 2026-08-02

Every row starts with a real OSM polygon

The pipeline reads Geofabrik extracts and keeps closed ways and multipolygon relations with a non-empty wikidata=* tag.

  • 1,184,110 polygon rows across 375 active regions
  • each polygon keeps its OSM identity, geometry, tags, centroid, and area
  • the raw input set has 386 PBFs; 11 contained extracts are retired from the active set

This is a place-first dataset. Text and facts are linked to the polygon through its Wikidata Q-id.

Seven Parquet tables form one linked dataset

Table What it contains
polygons One row per selected OSM polygon
polygon_articles One link row per polygon and Wikipedia or Wikivoyage document
wikipedia/documents Full Wikipedia document rows
wikipedia/sections Section-level Wikipedia text
wikivoyage/documents Full Wikivoyage document rows
wikivoyage/sections Section-level Wikivoyage text
wikidata/facts Selected structured Wikidata claims

Every table is partitioned by the Geofabrik stem. The link table has a project column so one join works for both text sources.

Wikidata is the bridge between geometry and text

OSM polygon   →   Wikidata Q-id   →   Wikipedia documents

OSM polygon   →   Wikidata Q-id   →   Wikivoyage documents

Wikidata Q-id   →   facts table

A document can be linked to several polygons. A polygon can have documents in many languages and in both projects.

  • document_id identifies a page revision.
  • project distinguishes Wikipedia from Wikivoyage.
  • Sections reference their parent document, so full text and section text can be used together.

The snapshot has broad coverage, with a clear text boundary

Core scale
1,119,223 unique Wikidata entities
2,273,750 Wikipedia documents
14,420 Wikivoyage documents

Derived text and facts
11,997,165 Wikipedia sections
302,200 Wikivoyage sections
3,901,092 Wikidata facts

666,251 polygons have at least one non-empty Wikipedia or Wikivoyage document, or 56.3% of the polygon set.

Document words count full document rows. Section rows are excluded because they repeat document text.

Text coverage is strongest in Europe, but not uniform

Continent Polygons Wikipedia text Wikipedia + Voyage Coverage
Africa 11,289 8,309 8,309 73.6%
Antarctica 254 251 251 98.8%
Asia 117,610 94,924 94,945 80.7%
Europe 792,569 373,782 373,782 47.2%
North America 162,012 120,166 120,167 74.2%
Oceania 19,807 11,467 11,468 57.9%
South America 18,906 13,503 13,503 71.4%
Unassigned 61,663 43,824 43,826 71.1%

A polygon is assigned by its WGS84 centroid and Natural Earth country boundaries. Offshore or unmatched centroids stay Unassigned. Coverage is text-covered polygons divided by polygons in that row.

Languages show a long tail

Top document languages

Language Documents Share
en 223,301 10.1%
de 146,312 6.6%
fr 109,720 5.0%
ceb 105,479 4.8%
sv 74,518 3.4%
ru 73,228 3.3%
es 70,808 3.2%
it 65,927 3.0%

What the distribution means

  • 351 languages occur across both projects.
  • The top five languages account for 29.9% of all documents.
  • The top twenty account for 63.6%.
  • Language counts describe document rows.

Two maps answer two different geographic questions

All dataset polygons

All polygons. Each point is an OSM polygon carrying a Wikidata tag.

Polygons with text

Polygons with text. Each point has non-empty Wikipedia or Wikivoyage text.

H3 density shows where text-covered places cluster

Text density

Each H3 cell contains the number of unique polygons with non-empty Wikipedia or Wikivoyage text. A polygon is counted once even if it has several documents.

A reproducible snapshot that is ready to use

  • Parquet files are partitioned by region and can be loaded with Hugging Face Datasets or PyArrow.
  • Text is plain text with page and revision identifiers, license, and attribution fields.
  • Source licenses are explicit: ODbL for OpenStreetMap, CC0 for Wikidata, and CC BY-SA 4.0 for Wikipedia and Wikivoyage.
from datasets import load_dataset
ds = load_dataset(
    "parquet",
    data_files={"polygons": "hf://datasets/NoeFlandre/osm-polygon-wikidata-only/polygons/*.parquet"},
)

Open the dataset on Hugging Face

The dataset grows through a resumable pipeline

Each run reads new or changed PBFs, enriches only the regions that need work, writes atomic Parquet artifacts, refreshes the generated card and maps, then publishes one coherent Hub update.

Use the codebase deck to see how the pipeline keeps that snapshot deterministic and recoverable.

Source code on GitHub