There is a newer version of the record available.

Published March 30, 2025 | Version 1.0.0

Global Urban-Rural Floods Dataset

  • 1. ROR icon Pacific Northwest National Laboratory

Description

Global urban-rural flood occurrence dataset description:

This repository provides code to generate and analyze global urban flood patterns. It integrates 10-meter Sentinel-2-based Dynamic World water class with supplementary geospatial datasets, including ESA WorldCover, FABDEM, and GHSL, to compute flood occurrence and extract metrics across both urban and rural areas.

This processing pipeline uses both label-based and probability-based Dynamic World water classifications. It applies a sequence of physical and contextual masks to exclude non-floodable or non-observable regions (e.g., semi-permanent and permanent water bodies, steep slopes, areas under roofs). The resulting output is an interpretable flood occurrence image, which is then reduced over pre-defined urban and rural polygons using the ESA CCI 2018 land cover built-up class.

Key features of the dataset include:

  • Dynamic World water detection using both label (label = 0) and probability (water > 0.5) layers

  • Masking based on:

    • ESA WorldCover (to exclude permanent water, wetlands, mangroves)

    • FABDEM (to remove steep slopes)

    • GHSL (to mask building footprints)

  • Mean flood occurrences are exported for global urban and rural clusters above 1 sq km

This dataset is designed to support multiple sensitivity analyses with minor code changes:

  • Year-specific analysis: Modify the START and END date variables to extract flood occurrence for a single or multi year, or a specific flood event

  • Vegetation inclusion or exclusion: Toggle ESA WorldCover filtering to include or exclude flooded vegetation (e.g., wetlands, mangroves)
    Major cities vs global analysis: Sort urban or rural polygons by area and limit to the top 1000 largest cities (using the 'Urban_Area' field)

  • Flood mask thresholding: Apply additional limits to final flood fraction values, such as less than 10 percent to avoid building shadows, less than 50 percent to exclude permanent water, or no threshold for single-event flood

These configurations are adjustable within the provided Earth Engine script (floodDatasetCreate_GEEscript.rtf). Users can modify these parameters to clip to any region of interest or temporal extent, including single flood events, seasonal or annual composites, or multi-year summaries.

 

Pre-Created datasets:

floods201823_allCitiesMain.csv

Contains flood percentage, vegetation, built-up area, location, and population for ~83,000 cities

 

Supplementary datasets:

  • floods201823_allCitiesMain_Clouds.csv: Urban–rural cloud probability difference

  • floods201823_allCitiesMain_Rain.csv: Urban–rural rainfall difference

  • floods201823_allCitiesMain_vegetation.csv: ESA WorldCover vegetation classes

 

Sensitivity analysis datasets:

  • flood_analysis_combined_2018_2023_with_countries_largest1000_u50.csv

           Top 1000 cities, building-shadow filtered

  • flood_analysis_combined_2018_2023_with_countries_largest1000_u50_nFV.csv

           Top 1000 cities, includes flooded vegetation

  • top1000DWflood_citiesNames_<YEAR>_largest1000_u50[_nFV].geojson

           Annual flood measurements with/without flooded vegetation filtering

 

Shapefiles required for analysis (from Natural Earth, provided):

  • worldCitiesNaturalEarth.geojson – City locations and attributes

  • ne_110m_admin_0_countries.zip – Country boundaries

  • ne_10m_coastline.zip – Used to classify cities as coastal or inland

 

Run analysis on pre-created flood data:

UFD_code.ipynb

Main analysis notebook:

  • Urban vs. rural flood percentage comparisons

  • Comparisons across Global North vs. South, Coastal vs. Inland, and country-level

  • Vegetation and built-up land cover contrasts

  • Urban population exposure mapping

  • Urban–rural cloud and rainfall differences

  • Mean urban flood rate mapping

 

UFD_code_rainclouds.ipynb

Generates raincloud and violin plots:

  • Urban vs. rural flood differences

  • Global North/South and Coastal/Inland comparisons

  • Vegetation and built-up contrasts by flood tendency

  • (Separated due to plotting library issues)

 

UFD_code_floodsLargest1000_perYear.ipynb

Year-by-year flood analysis for the top 1000 cities (2018–2023)

 

UFD_code_largest1000_under50Water.ipynb

Sensitivity analysis excluding pixels with >50% water occurrence

 

UFD_code_largest1000_under50Water_noFloodedVeg.ipynb

Sensitivity analysis excluding both high water occurrence and flooded vegetation



How to use the repository:

To create flood data

  • Open floodDatasetCreate_GEEscript.rtf

  • Copy-paste the script into the Google Earth Engine Code Editor (free to use with a Google Earth Engine account)

  • Set your desired region, period, and filtering options in the script

  • Export results as tables or images

 

To run the analysis

  • Use Google Colab to open the Jupyter notebooks (recommended, free to use with a Google account, most libraries are already installed unless specifically installed in the notebooks)

  • Ensure that the required CSVs are uploaded and paths updated in the notebooks

  • All code blocks will run sequentially and save output figures as PDF files

 

 

Expected Runtimes:

Creating data:
Processing time depends on the number of Sentinel-2 Dynamic World images and the export format (CSV or GeoTIFF).

  • For a single flood event and a small region of interest: a few minutes

  • For full-year or multi-year composites: several hours to a few days, depending on region size and Earth Engine queue times

Running analysis on pre-created datasets:

  • Main analysis notebook (UFD_code.ipynb): ~10–15 minutes

  • Raincloud plots (UFD_code_rainclouds.ipynb) and sensitivity analyses: <5 minutes each

 

Software Versions:

  • Python: 3.10.12 (Google Colab, April 2025)
  • Earth Engine API (April 2025)
  • Installed Python Package Versions:
    • ptitprince: 0.2.6
    • cartopy: 0.22.0
    • contextily: 1.4.0
    • mapclassify: 2.6.1
    • fuzzywuzzy: 0.18.0

Files

UFP_dataset.zip

Files (52.8 MB)

Name Size Download all
md5:7f4d6b8aad6f56122762792f70313d7c
52.8 MB Preview Download

Additional details

Dates

Submitted
2025-03