esp_get_simpl: Simplified map of provinces and autonomous communities of...

esp_get_simplR Documentation

Simplified map of provinces and autonomous communities of Spain

Description

Simplified map with the boundaries of the provinces or autonomous communities of Spain, as provided by the INE (Instituto Nacional de Estadistica).

Usage

esp_get_simpl_prov(
  prov = NULL,
  update_cache = FALSE,
  cache_dir = NULL,
  verbose = FALSE
)

esp_get_simpl_ccaa(
  ccaa = NULL,
  update_cache = FALSE,
  cache_dir = NULL,
  verbose = FALSE
)

Arguments

prov, ccaa

character. A vector of names and/or codes for provinces and autonomous communities or NULL to get all the data. See Details.

update_cache

logical. Should the cached file be refreshed? Default is FALSE. When set to TRUE, it will force a new download.

cache_dir

character string. A path to a cache directory. See Caching strategies section in esp_set_cache_dir().

verbose

logical. If TRUE displays informational messages.

Details

Results are provided without CRS, as provided by source.

You can use and mix names, ISO codes, "codauto"/ "cpro" codes (see esp_codelist) and NUTS codes of different levels.

When using a code corresponding to a higher level (e.g. esp_get_prov("Andalucia")) all the corresponding units of that level are provided (in this case, all the provinces of Andalusia).

Value

A sf object.

Source

INE: PC_Axis files

See Also

esp_get_gridmap.

Other datasets representing political borders: esp_get_capimun(), esp_get_ccaa(), esp_get_ccaa_siane(), esp_get_comarca(), esp_get_countries_siane(), esp_get_gridmap, esp_get_munic(), esp_get_munic_siane(), esp_get_nuts(), esp_get_prov(), esp_get_prov_siane(), esp_get_spain(), esp_get_spain_siane(), esp_siane_bulk_download()

Examples



prov_simp <- esp_get_simpl_prov()

library(ggplot2)

ggplot(prov_simp) +
  geom_sf(aes(fill = ine.ccaa.name)) +
  labs(fill = "CCAA")

# Provs of Single CCAA

and_simple <- esp_get_simpl_prov("Andalucia")

ggplot(and_simple) +
  geom_sf()

# CCAAs

ccaa_simp <- esp_get_simpl_ccaa()

ggplot(ccaa_simp) +
  geom_sf() +
  geom_sf_text(aes(label = ine.ccaa.name), check_overlap = TRUE)



mapSpain documentation built on Jan. 17, 2026, 9:07 a.m.