Skip to contents

This function allows to efficiently retrieve the name of the ecoregions and compute the corresponding area from Terrestrial Ecoregions of the World (TEOW) - World Wildlife Fund (WWF) for polygons. For each polygon, the name and area of the ecoregions (in hectare) is returned. The required resources for this indicator are:

Format

A tibble with a column for name of the ecoregions and corresponding area (in ha).

Examples

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 = 2001,
    outdir = file.path(temp_loc, "res"),
    tmpdir = tempdir(),
    add_resources = FALSE,
    verbose = FALSE
  ) %>%
  get_resources("teow") %>%
  calc_indicators("ecoregion") %>%
  tidyr::unnest(ecoregion)))
#> Simple feature collection with 1 feature 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: 1 × 8
#>   WDPAID NAME            DESIG_ENG     ISO3  assetid ecoregions             area
#>    <dbl> <chr>           <chr>         <chr>   <int> <chr>                 <dbl>
#> 1 478140 Sierra de Neiba National Park DOM         1 Hispaniolan pine fo… 18349.
#> # ℹ 1 more variable: geom <POLYGON [°]>