Skip to contents

This function allows to efficiently calculate area of mangrove from Global Mangrove Watch - World Conservation Monitoring Centre (WCMC) for polygons. For each polygon, the area of the mangrove (in hectare) for desired year is returned. The required resources for this indicator are:

Format

A tibble with a column for area of mangrove (in ha) and corresponding year.

Examples

# \dontshow{
mapme.biodiversity:::.copy_resource_dir(file.path(tempdir(), "mapme-data"))
# }
# \dontrun{
library(sf)
library(mapme.biodiversity)

outdir <- file.path(tempdir(), "mapme-data")
dir.create(outdir, showWarnings = FALSE)

aoi <- system.file("extdata", "sierra_de_neiba_478140_2.gpkg",
  package = "mapme.biodiversity"
) %>%
  read_sf() %>%
  init_portfolio(
    years = c(1996, 2016),
    outdir = outdir,
    tmpdir = tempdir(),
    verbose = FALSE
  ) %>%
  get_resources("gmw") %>%
  calc_indicators("mangroves_area") %>%
  tidyr::unnest(mangroves_area)
#> Skipping existing files in output directory.
#> Translating shapefiles to GeoPackages. This may take a while....

aoi
#> 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 mangrove_extent year 
#>    <dbl> <chr>           <chr>         <chr>   <int>           <dbl> <chr>
#> 1 478140 Sierra de Neiba National Park DOM         1               0 1996 
#> 2 478140 Sierra de Neiba National Park DOM         1               0 2016 
#> # ℹ 1 more variable: geom <POLYGON [°]>
# }