Skip to content

This tool calculates flood probabilities and risks for postcodes in England.

License

Notifications You must be signed in to change notification settings

hustic/Flood_Tool

Repository files navigation

Flood Risk Prediction tool

In environmental hazard assessment, risk is defined as the probability of a hazardous event occuring multiplied by the consequences of that event. Thus high risk can be the result of frequent events of low consequence or rare events of high consequence; the highest risk scenarios are often not obvious.

The Environment Agency routinely collects data on rainfall, sea level and river discharge and has published flooding probability maps that indicate areas of England that fall within four flood probability bands, based on the recurrence interval of flood levels that cause property damage and threat to life. These bands are very low probability (flooding expected once per 1000 years), low probability (flooding expected once per 100 years), medium probability (flooding expected once per 50 years), and high probability (flooding expected once per 10 years).

This tool calculates flood probabilities and risks for postcodes in England.

Two additional scripts were added to expand the functionality of the tool using the Rainfall API.

Installation Guide

To install all the required packages, run

pip install -r requirements.txt
pip install -e .

in the base directory.

User instructions

The Tool object can be imported as

from flood_tool import Tool

The geo functions can be imported as

from flood_tool import geo

For all the functions available, check the documentation or the docstrings in the scripts.

Functionality with Rainfall API

In the repository we included two scripts, step3_api.py and step4_api.py, that use the Rainfall API to expand the capabilities of our flood_tool.

step3_api.py uses the file ./flood_tool/resources/api_postcodes.csv to load the postcodes used on the analysis. The file currently contains an example of the format of the postcodes (one line, coma seperated).

step4_api.pyoutputs graphs of rainfall in quadrants.

To run step3_api.py

python step3_api.py

To run step4_api.py

python step4_api.py

Documentation

The code includes Sphinx documentation. On systems with Sphinx installed, this can be build by running

python -m sphinx docs html

then viewing the index.html file in the html directory in your browser.

For systems with LaTeX installed, a manual pdf can be generated by running

python -m sphinx  -b latex docs latex

Then following the instructions to process the FloodTool.tex file in the latex directory in your browser.

Testing

The tool includes several tests, which you can use to checki its operation on your system. With [pytest installed, these can be run with

python -m pytest flood_tool

The current version also includes a speed scoring algorithm. This can be run with.

python -m score

in the main repository directory.

About

This tool calculates flood probabilities and risks for postcodes in England.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages