IN-CORE / pyincore

pyIncore is a component of IN-CORE. It is a python package consisting of two primary components: 1) a set of service classes to interact with the IN-CORE web services, and 2) IN-CORE analyses . The pyIncore allows users to apply various hazards to infrastructure in selected areas, propagating the effect of physical infrastructure damage and loss of functionality to social and economic impacts.
Mozilla Public License 2.0
25 stars 7 forks source link

Cluster function does not return expected keys with 0 values in that damage states #515

Closed longshuicy closed 8 months ago

longshuicy commented 8 months ago

When no building fall into the damage state category, the function fails to return the expected keys for states that have a count of 0. Causing the damage table and compare damage table to break.

Fix it in https://github.com/IN-CORE/pyincore/blob/3c2eca45a99aab0e446e19061aa86cbf249e2ed9/pyincore/utils/dataprocessutil.py#L174

Image e.g. Take a look at the payload of this screenshot; note there is only insiginificant; there should be all 4 states with moderate: 0, extensive:0, complete:0

Vismayak commented 8 months ago

Tackled in playbook issue. Closing