# \dontshow{
mapme.biodiversity:::.copy_resource_dir(file.path(tempdir(), "mapme-data"))
# }
if (FALSE) {
if (FALSE) {
library(sf)
library(mapme.biodiversity)
outdir <- file.path(tempdir(), "mapme-data")
dir.create(outdir, showWarnings = FALSE)
mapme_options(
outdir = outdir,
verbose = FALSE,
chunk_size = 1e8
)
aoi <- system.file("extdata", "burundi.gpkg",
package = "mapme.biodiversity"
) %>%
read_sf() %>%
get_resources(
get_ucdp_ged(version = "22.1"),
get_worldpop(years = 2000)
) %>%
calc_indicators(
conflict_exposure(
distance = 5000,
violence_types = 1:3,
years = 2000,
precision_location = 1,
precision_time = 1
)
) %>%
portfolio_long()
aoi
}
}
Run the code above in your browser using DataLab