initiate_project | R Documentation |
Select the country or city, get the ISO 3166-1 alpha-3 country code, store it in a config.txt file and create the directory main structure for the project. This function also creates a log.txt file that will record and track the main operations related to the project.
initiate_project(
mainPath,
allowInteractivity = TRUE,
city = FALSE,
name = NULL,
iso = NULL,
testMode = FALSE
)
mainPath |
character; a path where the country/city folder will be created |
allowInteractivity |
logical; whether to enable interactivity. |
city |
logical; whether to focus on cities instead of countries. |
name |
character; country or city name required when |
iso |
character; optional and only when city is TRUE, the ISO 3166-1 alpha-3 country code. The ESRI World Urban Areas dataset may have inaccurate country information for cities situated near borders, and this parameter allows the user to set up the country in which is located the city. Using an incorrect code for downloading the population raster can result in either an issue or obtaining the wrong population dataset. |
testMode |
logical; |
The final structure arises when downloading and processing the data with the corresponding functions, and it allows multiple 'raw' inputs and multiple 'processed' outputs for each input. This can be useful when performing different analyses for the same country (e.g. when we have updated data).
# Replace workDir with the actual path to your working directory
## Not run:
mainPath <- "workDir"
initiate_project(mainPath)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.