diff --git a/post/impact_analysis.py b/post/impact_analysis.py index 1d83270..2a81a7d 100644 --- a/post/impact_analysis.py +++ b/post/impact_analysis.py @@ -169,7 +169,6 @@ def main(input_file, res, fmt, output_path=None): # down by construction era, with totals for each category tbl = df.pivot_table(index='YEAR_BUILT', columns='Damage state', aggfunc='size', fill_value=0) - tbl.loc['Total', :] = tbl.sum(axis=1).values tbl.to_excel(pjoin(output_path, f"{event_num}_damage_state.xlsx")) # Calculate percentages of each construction era, and the totals @@ -178,6 +177,7 @@ def main(input_file, res, fmt, output_path=None): fig, ax = plt.subplots(figsize=figsize) sns.set_context(context, font_scale=1.) + sns.countplot(x='Damage state', data=df, order=labels, palette=dmgpal) ax.set_ylabel("Number") plt.savefig(pjoin(output_path, f"{event_num}_damage_state.{fmt}"),