Learn R Programming

Rnightlights (version 0.2.4)

getCtryNlDataFname: Construct the name of the country data file.

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

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

Run this code
# NOT RUN {
ctryCode <- "KEN"
admLevel <- "KEN_adm0"
Rnightlights:::getCtryNlDataFname(ctryCode, admLevel)
#returns string of name of the ctry data file

# }

Run the code above in your browser using DataLab