R/helpers.R
GADM_spoly.Rd
Get SpatialPolygons of countries at distinct administrative levels
GADM_spoly(country_code, boundary_level, keep_data = FALSE)
country_code | (character) code of country or countries of interest. |
---|---|
boundary_level | (numeric) level of administrative division to be considered. |
keep_data | (logical) whether or not to keep downloaded files. Default = |
A SpatialPolygonsDataFrame from the GADM database at the level selected.
If an error occurs when downloading any of the spatial objects based on
country_code
, the result is NULL.
map_gadm <- GADM_spoly(country_code = "UY", boundary_level = 0)