Published May 28, 2026 | Version v1
Dataset Open

Population of Mainland Spain and the Balearic Islands by Municipality (2023)

  • 1. ROR icon Universidad Politécnica de Madrid

Description

Georeferenced dataset of the resident population in 2023 for every municipality of
peninsular Spain and the Balearic Islands, distributed as two GeoJSON files: a
full-resolution version and a simplified low-resolution version.

## Files

**Data**

- **`pop_ES_2023_HR.geojson`** — full-resolution municipal boundaries (~150 MB).
- **`pop_ES_2023_LR.geojson`** — geometry simplified with
  `shapely.simplify(tolerance=0.001°, preserve_topology=True)` (~18 MB, ~88 %
  smaller).

Both GeoJSON files contain the same 8,041 municipalities and identical attributes.

**Preview figures**

- **`pop_ES_2023_HR.geojson.pdf`** — vector preview map rendered from the
  full-resolution dataset.
- **`pop_ES_2023_LR.geojson.pdf`** — vector preview map rendered from the
  simplified dataset, provided for visual comparison with the full-resolution
  version.

## Attributes

| Field        | Type    | Description                                               |
|--------------|---------|-----------------------------------------------------------|
| `nombre`     | string  | Municipality name                                         |
| `codmun_ine` | string  | INE municipal code (5 digits)                             |
| `ccaa`       | string  | Autonomous Community                                      |
| `provincia`  | string  | Province                                                  |
| `cod_nut3`   | string  | NUTS-3 code (Eurostat 2021 classification)                |
| `pob_23`     | int     | Resident population on 1 January 2023                     |
| `area_km2`   | float   | Municipal area in km² (computed in EPSG:3035)             |
| `dens_pob`   | float   | Population density (inhabitants / km²)                    |
| `geometry`   | Polygon / MultiPolygon | Municipal boundary                         |

## Coordinate Reference System

- **EPSG:4258** — ETRS89 geographic coordinates (latitude / longitude in degrees).
- Areas (`area_km2`) were computed after reprojecting the geometries to
  **EPSG:3035** (ETRS89 / LAEA Europe), the standard equal-area projection
  recommended by the European Environment Agency for pan-European analyses.

## Geographic coverage

Mainland Spain and the Balearic Islands. The following territories of the
original source were excluded from this release:

- Autonomous Community of the Canary Islands
- Autonomous City of Ceuta
- Autonomous City of Melilla

The resulting dataset covers 16 Autonomous Communities, 48 provinces and
50 NUTS-3 units (the province of Illes Balears is divided into three NUTS-3
regions: ES531 Mallorca, ES532 Menorca, ES533 Eivissa y Formentera).

## Source and processing

These files are a processed subset of the **"Cifras de Población 2023"** dataset
published by the *Ministerio para la Transición Ecológica y el Reto Demográfico*
(MITECO) of the Government of Spain, originally distributed as an ESRI shapefile.

- Original source:
  <https://www.miteco.gob.es/es/cartografia-y-sig/ide/descargas/reto-demografico/datos-demograficos.html>
- Original publisher: MITECO

### Processing steps applied to the original shapefile

1. Loaded `CifraPob2023.shp` with GeoPandas (8,131 municipalities).
2. Removed administrative auxiliary fields:
   `objectid, natcode, cod_nut1, cod_nut2, cod_ccaa, cod_pro`.
3. Computed `area_km2` from the geometry reprojected to EPSG:3035 and derived
   `dens_pob = pob_23 / area_km2`.
4. Filtered out municipalities of Canarias, Ceuta and Melilla
   (90 municipalities removed → 8 041 retained).
5. Reordered attributes to:
   `nombre, codmun_ine, ccaa, provincia, cod_nut3, pob_23, area_km2, dens_pob, geometry`.
6. Exported to GeoJSON (full resolution and simplified versions).

## License and attribution

This processed dataset is released under the Creative Commons Attribution 4.0 International (CC BY 4.0) license.
The original MITECO source data are reused under their own terms; see the original publisher's legal notice for details:
<https://www.miteco.gob.es/es/atencion-al-ciudadano/aviso-legal.html>

 

 

 

Files

pop_ES_2023_HR_density.png

Files (173.9 MB)

Name Size Download all
md5:4fe379622a542e39a2553dc1856d19ca
150.1 MB Download
md5:73993afb032172520e098b63146cde1a
2.9 MB Preview Download
md5:51d17b978e376e63082ef5ac188948fb
2.8 MB Preview Download
md5:4ab3f91d69a09404d2deb515c4e11c3b
18.1 MB Download