# rainfall-thresholds > A small Python library with no dependencies for the rainfall thresholds of shallow landslides (Caine intensity-duration power law): rainfall events from an hourly series, how far an event is above a threshold, fitting a threshold on past landslides, measuring its cost in false alarms, and T5 thresholds for Italy fitted on the 5,974 landslides of e-ITALICA. It also gives the answers as facts, an MCP server and a check that a text quotes the numbers right. - Install: `pip install rainfall-thresholds` (extra: `mcp`). Python 3.12+. No dependencies. - A threshold exceeded is not an alert: the official alert in Italy is the criticality bulletin of the Dipartimento della Protezione Civile. - mm is a total, mm/h an intensity; exceedance is in decades (log10 of the ratio). - `None` in a series is an hour not measured, never dry. Use `strongest_event`, not `latest_event`, to find the event that matters. - The Italian thresholds are fitted on rain gauges: on radar or model rain the comparison is not validated. ## Docs - [Home](https://agentengineering.it/rainfall-thresholds/): the guide: the idea, how it works, quick start, events, comparing, fitting, measuring, the thresholds for Italy, benchmark, notebooks and Docker, API at a glance - [Try it](https://agentengineering.it/rainfall-thresholds/explainer/): an interactive intensity-duration plane in the browser: a region, a duration and a rain total against the Italian threshold and the landslides of the past - [Examples](https://agentengineering.it/rainfall-thresholds/examples/): the five notebooks, the calibration bench and Try it - [Benchmark](https://agentengineering.it/rainfall-thresholds/benchmark/): known cases where the answer is known, and how each version scores - [Roadmap](https://agentengineering.it/rainfall-thresholds/roadmap/): the phases of the plan, what each measured, what is still open - [Riuso nella PA](https://agentengineering.it/rainfall-thresholds/riuso/): in Italian, for a public body: the calibration bench, what it does not do, what stays with the body - [Changelog](https://agentengineering.it/rainfall-thresholds/changelog/): what changed in each release - [Contributing](https://agentengineering.it/rainfall-thresholds/contributing/): how to contribute ## API reference - [Threshold](https://agentengineering.it/rainfall-thresholds/api/threshold/): The power-law rainfall intensity-duration threshold (Caine 1980) - [Rainfall events](https://agentengineering.it/rainfall-thresholds/api/events/): Rainfall events from an hourly series, after Melillo et al. (2018) - [Fitting](https://agentengineering.it/rainfall-thresholds/api/fit/): Fitting a threshold to the rainfall conditions that triggered landslides - [Italy (T5 thresholds)](https://agentengineering.it/rainfall-thresholds/api/italy/): T5 thresholds for Italy, fitted on the e-ITALICA catalogue - [A series against a threshold](https://agentengineering.it/rainfall-thresholds/api/assess/): A measured hourly series against a threshold: windows, the event, the excess - [Antecedent precipitation](https://agentengineering.it/rainfall-thresholds/api/antecedent/): The Antecedent Precipitation Index (Kohler & Linsley 1951) and a wetness factor - [How much to trust, per region](https://agentengineering.it/rainfall-thresholds/api/trust/): How well the Italian threshold is calibrated, region by region - [Published regional thresholds](https://agentengineering.it/rainfall-thresholds/api/regional/): Published regional rainfall thresholds for Italy, with their sources - [Rain sources](https://agentengineering.it/rainfall-thresholds/api/sources/): The shape of a rain source, so that any archive can feed this package - [Measuring a threshold](https://agentengineering.it/rainfall-thresholds/api/measure/): How good a threshold is: landslides caught, and the alerts it costs - [Facts (for tools and models)](https://agentengineering.it/rainfall-thresholds/api/facts/): The same answers as data: what a tool, a report or a model can quote - [Checking a text](https://agentengineering.it/rainfall-thresholds/api/check/): Check that a text quotes the facts: no number invented, none in the wrong unit - [MCP server](https://agentengineering.it/rainfall-thresholds/api/mcp/): The MCP server: the thresholds as tools an assistant can call ## For agents - [Full documentation as text](https://agentengineering.it/rainfall-thresholds/llms-full.txt): every page above, with the API reference rendered from the docstrings - [Agent skill](https://agentengineering.it/rainfall-thresholds/skills/rainfall-thresholds/SKILL.md): how to use the library and the traps of the data, for coding agents ## Optional - [Source code](https://github.com/agent-engineering-studio/rainfall-thresholds): the repository - [e-ITALICA](https://doi.org/10.5281/zenodo.14204473): the landslide catalogue the Italian thresholds are fitted on