How far to trust IFFI¶
How much the IFFI landslide inventory can be trusted in a municipality or a region: how many of its landslides are dated, how many to the day, how many are mapped for the hazard of the area against Italy, and the sentence that says it, in Italian and English. To show next to the IFFI contribution of a score: it changes no score.
pip install "limen-core[idrogeo]"
from limen_core.iffi import iffi_reliability
bari = iffi_reliability("comuni", "072006")
print(bari.lettura)
The field names of IffiReliability stay in Italian: they are the JSON
contract of Limen's API, its frontend, its prompts and its grounding rules.
limen_core.iffi ¶
How far to trust the IFFI landslide inventory in a municipality or a region.
IFFI is not the same all over Italy: some regions date a fifth of their
landslides to the day and others almost none, some edited their records in
the last few years and others did not, and a low density can mean geology or
landslides never surveyed. ispra_idrogeo.reliability measures this from a
table shipped in the package (no network): how many landslides are mapped per
km² of land in landslide hazard P3+P4, here and in Italy, whether the
inventory is thin (Reliability.thin, a municipality judged by its
province), and the sentence that says it (Reliability.reading). Here it
becomes a model to show next to the IFFI contribution of a score.
To show only: it changes neither the weight of iffi_density_500 nor any
score. Whether and how to weigh it is for the backtest to measure.
The field names stay in Italian. :class:IffiReliability keeps the
names it had in Limen (livello, codice, frane, lettura,
lettura_en, fonte, ...): they are the JSON contract of Limen's REST
API and of its frontend, they are named in its prompts, and the grounding
rules of :mod:limen_core.idrogeo_grounding (LIMEN_RULES) check numbers
against them. Renaming one breaks all four.
Needs the idrogeo extra (pip install "limen-core[idrogeo]"):
ispra_idrogeo is imported with this module.
IffiReliability ¶
Bases: BaseModel
The reliability of IFFI in an area, with its words in Italian and in English.
iffi_reliability ¶
iffi_reliability(level: Level, code: str | int | None) -> IffiReliability | None
The reliability of IFFI in the area with this ISTAT code, or None.
None when the code is missing, is not a number, or is not in the table.