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.
ISO-3166-1 alpha-2 country code
administrative level to be downloaded
logical specifying whether to only return the name without creating the file
Name of the dataset being created.
Not all countries have the same number of levels. Many just have two levels while France has five.
1 2 3 4
## Not run: convertGADM('DE', 1) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.