From 009b90ec5c57188afd3a222d8f8a0cb3b0a5190e Mon Sep 17 00:00:00 2001 From: Santonia27 Date: Fri, 3 Jan 2025 07:54:08 +0100 Subject: [PATCH] replace $ with fiat model damage unit in metrics --- flood_adapt/database_builder/create_database.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/flood_adapt/database_builder/create_database.py b/flood_adapt/database_builder/create_database.py index 34ce49f3..b97dd231 100644 --- a/flood_adapt/database_builder/create_database.py +++ b/flood_adapt/database_builder/create_database.py @@ -1606,6 +1606,13 @@ def add_infometrics(self): for query in attrs["queries"] if "road" not in query["name"].lower() ] + # Replace Damage Unit + for i, query in enumerate(attrs["queries"]): + if "$" in query["long_name"]: + query["long_name"] = query["long_name"].replace( + "$", self.fiat_model.config["exposure"]["damage_unit"] + ) + # replace the SVI threshold if needed if self.config.svi: for i, query in enumerate(attrs["queries"]):