getCtryPolyAdmLevelNames: Get the list of admin level names in a polygon shapefile

Description Usage Arguments Value Examples

View source: R/polygons.R

Description

Get the list of admin level names in a polygon shapefile. It returns all official names starting from 1 to the specified lowestAdmLevel. If not lowestAdmLevel is not specified, all admin level names are returned

Usage

1
2
3
4
5
6
7
getCtryPolyAdmLevelNames(
  ctryCode = NULL,
  lowestAdmLevel,
  gadmVersion = pkgOptions("gadmVersion"),
  gadmPolyType = pkgOptions("gadmPolyType"),
  custPolyPath = NULL
)

Arguments

ctryCode

character The ctryCode of the country of interest

lowestAdmLevel

integer The lowest admin level number to return

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

Value

character vector of admin level names

Examples

1
2
3
4
5
6
## Not run: 
Rnightlights:::getCtryPolyAdmLevelNames("KEN")
#returns vector [1] "County"       "Constituency" "Ward"
#if KEN shapefile exists otherwise errors

## End(Not run)

chrisvwn/Rnightlights documentation built on Sept. 7, 2021, 1:44 a.m.