Keywords: data used; waterbodies


The Digital Earth Africa continental Waterbodies Monitoring Service identifies more than 600,000 water bodies from over three decades of satellite observations. This service maps persistent and seasonal water bodies and the change in their water surface area over time. Mapped water bodies may include, but are not limited to, lakes, ponds, man-made reservoirs, wetlands, and segments of some river systems.

On a local, regional, and continental scale, this service helps improve our understanding of surface water dynamics and water availability and can be used for monitoring water bodies such as wetlands, lakes and dams in remote and/or inaccessible locations.

The service offers two products

  • The DE Africa Waterbodies Historical Extent

  • The DE Africa Waterbodies Surface Area Change

The DE Africa Waterbodies Historical Extent product is a static polygon-based view of the DE Africa Water Observations from Space All-Time Summary product. The historical extent represents where water has appeared in at least 5% of clear observations since 1987. It is not a capture of a water body’s true extent in any given year, but a record of where water has appeared since 1987. To be captured in the dataset, polygons must have an area of at least 4,500 metres squared (5 Landsat pixels). The historical extent polygons have been derived from the DE Africa Water Observations from Space All-Time Summary product, which provides historical surface water observations across the African continent.

For each water body, the Surface Area Change product provides the percentage of the historical extent that was classified as wet, dry, or invalid, for each DE Africa Water Observation from Space Feature Layer scene that captured the water body. This can be used to identify when water bodies are increasing or decreasing in wet surface area.

Disclaimer: DE Africa Waterbodies Surface Area Change measures the wet surface area of waterbodies as estimated from satellites. This product does not measure depth, volume, purpose of the waterbody, nor the source of the water.


  • Identify and analyse persistent and seasonal water bodies

  • Water resource management

  • Gain insights into the severity and spatial distribution of drought


This notebook will demonstrate how to load historical extents and wet surface area timeseries from the DE Africa Waterbodies service.

Topics covered include:

  1. Getting a list of available polygons in a given area

  2. Select and plot a single polygon

  3. Plotting the surface area of the polygon over time

Getting started

To run this analysis, run all the cells in the notebook, starting with the “Load packages” cell.

Load packages

Import Python packages that are used for the analysis.

import matplotlib.pyplot as plt

from deafrica_tools.plotting import display_map
from deafrica_tools.waterbodies import (

Analysis parameters

This section defines the analysis parameters, including:

  • lat, lon, buffer: center lat/lon and analysis window size for the area of interest (in degrees)

The default area is a water body in Mauritania.

# Set the central latitude and longitude
lat = 16.59285
lon = -13.64313

# Set the buffer to load around the central coordinates
buffer = 0.1

# Compute the bounding box coordinates
xlim = (lon-buffer, lon+buffer)
ylim =  (lat+buffer, lat-buffer)

# Preview area on a map
display_map(xlim, ylim)
/usr/local/lib/python3.10/dist-packages/deafrica_tools/plotting.py:284: FutureWarning: This function is deprecated. See: https://pyproj4.github.io/pyproj/stable/gotchas.html#upgrading-to-pyproj-2-from-pyproj-1
  all_longitude, all_latitude = transform(Proj(crs), Proj("EPSG:4326"), all_x, all_y)
Make this Notebook Trusted to load map: File -> Trust Notebook

Getting data

The deafrica_waterbodies module allows you to query water bodies by location or geohash.

List waterbody polygons in an area

We can get a list of waterbody polygons inside a bounding box of coordinates using get_waterbodies.

# Create a bounding box from study area coordinates
bbox = (xlim[0], ylim[1], xlim[1], ylim[0])

# Select all water bodies located within the bounding box
polygons = get_waterbodies(bbox, crs="EPSG:4326")
# Return GeoDataFrame with selected water bodies
id area_m2 UID WB_ID perim_m timeseries geometry
0 DEAfrica_Waterbodies.53655 6.300000e+03 edymc5r96 53654 480 https://deafrica-services.s3.af-south-1.amazon... MULTIPOLYGON (((-13.65645 16.49794, -13.65614 ...
1 DEAfrica_Waterbodies.53657 1.350000e+04 edymcesu9 53656 540 https://deafrica-services.s3.af-south-1.amazon... MULTIPOLYGON (((-13.63873 16.50014, -13.63810 ...
2 DEAfrica_Waterbodies.53658 7.470000e+04 edymcm9fc 53657 1260 https://deafrica-services.s3.af-south-1.amazon... MULTIPOLYGON (((-13.65489 16.51141, -13.65303 ...
3 DEAfrica_Waterbodies.53660 2.637000e+05 edymf605w 53659 4080 https://deafrica-services.s3.af-south-1.amazon... MULTIPOLYGON (((-13.61354 16.49377, -13.61074 ...
4 DEAfrica_Waterbodies.53661 4.230000e+04 edymg5546 53660 1140 https://deafrica-services.s3.af-south-1.amazon... MULTIPOLYGON (((-13.57592 16.49769, -13.57499 ...
5 DEAfrica_Waterbodies.53696 6.300000e+03 edynz8g7z 53695 360 https://deafrica-services.s3.af-south-1.amazon... MULTIPOLYGON (((-13.72827 16.66043, -13.72765 ...
6 DEAfrica_Waterbodies.53697 1.710000e+04 edynzgzec 53696 660 https://deafrica-services.s3.af-south-1.amazon... MULTIPOLYGON (((-13.71210 16.67711, -13.71148 ...
7 DEAfrica_Waterbodies.53726 2.790000e+04 edyq33hrp 53725 1500 https://deafrica-services.s3.af-south-1.amazon... MULTIPOLYGON (((-13.64805 16.57537, -13.64774 ...
8 DEAfrica_Waterbodies.53727 5.753700e+06 edyq3kwze 53726 38220 https://deafrica-services.s3.af-south-1.amazon... MULTIPOLYGON (((-13.62816 16.61287, -13.62722 ...
9 DEAfrica_Waterbodies.53728 5.400000e+03 edyq3y1v1 53727 300 https://deafrica-services.s3.af-south-1.amazon... MULTIPOLYGON (((-13.63189 16.60160, -13.63126 ...
10 DEAfrica_Waterbodies.53729 2.700000e+04 edyq538rh 53728 840 https://deafrica-services.s3.af-south-1.amazon... MULTIPOLYGON (((-13.56752 16.53371, -13.56721 ...
11 DEAfrica_Waterbodies.53730 3.060000e+04 edyq6p387 53729 1140 https://deafrica-services.s3.af-south-1.amazon... MULTIPOLYGON (((-13.62007 16.60870, -13.61976 ...
12 DEAfrica_Waterbodies.53731 1.890000e+04 edyq6pezj 53730 600 https://deafrica-services.s3.af-south-1.amazon... MULTIPOLYGON (((-13.61821 16.61042, -13.61696 ...
13 DEAfrica_Waterbodies.53732 1.620000e+04 edyq6pjdn 53731 840 https://deafrica-services.s3.af-south-1.amazon... MULTIPOLYGON (((-13.61603 16.60723, -13.61572 ...
14 DEAfrica_Waterbodies.53733 1.035000e+05 edyq86wpu 53732 3360 https://deafrica-services.s3.af-south-1.amazon... MULTIPOLYGON (((-13.69034 16.62930, -13.69003 ...
15 DEAfrica_Waterbodies.53734 3.780000e+04 edyq87j4t 53733 1560 https://deafrica-services.s3.af-south-1.amazon... MULTIPOLYGON (((-13.69345 16.62954, -13.69221 ...
16 DEAfrica_Waterbodies.53735 1.467000e+05 edyqc8m45 53734 3300 https://deafrica-services.s3.af-south-1.amazon... MULTIPOLYGON (((-13.63686 16.65921, -13.63531 ...
17 DEAfrica_Waterbodies.53736 1.197000e+05 edyqdtj3d 53735 2100 https://deafrica-services.s3.af-south-1.amazon... MULTIPOLYGON (((-13.59333 16.64180, -13.59271 ...
18 DEAfrica_Waterbodies.53737 5.940000e+04 edyqdxeh8 53736 1620 https://deafrica-services.s3.af-south-1.amazon... MULTIPOLYGON (((-13.59644 16.65479, -13.59613 ...

The returned geodataframe includes all the water bodies which are located within the bounding box. This dataset contains metadata for each water body in the dataset, including the ID, UID, WB_UID, area, perimeter and time series. See the Waterbodies Historical Extent documentation for descriptions of each attribute.

Displaying the polygons

Once the water body polygons are in memory, you can plot them directly, or explore them in an interactive window.

# Plot the waterbody polygons located within the bounding box
<Axes: >
# Explore the waterbody polygons located within the bounding box
Make this Notebook Trusted to load map: File -> Trust Notebook


Every water body in DE Africa Water Bodies has a unique identifier (UID) called a geohash. The geohash of a water body is derived from its position, and this process can be reversed to obtain the location from the geohash. A waterbody’s geohash is contained under the UID attribute and can be obtained through DE Africa Maps by clicking on a waterbody.

Note: You might notice that these polygons have a range of similar geohash prefixes (“edyg” or “edz”). If two geohashes have a similar prefix, this means that they are close together.

Getting data for a specific water body

We can use the .explore() function above to interactively explore the subset of water bodies located within the bounding box. Hovering over a water body will display its attributes, including the water body’s geohash (UID). After noting the geohash from the .explore() function, we can use it to extract just that water body through the get_waterbody() function.

By default, try the geohash edyq3kwze.

selected_waterbody_geohash = "edyq3kwze"

selected_waterbody = get_waterbody(selected_waterbody_geohash)
id area_m2 UID WB_ID perim_m timeseries geometry
0 DEAfrica_Waterbodies.53727 5.753700e+06 edyq3kwze 53726 38220 https://deafrica-services.s3.af-south-1.amazon... MULTIPOLYGON (((-13.62816 16.61287, -13.62722 ...

Plot the selected water body


Get the wet surface area time series for the selected waterbody

For any given geohash or a polygon, we can also use the get_time_series() function to get various measures of the water body surface over time. See the Waterbodies Historical Extent documentation for descriptions of the different surface measures.

# Get time series for the selected water body
selected_waterbody_timeseries = get_time_series(waterbody=selected_waterbody.iloc[0])

# Select only the wet percentage surface measure
wet_percentage_timeseries = selected_waterbody_timeseries["pc_wet"]

# Plot the wet percentage time series and customise the y-axis label
plt.title(f"Percentage of water body '{selected_waterbody_geohash}' classified as wet")
plt.ylabel("Wet Surface Area Percentage");
plt.ylim(0, 100);