Skip to contents

Political

These functions return sf objects with political boundaries.

esp_codelist
Database with codes and names of spanish regions
esp_get_can_box() esp_get_can_provinces()
Get sf lines and polygons for insetting the Canary Islands
esp_get_capimun()
Get sf POINT of the municipalities of Spain
esp_get_ccaa() esp_get_ccaa_siane()
Get Autonomous Communities of Spain as sf POLYGON or POINT
esp_get_comarca()
Get 'comarcas' of Spain as sf POLYGON
esp_get_country()
Get sf POLYGON representing 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_munic() esp_get_munic_siane()
Get municipalities of Spain as sf POLYGON
esp_get_nuts()
Get NUTS of Spain as sf POLYGON or POINT
esp_get_prov() esp_get_prov_siane()
Get Provinces of Spain as sf POLYGON or POINT
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 POLYGON of the drainage basin demarcations of Spain
esp_get_hypsobath()
Get sf POLYGON or LINESTRING with hypsometry and bathymetry of Spain
esp_get_rivers()
Get sf POLYGON or LINESTRING of rivers, channels and other wetlands of Spain

Infrastructures

These functions return sf objects with man-made features.

esp_get_railway()
Get sf LINESTRING or POINT with the railways of Spain
esp_get_roads()
Get sf LINESTRING 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 Spain
esp_make_provider()
Create a custom tile provider
esp_tiles_providers
Database of 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 POLYGON with the national geographic grids from BDN
esp_get_grid_EEA()
Get sf POLYGON of the national geographic grids from EEA
esp_get_grid_ESDAC()
Get sf POLYGON of the national geographic grids from ESDAC
esp_get_grid_MTN()
Get sf POLYGON of the national geographic grids from IGN

Cache management

esp_clear_cache()
Clear your mapSpain cache dir
esp_detect_cache_dir()
Detect cache dir for mapSpain
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
Database with codes and names of spanish regions
esp_munic.sf
sf object with all the municipalities of Spain (2019)
esp_nuts.sf
sf object with all the NUTS levels of Spain (2016)
esp_tiles_providers
Database of public WMS and WMTS of Spain
pobmun19
Database with the population of Spain by municipality (2019)

Helpers

A collection of helper functions.

esp_check_access()
Check access to SIANE data
esp_move_can()
Displace a sf object located in the Canary Islands

About the package

mapSpain mapSpain-package
mapSpain: Administrative Boundaries of Spain