Skip to contents

Political borders of Spain

These functions return sf objects representing political borders.

CartoBase ANE

Datasets from IGN / CartoBase ANE.

esp_get_capimun()
City where the municipal public authorities are based - SIANE
esp_get_ccaa_siane()
Autonomous Communities of Spain - SIANE
esp_get_countries_siane()
Countries of the World - SIANE
esp_get_munic_siane()
Municipalities of Spain - SIANE
esp_get_prov_siane()
Provinces of Spain - SIANE
esp_get_spain_siane()
Boundaries of Spain - SIANE
esp_siane_bulk_download()
SIANE bulk download

GISCO

Datasets from GISCO / Eurostat.

esp_get_ccaa()
Autonomous Communities of Spain - GISCO
esp_get_munic()
Municipalities of Spain - GISCO
esp_get_nuts()
Territorial Spanish units for statistics (NUTS) dataset
esp_get_prov()
Provinces of Spain - GISCO
esp_get_spain()
Boundaries of Spain - GISCO

Other helpers and political objects

esp_get_can_box() esp_get_can_provinces()
Canary Islands inset box and outline
esp_move_can()
Displace a sf object located in the Canary Islands
esp_get_comarca()
'Comarcas' of Spain
esp_get_hex_prov() esp_get_hex_ccaa() esp_get_grid_prov() esp_get_grid_ccaa()
Get a sf hexbin or squared POLYGON of Spain
esp_get_simpl_prov() esp_get_simpl_ccaa()
Simplified map of provinces and autonomous communities of Spain

Maps with images

Return static tiles or create an interactive leaflet map.

addProviderEspTiles()
Add a tile layer from Spanish public administrations to a leaflet map
esp_get_tiles() esp_get_attributions()
Get static tiles from public administrations of Spain
esp_make_provider()
Create a custom tile provider
plotRGB(<SpatRaster>)
Red-Green-Blue plot of a multi-layered SpatRaster (from terra)
addProviderTiles() providerTileOptions()
Add a tile layer from a known map provider (from leaflet)
geom_spatraster_rgb()
Visualise SpatRaster objects as images (from tidyterra)

Natural

These functions return sf objects with natural features.

esp_get_hydrobasin()
River basin districts of Spain - SIANE
esp_get_hypsobath()
Hypsometry and bathymetry of Spain - SIANE
esp_get_rivers() esp_get_wetlands()
Rivers and wetlands of Spain - SIANE

Infrastructures

These functions return sf objects with man-made features.

esp_get_railway() esp_get_stations()
Railways of Spain - SIANE
esp_get_roads()
Roads of Spain - SIANE

Cache management

Dictionary

Translation across languages and coding systems.

esp_dict_region_code() esp_dict_translate()
Convert and translate Spanish subdivision names and codes

Datasets

Datasets included with mapSpain.

esp_codelist
Database with codes and names of Spanish regions
esp_nuts_2024
NUTS 2024 for Spain sf object
esp_tiles_providers
Public WMS and WMTS providers for Spain
pobmun25
Population of Spain by municipality (2025)

Geographical grids

Geographical grids are agreed, defined and harmonised grid nets with standardised location and size of grid cells.

esp_get_grid_BDN() esp_get_grid_BDN_ccaa()
National geographic grids from BDN (Nature Data Bank)
esp_get_grid_ESDAC()
National geographic grids from the European Soil Data Centre (ESDAC)
esp_get_grid_MTN()
National geographic grids from IGN MTN ((Mapa Topografico Nacional)

About the package

mapSpain mapSpain-package
mapSpain: Administrative Boundaries of Spain