MazamaSpatialUtils (version 0.6.4)

convertGADM: Convert Global Administrative Areas (GADM) Shapefile

Description

A SpatialPolygonsDataFrame file is downloaded from the Database of Global Administrative Areas (GADM) database with additional columns of data added. The resulting file will be created in the spatial data directory which is set with setSpatialDataDir(). Dataset and file names are generated like this:

paste0('gadm_', countryCode, '_', admLevel)

Level 0 will return the national outline. Level 1 will give state/province boundaries. etc.

Usage

convertGADM(countryCode = NULL, admLevel = 0, nameOnly = FALSE)

Arguments

countryCode

ISO-3166-1 alpha-2 country code

admLevel

administrative level to be downloaded

nameOnly

logical specifying whether to only return the name without creating the file

Value

Name of the dataset being created.

References

https://gadm.org/data.html.

Examples

Run this code
# NOT RUN {
convertGADM('DE', 1)
# }

Run the code above in your browser using DataLab