insertNlDataCol: Insert an aggregate nightlight data column in a country...

Description Usage Arguments Value Examples

Description

Insert an aggregate nightlight data column in a country nightlights dataframe. The number of elements in the vector MUST match the number of rows in the country dataframe.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
insertNlDataCol(
  ctryNlDataDF,
  dataCol,
  nlStat,
  nlPeriod,
  nlType,
  configName,
  extension,
  multiTileStrategy,
  multiTileMergeFun,
  removeGasFlaresMethod = pkgOptions(paste0("removeGasFlaresMethod_", nlType))
)

Arguments

ctryNlDataDF

dataframe with the country data to save

dataCol

the numeric vector to be inserted as a column

nlStat

the stat which produced the dataCol vector

nlPeriod

the nlPeriod that the dataCol belongs to

nlType

the type of nightlight data

configName

character the config shortname of the raster to process

extension

character the extension of the raster to process

multiTileStrategy

character How to handle multiple tiles per nlPeriod

multiTileMergeFun

character The function to use to merge tiles

removeGasFlaresMethod

character The method to use to perform gas flare removal or NULL to disable

Value

the updated dataframe

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
ctryNlDataDF <- Rnightlights:::insertNlDataCol(ctryNlDataDF,
    dataCol, "sum", "201409", "VIIRS.D")
    
## End(Not run)

## Not run: 
ctryNlDataDF <- Rnightlights:::insertNlDataCol(ctryNlDataDF,
    dataCol, "mean", "2012", "OLS.Y")
    
## End(Not run)

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