The JRC Water Ocurrence dataset contains maps of the location and temporal distribution of surface water from 1984 to 2020 and provides statistics on the extent and change of those water surfaces. For more information see the associated journal article: Jean-Francois Pekel, Andrew Cottam, Noel Gorelick, Alan S. Belward, High-resolution mapping of global surface water and its long-term changes. Nature 540, 418-422 (2016). (doi:10.1038/nature20584)

These data were generated using 4,185,439 scenes from Landsat 5, 7, and 8 acquired between 16 March 1984 and 31 December 2020. Each pixel was individually classified into water / non-water using an expert system and the results were collated into a monthly history for the entire time period and two epochs (1984-1999, 2000-2020) for change detection.

The Monthly Recurrence collection contains 12 images: monthly measures of the seasonality of water based on the occurrence values detected in that month over all years. The dataset is provided by JRC through Google Earth Engine (GEE).

This R notebook gathers the JRC Water Ocurrence dataset from GEE, and clip the dataset intersecting two transnational watersheds, the Mira-Mataje’s and the Putumayo’s. Then, it shows both the water ocurrence and the water ocurrence change intensity. It happens thanks to EC JRC/Google and to rgee.

## ── rgee 1.0.9 ─────────────────────────────────────── earthengine-api 0.1.266 ── 
##  ✓ email: not_defined
##  ✓ Initializing Google Earth Engine:
 ✓ Initializing Google Earth Engine:  DONE!
## 
 ✓ Earth Engine user: users/ializarazos 
## ────────────────────────────────────────────────────────────────────────────────
aoi1 <- "shp/Putumayo/Cuenca_Putumayo.shp" %>% 
  st_read(quiet = TRUE) %>% 
  sf_as_ee()

aoi2 <- "shp/Mira_Mataje/Cuencas_Mira_y_Mataje.shp" %>% 
  st_read(quiet = TRUE) %>% 
  sf_as_ee()
roi = aoi1$merge(aoi2)
###############################
# Asset List
###############################

gsw = ee$Image('JRC/GSW1_3/GlobalSurfaceWater')
occurrence = gsw$select('occurrence')$clip(roi)
change = gsw$select("change_abs")$clip(roi)
###############################
# Constants
###############################

VIS_OCCURRENCE = list(
  min = 0,
  max = 100,
  palette = c('red', 'blue')
)

VIS_CHANGE = list(
  min = -50,
  max = 50,
  palette = c('red', 'black', 'limegreen')
)

VIS_WATER_MASK = list(
  palette = c('white', 'black')
)
###############################
# Calculations
###############################


# Create a water mask layer, and set the image mask so that non-water areas
# are opaque.
water_mask1 <- occurrence$gt(90)$selfMask()


# Create a water mask layer, and set the image mask so that non-water areas are transparent.
water_mask2 = occurrence$gt(90)$mask(1)
###############################
# Initialize Map Location
###############################
Map$setCenter(-75, 0, 11)  # Putumayo Waterhsed

The Water Occurrence shows where surface water occurred between 1984 and 2020 and provides information concerning overall water dynamics. This product captures both the intra and inter-annual variability and changes.

###############################
# Map Layers
###############################
Map$addLayer(occurrence$updateMask(occurrence$divide(100)), VIS_OCCURRENCE, "Water Occurrence (1984-2020)") +
Map$addLayer(water_mask1, VIS_WATER_MASK, "90% occurrence water mask", FALSE)

The permanent water surfaces (100% occurrence over 37 years) are represented in blue, and areas where water sometimes occurs are shown in pink through to purple. The paler shades are areas where the water occurs less frequently.

###############################
# Map Layers
###############################

Map$addLayer(water_mask2, VIS_WATER_MASK, '90% occurrence water mask', FALSE) +
Map$addLayer(occurrence$updateMask(occurrence$divide(100)),  VIS_OCCURRENCE, "Water Occurrence (1984-2020)") +
Map$addLayer(change, VIS_CHANGE,'occurrence change intensity')

Increases in water occurrence are shown in green and decreases are shown in red. Black areas are those areas where there is no significant change in the water occurrence during the 1984 -2020 period. The intensity of the color represents the degree of change (as a percentage). For example, bright red areas show greater loss of water than light red areas. Some areas appear grey in the maps, these are locations where there is insufficient data to compute meaningful change statistics.