Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dbs-builder):replace $ with fiat model damage unit in metrics #618

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading