View source: R/Get_Shapefile.R
Get_Shapefile | R Documentation |
Downloads either the boundaries or the centroids of the relevant administrative units, either provinces or municipalities, from the ISTAT website. Geometries are expressed in meters.
Get_Shapefile(
Year,
level = "LAU",
lightShp = TRUE,
autoAbort = FALSE,
centroids = FALSE
)
Year |
Numeric. Reference year for the administrative units. |
level |
Character. Either |
lightShp |
Logical. If |
autoAbort |
Logical. Whether to automatically abort the operation and return NULL in case of missing internet connection or server response errors. |
centroids |
Logical. Whether to switch from polygon geometry to point geometry. In the latter case, the point is located at the centroid of the relevant area. |
A spatial data frame of class data.frame
and sf
.
<https://www.istat.it/it/archivio/222527>
library(magrittr)
Prov23_shp <- Get_Shapefile(2023, lightShp = TRUE, level = "NUTS-3", autoAbort = TRUE)
ggplot2::ggplot() + ggplot2::geom_sf(data = Prov23_shp) +
ggplot2::ggtitle("Italian provinces in 2023/01/01")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.