getDOSE_geom | R Documentation |
This function downloads and loads GADM-DOSE geometries from a remote source. The geometries are stored in a temporary directory by default, or in a user-specified location if provided. The uncompressed geometries file is approximately 769 MB.
getDOSE_geom(path = NULL, countries = NULL, download = FALSE)
path |
Optional character string specifying where to store the files. If NULL (default), uses tempdir(). |
countries |
Optional vector of ISO3C country codes to filter geometries. If NULL (default), all available geometries are returned. |
download |
Logical indicating whether to download without confirmation. Default is FALSE, which will prompt for confirmation in interactive sessions. Set to TRUE to skip confirmation. |
An sf object containing the GADM-DOSE geometries
# Load all geometries with download confirmation
geom_all <- getDOSE_geom()
# Load geometries with automatic download
geom_auto <- getDOSE_geom(download = TRUE)
# Load geometries for specific countries
geom_subset <- getDOSE_geom(
countries = c("USA", "CAN", "MEX"),
download = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.