Skip to contents

A sf object including all municipalities of Spain as provided by GISCO (2019 version).

Format

A sf object (resolution: 1:1million, EPSG:4258) object with 8,131 rows and columns:

codauto

INE code of the autonomous community.

ine.ccaa.name

INE name of the autonomous community.

cpro

INE code of the province.

ine.prov.name

INE name of the province.

cmun

INE code of the municipality.

name

Name of the municipality.

LAU_CODE

LAU Code (GISCO) of the municipality. This is a combination of cpro and cmun, aligned with INE coding scheme.

geometry

geometry field.

See also

Examples

data("esp_munic.sf")

teruel_cpro <- esp_dict_region_code("Teruel", destination = "cpro")

teruel_sf <- esp_munic.sf[esp_munic.sf$cpro == teruel_cpro, ]
teruel_city <- teruel_sf[teruel_sf$name == "Teruel", ]

# Plot

library(ggplot2)

ggplot(teruel_sf) +
  geom_sf(fill = "#FDFBEA") +
  geom_sf(data = teruel_city, aes(fill = name)) +
  scale_fill_manual(
    values = "#C12838",
    labels = "City of Teruel"
  ) +
  labs(
    fill = "",
    title = "Municipalities of Teruel"
  ) +
  theme_minimal() +
  theme(
    text = element_text(face = "bold"),
    panel.background = element_rect(colour = "black"),
    panel.grid = element_blank(),
    legend.position = c(.2, .95)
  )
#> Warning: A numeric `legend.position` argument in `theme()` was deprecated in ggplot2
#> 3.5.0.
#>  Please use the `legend.position.inside` argument of `theme()` instead.