Examples
Introduction
This section contains executable examples that demonstrate how to use the FloodAdapt API in practice. These notebooks are meant to complement the User Guide and API Reference by showing real-world use cases, recommended workflows, and tips for getting started with your own data.
Each example focuses on a specific aspect of the FloodAdapt workflow, such as setting up a site, defining events, projections and measures, creating adaptation strategies, or evaluating risk and benefits. The notebooks can be run independently, but they are organized in a logical sequence for those following the full workflow from start to finish.
How to Run
All notebooks in this section are runnable with standard Python tools such as jupyter
or quarto preview
. They assume that FloodAdapt and its core
dependencies as well as the optional docs
dependencies are correctly installed. Refer to the Setup Guide for help with installation and configuration. To run these locally, make sure to select the correct python interpreter.
Each notebook includes narrative explanations and inline code cells. You can copy/modify the code to adapt it to your own use cases.
Examples
- 1. Database Builder Demonstrates how to initialize a FloodAdapt project by building the required database structure. This includes importing and configuring SFINCS and Delft-FIAT models, setting up spatial data, and preparing the backend for scenario analysis.
- 2. Simple Scenario Walks through a basic flood scenario setup using predefined hazard and exposure data. Ideal for first-time users, this example illustrates the core workflow of defining a flood event, running simulations, and interpreting impact results.
- 3. Events Explains how to configure and manage flood events within FloodAdapt. Learn to define event characteristics such as rainfall intensity, duration, and spatial distribution, and understand how these parameters influence flood modeling outcomes.
- 4. Projections Covers the integration of long-term projections into flood risk assessments. This includes modeling future conditions like sea level rise, land subsidence, and socio-economic changes to evaluate their impact on flood hazards and vulnerabilities.
- 5. Measures & Strategies Explores the implementation of adaptation measures such as levees, floodwalls, and green infrastructure. Learn how to simulate their effectiveness in reducing flood risks and assess their feasibility within different scenarios. Demonstrates how to develop and compare comprehensive adaptation strategies by combining multiple measures. This example guides users through evaluating trade-offs, cost-effectiveness, and overall risk reduction potential.
- 6. Advanced scenario Provides an in-depth look at modeling compound flood scenarios involving multiple hazard sources (e.g., riverine and coastal flooding) and cascading impacts. Ideal for advanced users seeking to analyze intricate risk profiles.
- 7. Event set / risk Illustrates the creation of probabilistic event sets for comprehensive risk analysis. Learn to generate a range of flood events with varying probabilities to assess potential impacts and inform robust adaptation planning.
- 8. Benefits Focuses on evaluating the benefits of implemented adaptation strategies. This includes quantifying risk reduction, economic savings, and social advantages to support evidence-based decision-making.