Description Usage Arguments Value Examples
Get the path of the unzipped polygon directory downloaded from GADM.ORG. Note the polygons are in ESRI
Shapefile format thus when unzipped create a directory with the name <ctrycode>_adm_shp e.g.
KEN_adm_shp. The directory will contain a number of files including the .shp file.
rgdal::readOGR
can read a shapefile polygon when given the directory path. It will
determine which files to read.
1 2 3 4 5 6 | getPolyFnamePath(
ctryCode = NULL,
gadmVersion = pkgOptions("gadmVersion"),
gadmPolyType = pkgOptions("gadmPolyType"),
custPolyPath = NULL
)
|
ctryCode |
character the ISO3 code of the country |
gadmVersion |
The GADM version to use |
gadmPolyType |
The format of polygons to download from GADM |
custPolyPath |
Alternative to GADM. A path to a custom shapefile zip |
character path to polygon shapefile directory
1 2 3 4 | Rnightlights:::getPolyFnamePath("KEN")
#returns "dataPath/polygons/KEN_adm_shp"
#@export only due to gui() shiny app
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.