Add README file to the root data path
Checks if all data is available
Check if all nlPeriods are valid for given nlTypes
Create a zonal file if it does not exist and calculate the zonal stats
Checks if all given character strings are valid nlTypes
Check if a vector/list of values given is valid as per the given validation function
Initiates the country nightlight dataframe with the country admin level
data read from the polygon
Add an index column to all layers of a polygon
Check if all ctryCodes are valid
Download a country's polygon shapefile from http://gadm.org Creates a tile Spatial Polygons DataFrame from the "nlTiles"
dataframe
Download a country's polygon RDS files from http://gadm.org Get the integer number of the layer.
Convert country names to ISO3 codes
Download a country's polygon shapefile from http://gadm.org Check if the decompressed country polygon has been downloaded and stored in the polygon folder
Delete an aggregate nightlight data column in a country nightlights dataframe
Check if the decompressed country polygon has been stored as RDS
Download the listed tiles for a given nlType in a given nlPeriod
A package-wide hidden environment
Download a country's polygon RDS files from http://gadm.org Check if the compressed country polygon has been downloaded and stored in the polygon folder
Calculate statistics on a nightlight raster that fall within a polygon
Calculate the RAM to provide to the package for gdal calculations
Construct the full path to save the file containing the country data
Calculate zonal statistics using GDAL
Run a web application to explore the processed nightlight data cached
locally
Construct the name of the country data file.
Generate a list of all possible configNames for a given nlType
Get all known valid ISO3 country codes
Download OLS nightlight tile
Checks if all ctry admLevels are valid
Specify the wgs84 CRS globally
Return a vector of GADM versions
Construct the name of a nightlight data column given the nightlight type and nlPeriod
Return a vector of GADM polyTypes
Returns nightlight statistics for the given ctryCode and nlType in the given nPeriods
Constructs the filename used to save/access the decompressed OLS .tif file
Constructs the full path used to save/access the compressed downloaded tile
Get the paths to the various data locations
The name with which to save the OLS tile locally
Gets the root path to the file directory"
Constructs the filename of the decompressed OLS .tif file
Get the name of the lowest ctry admin level
Get all the admLevels in a country
Order polygon shapefile layers in custom polygons
Convert pre-0.2.0 nlType names to their new names
Function to test the use of rowcols and lonlats in getCtryNlData
Convert a country ISO3 code to the full name
Function to return the url of the VIIRS tile to download
Returns the directory name of the unzipped shapefile downloaded from
http://gadm.org without the path
extract data from a raster using one polygon in a multipolygon
Calculate zonal statistics. Used internally
Retrieve default global options for the Rnightlights package
Checks if ctry admLevels are valid
Deletes a root data path all sub-directories
Perform upgrade functions to new package versions as required
Save a data frame of a country's data to the appropriate location
Check whether GADM versions are valid
Check whether GADM polyTypes are valid
Downloads nightlight tiles and country polygons and calls the function to process them
Processes nightlights for an individual country in a particular nlPeriod
Get the filename of the polygon zip file as downloaded from http://GADM.ORG Create a mapping of all countries and the tiles they intersect
getTilesCtryIntersectVIIRS
Get a list of tiles that a country polygon intersects with
Extract raster pixel values within the boundaries of a polygon
Download VIIRS nightlight tile
Check if VIIRS nightlight stats exist locally
Save ctry admin structure to text file for faster access
Construct the full path to the country struct file
Get the list of admin level names in a polygon shapefile
Lists supported nightlight types
Generate a list of all possible nlPeriods for a given nlType
Construct the name for the country struct file
Get the GADM url from which to download country polygons
getNlTileTifLclNamePathVIIRS
Constructs the full path used to save/access the decompressed VIIRS .tif file
Plot a country boundary with the VIIRS tiles and world map
Format credits to print to the console
List locally cached tiles
Get the path of the unzipped polygon directory downloaded from GADM.ORG
mapAllCtryPolyToTilesVIIRS
Create a mapping of all countries and the tiles they intersect
Create a range of nlPeriods
Get the filename of the polygon zip file as downloaded from http://GADM.ORG Constructs the filename of the decompressed VIIRS .tif file
Clean up the environment after processing (Not yet implemented)
Sets the root path to the package data directory
Add data version file to the root data path
Read a country admLevel polygon
Check valid tile number for a given VIIRS nightlight type
Check if a configName is valid for a given nlType
Check if an nlPeriod is valid for a given nightlight type
Checks if a given character string is a valid nlType
Reads the ctry admin structure from struct text file
Check if country codes are valid
Create required data subdirectories in the root data path
getCtryStructAdmLevelNames
Get the list of admin level names from a ctryStruct file
Checks if a country polygon exists
getCtryRasterOutputFnamePath
Get the full path to the file where the cropped VIIRS country raster is stored.
Constructs the name of the output raster
Check if a country admin level data file exists
Get the standard names of polygon layers in a country
Constructs the filename used to save/access the downloaded VIIRS tile .tgz file
Create mapping of nightlight tiles
Make the rworldmap available for other functions
Returns a list of VIIRS nightlight tiles that a country or countries
intersects with
Constructs the full path used to save/access the downloaded tile .tgz file
Detect the amount of available RAM on the computer
List available cropped country rasters
Insert an aggregate nightlight data column in a country nightlights dataframe
List available data
Interactively allows the user to set up the default root path
Get the index of a tile given its name
Get the name of a tile given its index
tilesPolygonIntersectVIIRS
Get the list of VIIRS tiles that a polygon intersects with
Function to return the url of the tile to download
getNlTileTifLclNamePathOLS
Constructs the full path used to save/access the decompressed OLS .tif file
Function to return the url of the OLS tile to download
Reset global options for the Rnightlights package
Set or get options for the Rnightlights package
Search for the admLevel by official name
Search for a country by name or code
Check if a country dataframe is valid
Check valid VIIRS nightlight tile name
Check if given statistics are valid