esp_munic.sf | R Documentation |
sf
object with all the municipalities of Spain (2019)A sf
object including all municipalities of Spain as provided
by GISCO (2019 version).
A sf
object (resolution: 1:1 million, EPSG:4258) object with
8,131 rows and columns:
INE code of the autonomous community.
INE name of the autonomous community.
INE code of the province.
INE name of the province.
INE code of the municipality.
Name of the municipality.
LAU Code (GISCO) of the municipality. This is a combination of cpro and cmun fields, aligned with INE coding scheme.
geometry field.
https://ec.europa.eu/eurostat/web/gisco/geodata/statistical-units/local-administrative-units, LAU 2019 data.
esp_get_munic()
.
Other datasets:
esp_codelist
,
esp_nuts.sf
,
esp_tiles_providers
,
pobmun19
Other municipalities:
esp_get_capimun()
,
esp_get_munic()
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"
) +
guides(fill = guide_legend(position = "inside")) +
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.inside = c(.2, .95)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.