getCtryNlDataFname: Construct the name of the country data file.

Description Usage Arguments Value Examples

View source: R/ctrynldata.R

Description

Construct the name of the data file. This function can be altered to name the file as required and consistently retrieve the name. Used in the function getCtryNlDataFnamePath to concat the directory path and this filename. Currently all nlTypes are stored in one file. Can be altered to separate VIIRS and OLS data files for example.

Usage

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

Arguments

ctryCode

The ctryCode of interest

admLevel

The country admin level of interest

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 filename of the country data file

Examples

1
2
3
4
ctryCode <- "KEN"
admLevel <- "KEN_adm0"
Rnightlights:::getCtryNlDataFname(ctryCode, admLevel)
#returns string of name of the ctry data file

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