View source: R/helperGeoBoundaries.R
| get_geoBoundaries | R Documentation |
Retrieves official administrative boundary shapefiles from the [geoBoundaries](https://www.geoboundaries.org/) API for a given country ISO3 code and administrative level. Returns the data as an 'sf' object for direct spatial use.
get_geoBoundaries(iso3, adm = "ADM1", release = "gbOpen")
iso3 |
Character. The three-letter ISO3 country code (e.g., '"NGA"', '"ZMB"'). |
adm |
Character. Administrative level to download (e.g., '"ADM0"', '"ADM1"', '"ADM2"'). Defaults to '"ADM1"'. |
release |
Character. geoBoundaries release type. Either '"gbOpen"' (default) for open data or '"gbAuthoritative"' for official boundaries. |
An 'sf' object containing the requested administrative boundaries.
## Not run:
# Download Nigeria Admin 1 boundaries
nga_adm1 <- get_geoBoundaries("NGA", adm = "ADM1")
# Download Burkina Faso Admin 2 boundaries from the authoritative release
bfa_adm2 <- get_geoBoundaries("BFA", adm = "ADM2", release = "gbAuthoritative")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.