% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\encoding{UTF-8}
\name{esp_munic.sf}
\alias{esp_munic.sf}
\title{All Municipalities \code{POLYGON} object of Spain (2019)}
\format{
A \code{POLYGON} data frame (resolution: 1:1million, EPSG:4258) object with
8,131 rows and fields:
\itemize{
\item \strong{codauto}: INE code of each autonomous community.
\item \strong{ine.ccaa.name}: INE name of each autonomous community.
\item \strong{cpro}: INE code of each province.
\item \strong{ine.prov.name}: INE name of each province.
\item \strong{cmun}: INE code of each municipality.
\item \strong{name}: Name of the municipality.
\item \strong{LAU_CODE}: LAU Code (GISCO) of the municipality. This is a
combination of \strong{cpro} and \strong{cmun}, aligned with INE coding scheme.
\item \strong{geometry}: geometry field.
}
}
\source{
\url{https://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/}, LAU 2019
data.
}
\description{
A \code{sf} object including all municipalities of Spain as provided by GISCO
(2019 version).
}
\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)
library(ggspatial)

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"
  ) +
  annotation_scale(location = "br") +
  annotation_north_arrow(style = north_arrow_nautical) +
  theme_minimal() +
  theme(
    text = element_text(face = "bold"),
    panel.background = element_rect(colour = "black"),
    panel.grid = element_blank(),
    legend.position = c(.2, .95)
  )
}
\seealso{
\code{\link[=esp_get_munic]{esp_get_munic()}}.

Other datasets: 
\code{\link{esp_codelist}},
\code{\link{esp_nuts.sf}},
\code{\link{leaflet.providersESP.df}},
\code{\link{pobmun19}}

Other municipalities: 
\code{\link{esp_get_capimun}()},
\code{\link{esp_get_munic}()}
}
\concept{datasets}
\concept{municipalities}
