Datasets

The real-world datasets used in the recipes are provided for reproducibility in the repository’s examples/data directory. Please refer to the respective sources for the most up-to-date versions, use the datasets in accordance with the source licenses (these should be open, but always check), and be sure to cite the original authors of the data.

Dataset preprocessing is done per the ua-dataset-madrid repository, which is the canonical source for this data and is intended as a base for openly reproducible urban analytics papers, workflows, and tutorials. The street network, neighbourhoods, and premises datasets are copies of that repository’s latest versions and are refreshed manually when it updates; the remaining datasets are maintained directly in this repository.

Neighbourhoods

GeoPackage

Source | License

Origin of the data: Madrid City Council (or, where appropriate, administrative body, body or entity in question).

Description: Delimitation of the 131 neighborhoods of the municipality of Madrid. The names and codes of each neighborhood and the districts to which they belong are indicated. The initial delimitation corresponds to the territorial restructuring of 1987.

Boundary

GeoPackage

Derived from the neighbourhoods dataset above; same source and license.

Blocks

GeoPackage

Source | License

The Copernicus land monitoring products and services are made available on a principle of full, open and free access, as established by the Commission Delegated Regulation (EU) No 1159/2013 of 12 July 2013, on the conditions that:

  1. When distributing or communicating Copernicus Land Monitoring Service products and services (data, software scripts, web services, user and methodological documentation and similar) to the public, users shall inform the public of the source of these products and services.
  2. Where the Copernicus Land Monitoring Service products and services have been adapted or modified by the user, the user shall clearly state this.
  3. Users shall make sure not to convey the impression to the public that the user’s activities are officially endorsed by the European Union.

Urban Atlas Land Cover/Land Use 2018 (vector), Europe, 6-yearly. European Union’s Copernicus Land Monitoring Service information, https://land.copernicus.eu/en/products/urban-atlas/urban-atlas-2018. https://doi.org/10.2909/fb4dffa1-6ceb-4cc0-8372-1ed354c285e6

Premises

GeoPackage

Source | License

Origin of the data: Madrid City Council (or, where appropriate, administrative body, body or entity in question).

Description: Microdata file of the census of premises and activities of the Madrid City Council, classified according to their type of access (street door or grouped), situation (open, closed…) and indication of the economic activity exercised and the hospitality and restaurant terraces that appear registered in said census.

Preprocessing performed per: ua-dataset-madrid.

Key columns:

ColumnDescription
local_distr_descDistrict name
local_neighb_descNeighbourhood name
section_idActivity section code (e.g., I = hospitality, R = recreation)
section_descActivity section description
division_idActivity division code
division_descActivity division description
epigraph_idSpecific activity code
epigraph_descSpecific activity description (e.g., RESTAURANTE)

Overture Maps Buildings

GeoPackage

Source | License

License for theme: ODbL

  • © OpenStreetMap contributors. Available under the Open Database License.
  • Esri Community Maps contributors. Available under CC BY 4.0.
  • Global ML Building Footprints. Licensed by Microsoft under the Open Database License.
  • Google Open Buildings. Available under CC BY 4.0.
  • USGS 3D Elevation Program Digital Elevation Program.
  • Qian Shi, et al. A First High-quality Vector Data of Buildings in East Asian Countries Based on a Comprehensive Large-scale Mapping Framework. Zenodo, 22 July 2023, doi
    .5281/zenodo.8174931. Available under CC BY 4.0.

Key columns:

ColumnDescription
mean_heightAverage building height in metres (where available)
areaFootprint area in square metres
perimeterFootprint perimeter in metres
compactnessCompactness ratio (area relative to perimeter)
orientationOrientation angle in degrees
volumeEstimated building volume (height x area, where available)
floor_area_ratioFloor area ratio
form_factorBuilding form factor
cornersNumber of corners in the footprint
shape_indexShape index metric
fractal_dimensionFractal dimension of the footprint boundary

Overture Maps Infrastructure

GeoPackage

Source | License

License for theme: ODbL

  • © OpenStreetMap contributors. Available under the Open Database License.
  • Data from the Daylight Map Distribution
  • ESA WorldCover. Available under CC BY 4.0 DEED.
  • Data products from ETOPO1. Available under Open Data Commons Public Domain Dedication and License.
  • Data from GLOBathy. Available under CC0 1.0 (assumed).

Streets

GeoPackage | 3D GeoPackage

Source (CNIG/IGN - Redes de Transporte - Madrid province) | License (ign.es)

Cite: Attribute IGN (Instituto Geográfico Nacional de España).

Description: Road network (Red Viaria) for Madrid province from the CNIG/IGN Redes de Transporte dataset. Layer rt_tramo_vial containing road segments with classification, surface, lane, and naming attributes.

Preprocessing: Download RT_MADRID_gpkg.zip from CNIG Centro de Descargas. Extract red_viaria.gpkg, layer rt_tramo_vial. Reproject from EPSG

to EPSG
. Clip to 20km buffered bounds. Retain clased (road class) and nombre (road name) attributes only. Set coordinate grid precision to 1m and simplify geometries to 1m tolerance. Further preprocessing performed per ua-dataset-madrid.

Key columns:

ColumnDescription
clasedRoad classification (e.g., Urbano)
nombreStreet name

Census

GeoPackage

Source | License

Copyright European Union 2025. The source needs to be indicated and when re-use involves modifications to the data or text, this must be stated clearly to the end user of the information.

CodeDescription
TTotal population
MMale population
FFemale population
Y_LT15Age under 15 years
Y_1564Age 15 to 64 years
Y_GE65Age 65+ years
EMPEmployed persons
NATBorn in reporting country
EU_OTHBorn in other EU Member State
OTHBorn elsewhere
SAMEResidence unchanged in past year
CHG_INMoved within reporting country
CHG_OUTMoved from outside reporting country

GTFS - Metro

GTFS files (stops, stop times, routes, trips, shapes, frequencies)

Source | License