getCtryShpLyrNames: Get the standard names of polygon layers in a country

Description Usage Arguments Value Examples

View source: R/polygons.R

Description

Get the standard name of a polygon layer for a country. Used to refer to a polygon layer by name i.e. for CTRYCODE & lyrNum="0": lyrName="CTRYCODE_adm0", lyrNum="1": lyrName="KEN_adm1". Note this is different from the official country administration level name.

Usage

1
2
3
getCtryShpLyrNames(ctryCodes = NULL, lyrNums, dnldPoly,
  gadmVersion = pkgOptions("gadmVersion"),
  gadmPolyType = pkgOptions("gadmPolyType"), custPolyPath = NULL)

Arguments

ctryCodes

the ISO3 codes for the countries

lyrNums

the layer numbers starting from 0 = country level, 1 = first admin level

dnldPoly

logical If the country polygon doesn't exist should we download it?

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 layer name

Examples

1
2
3
4
5
6
7
8
## Not run: 
#requires KEN polygon shapefile to exist in the polygons folder
getCtryShpLyrNames("KEN","1")
  #returns "KEN_adm1"

## End(Not run)

#export only due to exploreData() shiny app

Rnightlights documentation built on Aug. 29, 2019, 5:02 p.m.