Skip to content

Commit

Permalink
replace $ with fiat model damage unit in metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Santonia27 committed Jan 3, 2025
1 parent cff27d5 commit 009b90e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions flood_adapt/database_builder/create_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]):
Expand Down

0 comments on commit 009b90e

Please sign in to comment.