Skip to contents

This functions allows to efficiently calculate emission statistics for areas of interest. For each year in the analysis timeframe, the forest losses from Hansen et al. (2013) are overlayed with the respective emission layer from Harris et al. (2021) and area-wise emission statistics are calculated for each year. The required resources for this indicator are:

Format

A tibble with a column for years and emissions (in Mg)

Details

The following arguments can be set:

min_size

The minimum size of a forest patch to be considered as forest in ha.

min_cover

The minimum cover percentage per pixel to be considered as forest.

Examples

if (Sys.getenv("NOT_CRAN") == "true") {
  library(sf)
  library(mapme.biodiversity)

  temp_loc <- file.path(tempdir(), "mapme.biodiversity")
  if (!file.exists(temp_loc)) {
    dir.create(temp_loc)
    resource_dir <- system.file("res", package = "mapme.biodiversity")
    file.copy(resource_dir, temp_loc, recursive = TRUE)
  }

  (try(aoi <- system.file("extdata", "sierra_de_neiba_478140_2.gpkg",
    package = "mapme.biodiversity"
  ) %>%
    read_sf() %>%
    init_portfolio(
      years = 2016:2017,
      outdir = file.path(temp_loc, "res"),
      tmpdir = tempdir(),
      add_resources = FALSE,
      verbose = FALSE
    ) %>%
    get_resources(
      resources = c("gfw_treecover", "gfw_lossyear", "gfw_emissions"),
      vers_treecover = "GFC-2021-v1.9", vers_lossyear = "GFC-2021-v1.9"
    ) %>%
    calc_indicators("treecoverloss_emissions", min_size = 1, min_cover = 30) %>%
    tidyr::unnest(treecoverloss_emissions)))
}
#> Simple feature collection with 2 features and 7 fields
#> Geometry type: POLYGON
#> Dimension:     XY
#> Bounding box:  xmin: -71.80933 ymin: 18.57668 xmax: -71.33201 ymax: 18.69931
#> Geodetic CRS:  WGS 84
#> # A tibble: 2 × 8
#>   WDPAID NAME  DESIG_ENG ISO3  assetid years emissions                      geom
#>    <dbl> <chr> <chr>     <chr>   <int> <int>     <dbl>             <POLYGON [°]>
#> 1 478140 Sier… National… DOM         1  2016     2832. ((-71.76134 18.66333, -7…
#> 2 478140 Sier… National… DOM         1  2017     3468. ((-71.76134 18.66333, -7…