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

Added scripts/hazusConsequence2CollapseProb.py #68

Merged
merged 2 commits into from
Jun 24, 2021

Conversation

DamonU2
Copy link
Contributor

@DamonU2 DamonU2 commented Jun 24, 2021

New dependency added to requirements.txt as well

@drotheram
Copy link
Contributor

Looks good, I'm wondering if we can add the 'typology' field as well? This is just a duplication of 'eqbldgtype'

'collapse_pc' in the original csv file is stored as a string. I'm not sure if it needs to be, so let's test the import scripts with the float representation for now and update with a cast to string if needed.

names=['eqbldgtype', 'collapse_pc']) # Add column names

# Convert percentages to decimal
df['collapse_pc'] /= 100
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

df['collapse_pc'].div(100) will also work here

@drotheram
Copy link
Contributor

Looks good to me

@drotheram drotheram merged commit de45323 into OpenDRR:master Jun 24, 2021
@drotheram drotheram linked an issue Jun 24, 2021 that may be closed by this pull request
3 tasks
@DamonU2 DamonU2 deleted the hazus-excel-to-csv branch June 24, 2021 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create script to parse collapse_probability.csv from
2 participants