Skip to contents

GSW transition data contains information about the type of surface water change for each pixel. The raster files have integer cell values between [0, 10] that code for different transition classes:

Usage

calc_gsw_transitions()

Value

A function that returns a tibble with a column for name of the transition classes and corresponding area (in ha).

Details

ValueTransition Class
1Permanent
2New Permanent
3Lost Permanent
4Seasonal
5New Seasonal
6Lost Seasonal
7Seasonal to Permanent
8Permanent to Seasonal
9Ephemeral Permanent
10Ephemeral Seasonal

To aggregate, we sum up the area of each transition class for a given region.

The required resources for this indicator are:

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)

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_global_surface_water_transitions()) %>%
  calc_indicators(calc_gsw_transitions()) %>%
  portfolio_long()

aoi
#> Simple feature collection with 9 features and 10 fields
#> Geometry type: POLYGON
#> Dimension:     XY
#> Bounding box:  xmin: -59.84866 ymin: 8.307999 xmax: -59.71 ymax: 8.364002
#> Geodetic CRS:  WGS 84
#> # A tibble: 9 × 11
#>   WDPAID NAME        DESIG_ENG ISO3  assetid indicator datetime   variable unit 
#>    <dbl> <chr>       <chr>     <chr>   <int> <chr>     <date>     <chr>    <chr>
#> 1  41057 Shell Beac… Managed … GUY         1 gsw_tran… 2021-01-01 gsw_per… ha   
#> 2  41057 Shell Beac… Managed … GUY         1 gsw_tran… 2021-01-01 gsw_new… ha   
#> 3  41057 Shell Beac… Managed … GUY         1 gsw_tran… 2021-01-01 gsw_los… ha   
#> 4  41057 Shell Beac… Managed … GUY         1 gsw_tran… 2021-01-01 gsw_sea… ha   
#> 5  41057 Shell Beac… Managed … GUY         1 gsw_tran… 2021-01-01 gsw_new… ha   
#> 6  41057 Shell Beac… Managed … GUY         1 gsw_tran… 2021-01-01 gsw_sea… ha   
#> 7  41057 Shell Beac… Managed … GUY         1 gsw_tran… 2021-01-01 gsw_per… ha   
#> 8  41057 Shell Beac… Managed … GUY         1 gsw_tran… 2021-01-01 gsw_eph… ha   
#> 9  41057 Shell Beac… Managed … GUY         1 gsw_tran… 2021-01-01 gsw_eph… ha   
#> # ℹ 2 more variables: value <dbl>, geom <POLYGON [°]>
# }