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
24 stars 7 forks source link

Modify population dislocation to have choice dislocation and unsafe occupancy #543

Closed Vismayak closed 2 months ago

Vismayak commented 3 months ago

Adding the requested changes from Nathanael to have flags that calculate choice_dislocation and unsafe occupancy

Vismayak commented 2 months ago

Contacted Nathanael and I believe the last step was updating dislocation depending on hoice dislocation and unsafe occupancy. I think last step would be figuring out whether to modify semantics for current popdislocation dataframe or create a different version

Update- Update in this PR

navarroc commented 2 months ago

Should we always add all the new dislocation columns even if the new dislocation isn't selected (but empty)? @longshuicy @Vismayak ?

Vismayak commented 2 months ago

@navarroc could you please check the PR again, I have added the columns to be permanent even if flags are not called and to have boolean values.

navarroc commented 2 months ago

Should unsafe_occupancy be an empty column instead of initialized to False if we are not setting choice_dislocation?

Also, we may want to trim the column name to unsafe_occ so it fits into 10 character limit if joining with a shapefile.

navarroc commented 2 months ago

Sorry, my bad, the test is setting unsafe_occupancy value, ignore my first statement, but the length of the column is still a question

navarroc commented 2 months ago

We may also want to shorten choice_dislocation to choice_dis so it meets the 10 character limit for shapefiles.