subset_regions | R Documentation |
Function that allows to clip specific country regions from the 'raw' boundary shapefile when requiring analysis at the sub-national level
subset_regions(mainPath, location, mostRecent = FALSE)
mainPath |
character; the parent directory of the location folder |
location |
character; the location folder name |
mostRecent |
logical; should the most recent boundary shapefile be selected? If FALSE and if there are multiple available inputs, the user is interactively asked to select the input based on file creation time. |
# Replace workDir with the actual path to your working directory
## Not run:
mainPath <- "workDir"
initiate_project(mainPath)
## End(Not run)
# Replace myLocation with the location name you are working on (workDir subfolder)
## Not run:
location <- "myLocation"
download_boundaries(mainPath, location, adminLevel = 1, type = "gbOpen", alwaysDownload = TRUE)
subset_regions(mainPath, location, mostRecent = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.