Learn R Programming

Rnightlights (version 0.2.3)

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

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

getCtryPolyAdmLevelNames(ctryCode = NULL, lowestAdmLevel,
  gadmVersion = pkgOptions("gadmVersion"), 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

custPolyPath

Alternative to GADM. A path to a custom shapefile zip

Value

character vector of admin level names

Examples

Run this code
# NOT RUN {
Rnightlights:::getCtryPolyAdmLevelNames("KEN")
#returns vector [1] "County"       "Constituency" "Ward"
#if KEN shapefile exists otherwise errors
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab