R/country_outline.R
gadm_country_shapefile.Rd
Retrieve the shapefile for a country at the given level. GADM identifies countries with the Alpha-3 country code. If the file doesn't exist, it will return a NULL.
gadm_country_shapefile(alpha3, admin_level = 0, gadm_version = "201104")
alpha3 | The three-letter country code. |
---|---|
admin_level | 0 is the whole country. Different countries have more or fewer levels. |
gadm_version | When this version of GADM was downloaded. |
A shapefile from the sf
package, read with st_read
.
This function depends on having a working tempfile()
command because it
has to unzip the shapefile into a temporary directory.