loadCoordIT: Get Italian coordinates

View source: R/IT.R

loadCoordITR Documentation

Get Italian coordinates

Description

Loads and returns names, ids, and coordinates for Italian statistical unit, ready to use with mapping functions and other "map" functions that accept an sf object.

Usage

loadCoordIT(unit = c("none","ripartizione", "regione", "provincia","comune"),
            year = c("2021","2020", "2019", "2018", "2017"),
            unit_subset = NULL, matchWith = NULL,
            dir = NULL, use_cache = TRUE, use_internet = TRUE, crs = NULL)

Arguments

unit

the type of Italian statistical unit to link

year

year of the analysis

unit_subset

character vector of unit names to extract

matchWith

the type of id

dir

local directory in which shape files are stored

use_cache

a logical value indicating whether to use the cache

use_internet

a logical value indicating wheter the coordinates are downloaded from https://github.com/dataallaround/geospatial. If FALSE the maps downloaded during package installation will be used

crs

coordinate reference system. Look at st_crs

Details

Coordinates are download from the Github repo https://github.com/dataallaround/geospatial from IT folder https://github.com/dataallaround/geospatial/tree/master/IT.

unit="none" (default) indicates that the border of Italy is returned.

Value

A data.frame object with column indicating names, id, and the geometry to map.

Author(s)

Alessio Serafini

References

https://github.com/dataallaround/geospatial

See Also

loadCoordEU, loadCoordWR, loadCoordUS, loadCoordDE, loadCoordUK

Examples


IT_coords = loadCoordIT(unit = "regione", year = "2020")
str(IT_coords)



## Italy

IT_coords = loadCoordIT()
str(IT_coords)


coords_it<- loadCoordIT(unit = "regione", unit_subset = c(5, 10), matchWith = "number")
str(coords_it)





mapping documentation built on Oct. 19, 2023, 5:06 p.m.