# \dontshow{
mapme.biodiversity:::.copy_resource_dir(file.path(tempdir(), "mapme-data"))
# }
if (FALSE) {
library(sf)
library(mapme.biodiversity)
outdir <- file.path(tempdir(), "mapme-data")
dir.create(outdir, showWarnings = FALSE)
mapme_options(
outdir = outdir,
verbose = FALSE
)
aoi <- system.file("extdata", "shell_beach_protected_area_41057_B.gpkg",
package = "mapme.biodiversity"
) %>%
read_sf() %>%
get_resources(
get_man_carbon(),
get_vul_carbon(),
get_irr_carbon()
) %>%
calc_indicators(
calc_man_carbon(stats = "sum"),
calc_vul_carbon(stats = "sum"),
calc_irr_carbon(stats = "sum")
) %>%
portfolio_long()
aoi
}
Run the code above in your browser using DataLab