Skip to content

Commit 0c0f3da

Browse files
Merge pull request #4 from IFRCGo/fix/create-impact-item
Fix create impact item for gdacs.
2 parents 6b7d5a8 + cd63d58 commit 0c0f3da

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pystac_monty/sources/gdacs.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ def get_impact_category_from_sendai_a(
358358
def get_impact_category_from_sendai_b(
359359
sendainame: str,
360360
) -> MontyImpactExposureCategory:
361-
if sendainame == "rescued" or sendainame == "displaced":
361+
if sendainame == "rescued" or sendainame == "displaced" or sendainame == "affected":
362362
return MontyImpactExposureCategory.ALL_PEOPLE
363363
else:
364364
raise ValueError(f"Unknown sendai name {sendainame} for indicators B")
@@ -415,6 +415,8 @@ def get_impact_type_from_sendai_b(sendainame: str) -> MontyImpactType:
415415
return MontyImpactType.ASSISTED
416416
elif sendainame == "displaced":
417417
return MontyImpactType.RELOCATED
418+
elif sendainame == "affected":
419+
return MontyImpactType.TOTAL_AFFECTED
418420
else:
419421
raise ValueError(f"Unknown sendai name {sendainame} for indicators B")
420422

0 commit comments

Comments
 (0)