Datasets:
Update dataset card (polygon-only schema)
Browse files
README.md
CHANGED
|
@@ -1,26 +1,138 @@
|
|
| 1 |
---
|
| 2 |
-
license:
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
dataset_info:
|
| 9 |
features:
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
splits:
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
num_examples: 58
|
| 24 |
-
download_size: 23776
|
| 25 |
-
dataset_size: 34540
|
| 26 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
license: "odbl"
|
| 3 |
+
pretty_name: "OSM Polygon Wikidata Only"
|
| 4 |
+
language: "en"
|
| 5 |
+
task_categories:
|
| 6 |
+
- "other"
|
| 7 |
+
tags:
|
| 8 |
+
- "openstreetmap"
|
| 9 |
+
- "geospatial"
|
| 10 |
+
- "wikidata"
|
| 11 |
+
- "polygons"
|
| 12 |
+
- "boundaries"
|
| 13 |
+
- "OSM"
|
| 14 |
+
- "PBF"
|
| 15 |
+
- "ODbL"
|
| 16 |
+
size_categories:
|
| 17 |
+
- "n<1K"
|
| 18 |
dataset_info:
|
| 19 |
features:
|
| 20 |
+
- name: "region"
|
| 21 |
+
description: "Geofabrik region slug parsed from the source PBF filename (e.g. `monaco`)."
|
| 22 |
+
- name: "osm_type"
|
| 23 |
+
description: "OSM element type: `way` or `relation`."
|
| 24 |
+
- name: "osm_id"
|
| 25 |
+
description: "OpenStreetMap numeric identifier of the element."
|
| 26 |
+
- name: "wikidata"
|
| 27 |
+
description: "Wikidata Q-id, lifted into its own column for easy filtering and joins. Mirrors the OSM `wikidata` tag."
|
| 28 |
+
- name: "tags"
|
| 29 |
+
description: "Deterministic JSON object of all OSM tags except `wikidata`."
|
| 30 |
+
- name: "centroid"
|
| 31 |
+
description: "Polygon centroid as a GeoJSON Point string (RFC 7946: `[lon, lat]`)."
|
| 32 |
+
- name: "lat"
|
| 33 |
+
description: "Centroid latitude in decimal degrees (WGS84)."
|
| 34 |
+
- name: "lon"
|
| 35 |
+
description: "Centroid longitude in decimal degrees (WGS84)."
|
| 36 |
+
- name: "area_m2"
|
| 37 |
+
description: "Polygon area in square meters (WGS84-equirectangular approximation, accurate to <0.1% for polygons <100 km wide)."
|
| 38 |
+
- name: "area_km2"
|
| 39 |
+
description: "Polygon area in square kilometers (`area_m2 / 1_000_000`)."
|
| 40 |
+
- name: "name"
|
| 41 |
+
description: "Convenience column: `tags.name` if present, empty string otherwise."
|
| 42 |
+
- name: "source_pbf"
|
| 43 |
+
description: "Source PBF filename (e.g. `monaco-latest.osm.pbf`)."
|
| 44 |
+
- name: "extraction_version"
|
| 45 |
+
description: "Package version that produced the row."
|
| 46 |
+
- name: "extracted_at"
|
| 47 |
+
description: "ISO-8601 UTC timestamp at the moment the row was extracted."
|
| 48 |
splits:
|
| 49 |
+
- name: "train"
|
| 50 |
+
num_examples: 58
|
|
|
|
|
|
|
|
|
|
| 51 |
---
|
| 52 |
+
|
| 53 |
+
# OSM Polygon Wikidata Only
|
| 54 |
+
|
| 55 |
+
OpenStreetMap polygonal features (closed ways and multipolygon relations) carrying a non-empty `wikidata=*` tag, plus centroid and area metadata for each polygon.
|
| 56 |
+
|
| 57 |
+
## Summary
|
| 58 |
+
|
| 59 |
+
This dataset is built from Geofabrik `.osm.pbf` extracts. It contains every OSM polygon (closed way or multipolygon relation) that carries a non-empty `wikidata` tag. For each polygon the row records the centroid (as `lat`, `lon`, and a GeoJSON Point string), the polygon area in square meters and square kilometers, the full OSM tag set (minus `wikidata`), and provenance fields (`region`, `source_pbf`, `extraction_version`, `extracted_at`).
|
| 60 |
+
|
| 61 |
+
## Data source
|
| 62 |
+
|
| 63 |
+
- **Upstream**: [OpenStreetMap](https://www.openstreetmap.org/), distributed as country/region `.osm.pbf` extracts by [Geofabrik](https://download.geofabrik.de/).
|
| 64 |
+
- **Filter**: keep only closed ways that carry a `wikidata=*` tag AND relations with `type=multipolygon` that carry a `wikidata=*` tag. All other elements (including nodes and tagged non-polygonal ways) are dropped.
|
| 65 |
+
|
| 66 |
+
## Schema
|
| 67 |
+
|
| 68 |
+
| Column | Type | Description |
|
| 69 |
+
|---|---|---|
|
| 70 |
+
| `region` | string | Geofabrik region slug parsed from the source PBF filename (e.g. `monaco`). |
|
| 71 |
+
| `osm_type` | string | OSM element type: `way` or `relation`. |
|
| 72 |
+
| `osm_id` | int64 | OpenStreetMap numeric identifier of the element. |
|
| 73 |
+
| `wikidata` | string | Wikidata Q-id, lifted into its own column for easy filtering and joins. Mirrors the OSM `wikidata` tag. |
|
| 74 |
+
| `tags` | string (JSON) | Deterministic JSON object of all OSM tags except `wikidata`. |
|
| 75 |
+
| `centroid` | string (GeoJSON Point) | Polygon centroid as a GeoJSON Point string (RFC 7946: `[lon, lat]`). |
|
| 76 |
+
| `lat` | float64 | Centroid latitude in decimal degrees (WGS84). |
|
| 77 |
+
| `lon` | float64 | Centroid longitude in decimal degrees (WGS84). |
|
| 78 |
+
| `area_m2` | float64 | Polygon area in square meters (WGS84-equirectangular approximation, accurate to <0.1% for polygons <100 km wide). |
|
| 79 |
+
| `area_km2` | float64 | Polygon area in square kilometers (`area_m2 / 1_000_000`). |
|
| 80 |
+
| `name` | string | Convenience column: `tags.name` if present, empty string otherwise. |
|
| 81 |
+
| `source_pbf` | string | Source PBF filename (e.g. `monaco-latest.osm.pbf`). |
|
| 82 |
+
| `extraction_version` | string | Package version that produced the row. |
|
| 83 |
+
| `extracted_at` | string (ISO-8601 UTC) | ISO-8601 UTC timestamp at the moment the row was extracted. |
|
| 84 |
+
|
| 85 |
+
## Loading
|
| 86 |
+
|
| 87 |
+
```python
|
| 88 |
+
from datasets import load_dataset
|
| 89 |
+
|
| 90 |
+
ds = load_dataset("NoeFlandre/osm-polygon-wikidata-only", split="train")
|
| 91 |
+
print(ds[0])
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
## Intended uses
|
| 95 |
+
|
| 96 |
+
- Linking OSM polygons to Wikidata entries for cataloguing, research, or visualization.
|
| 97 |
+
- Building gazetteers that combine OSM geometry with Wikidata labels.
|
| 98 |
+
- Light ETL of polygon metadata (centroid + area) without re-parsing PBFs.
|
| 99 |
+
|
| 100 |
+
## Limitations and biases
|
| 101 |
+
|
| 102 |
+
- **Coverage** depends on which Geofabrik extracts were processed and at what snapshot date. Some regions may be stale; see `source_pbf` and `extracted_at` per row.
|
| 103 |
+
- **Wikidata IDs are OSM tag values**, not independently validated. They may point to nonexistent, merged, or redirected Wikidata items.
|
| 104 |
+
- **Geometry is reduced** to centroid + area. Full polygon coordinates are not stored to keep the dataset small.
|
| 105 |
+
- **Equirectangular area approximation** is accurate to ~0.1% for polygons <100 km wide at non-polar latitudes. Very large polygons (countries) may have noticeable error.
|
| 106 |
+
|
| 107 |
+
## Data freshness
|
| 108 |
+
|
| 109 |
+
The dataset is regenerated from Geofabrik PBFs on demand. The current snapshot was generated at **2026-07-09 13:06:12 UTC** and contains **58** rows.
|
| 110 |
+
|
| 111 |
+
## Licensing and attribution
|
| 112 |
+
|
| 113 |
+
OpenStreetMap data is © OpenStreetMap contributors and licensed under the [Open Database License (ODbL) v1.0](https://opendatacommons.org/licenses/odbl/1-0/). **Any use of this dataset must preserve OSM attribution**: see [openstreetmap.org/copyright](https://www.openstreetmap.org/copyright) for the exact wording required when displaying or redistributing OSM-derived data.
|
| 114 |
+
|
| 115 |
+
Wikidata IDs are obtained from the OSM `wikidata=*` tag values. Wikidata itself is © Wikimedia contributors under CC0; see [wikidata.org](https://www.wikidata.org/) for details.
|
| 116 |
+
|
| 117 |
+
## Citation
|
| 118 |
+
|
| 119 |
+
If you use this dataset in academic work, please cite OpenStreetMap and Geofabrik, for example:
|
| 120 |
+
|
| 121 |
+
```bibtex
|
| 122 |
+
@misc{openstreetmap,
|
| 123 |
+
title = {OpenStreetMap},
|
| 124 |
+
author = {{OpenStreetMap contributors}},
|
| 125 |
+
year = {2026},
|
| 126 |
+
howpublished = {\url{https://www.openstreetmap.org}},
|
| 127 |
+
}
|
| 128 |
+
```
|
| 129 |
+
|
| 130 |
+
## Maintenance
|
| 131 |
+
|
| 132 |
+
Re-run the pipeline against fresh Geofabrik PBFs and re-push the dataset. The CLI command is:
|
| 133 |
+
|
| 134 |
+
```bash
|
| 135 |
+
uv run osm-wikidata build --push
|
| 136 |
+
```
|
| 137 |
+
|
| 138 |
+
Issues and improvements are tracked on the associated GitHub repository.
|