Skip to contents

Political

These functions return sf objects with political boundaries

esp_codelist
Spanish Code Translation Data Frame
esp_get_can_box() esp_get_can_provinces()
Get sf lines and polygons for insetting the Canary Islands
esp_get_capimun()
Get sf points of the municipalities of Spain
esp_get_ccaa() esp_get_ccaa_siane()
Get Autonomous Communities of Spain as sf polygons and points
esp_get_comarca()
Get 'comarcas' of Spain as sf polygons
esp_get_country()
Get the borders of Spain as a sf polygon
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_munic() esp_get_munic_siane()
Get municipalities of Spain as sf polygons
esp_get_nuts()
Get NUTS of Spain as sf polygons and points
esp_get_prov() esp_get_prov_siane()
Get Provinces of Spain as sf polygons and points
esp_get_simpl_prov() esp_get_simpl_ccaa()
Get a simplified map of provinces and autonomous communities of Spain
gisco_get_nuts()
Get GISCO NUTS sf polygons, points and lines (from giscoR)

Natural

These functions return sf objects with natural features

esp_get_hydrobasin()
Get sf polygons of the drainage basin demarcations of Spain
esp_get_hypsobath()
Get sf polygons and lines with the hypsometry and bathymetry of Spain
esp_get_rivers()
Get sf polygon and lines of rivers, channels and other wetlands of Spain

Infrastructures

These functions return sf objects with man-made features

esp_get_railway()
Get sf lines and points with the railways of Spain
esp_get_roads()
Get sf lines of the roads of Spain

Tiles

Return static tiles or create a leaflet map

addProviderEspTiles() providerEspTileOptions()
Include base tiles of Spanish public administrations on a leaflet map
esp_getTiles()
Get static tiles from public administrations of Spanish.
leaflet.providersESP.df
Public WMS and WMTS of Spain
coord_sf() geom_sf() geom_sf_label() geom_sf_text() stat_sf()
Visualise sf objects (from ggplot2)
geom_spatraster_rgb()
Visualise SpatRaster objects as images (from tidyterra)

Geographic grids

esp_get_grid_BDN() esp_get_grid_BDN_ccaa()
Get sf polygons of the national geographic grids provided by BDN
esp_get_grid_EEA()
Get sf polygons of the national geographic grids provided by EEA
esp_get_grid_ESDAC()
Get sf polygons of the national geographic grids provided by ESDAC
esp_get_grid_MTN()
Get sf polygons of the national geographic grids provided by IGN

Cache management

esp_clear_cache()
Clear your mapSpain cache dir
esp_set_cache_dir()
Set your mapSpain cache dir

Dictionary

Translation across languages and coding systems

esp_dict_region_code() esp_dict_translate()
Convert and translate Subdivision Names

Datasets

These objects are datasets already included in the package.

esp_codelist
Spanish Code Translation Data Frame
esp_munic.sf
All Municipalities POLYGON object of Spain (2019)
esp_nuts.sf
All NUTS POLYGON object of Spain
leaflet.providersESP.df
Public WMS and WMTS of Spain
pobmun19
Population by municipality (2019)

Helpers

A collection of helper functions

esp_check_access()
Check access to SIANE data

About the package

mapSpain mapSpain-package
mapSpain: Administrative Boundaries of Spain