get_boundaries: download vecor of administrative boundaries

Description Usage Arguments Details Value See Also Examples

View source: R/get_boundaries.R

Description

function to download administrative boundaries data from the gadm archive, starting from a country name or ISO code, and the level of desired administrative units

Usage

1
get_boundaries(iso, level = 1, path = NULL, makefold = TRUE)

Arguments

iso

character iso name or 2/3 digits code of the country

level

numeric level of administrative units returned, default: 0 (Country Level)

path

character

makefold

character

Details

the function is a simple wrapper to the raster::getData function, with a-priori checks on country name or ISO code

Value

SpatialPolygonsDataFrame containing the desired data

See Also

getData

Examples

1
2
3
4
5
6
7
8
## Not run: 
 library(sprawl)
 library(sp)
 ita_boundaries <- get_boundaries("Italy", 0)
 ita_region_boundaries <- get_boundaries("ITA", 1)
 plot(ita_region_boundaries)
 
## End(Not run)

IREA-CNR-MI/sprawl documentation built on May 27, 2019, 1:12 p.m.