%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % This script is used to perform the statistical analysis reported in % Table 1.2 of the supplementary material of the paper: % % Daniel Nohrstedt, Maurizio Mazzoleni, Charles F. Parker, and Giuliano Di % Baldassarre. Policy change after natural hazard % events, Nature Communication % % This script was prepared by Maurizio Mazzoleni % Uppsala University, 2020 % mail to: maurizio.mazzoleni@geo.uu.se % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% clear close all Norm_PFAchange=0; %%If =1 the policy change is calculated using Eq.3 Hazards_vec{1,1}={'All'}; Hazards_vec{1,2}={'Flood','Drought','Storm','Landslide','Earthquake'}; Hazards_vec{1,3}={'Flood','Drought','Storm','Landslide'}; Hazards_vec{1,4}={'Flood','Drought'}; %%Define anlaysis period for the estimation of the normalized hazard indices lower_limit=2007; higher_limit=2011; lower_limit_baseline=1980; higher_limit_baseline=2011; %%Preallocation results cell array Results_temp=cell(17,5); Results_temp{1,2}='All hazards'; Results_temp{1,3}='Flood+drought+storm+landslide+earthquake'; Results_temp{1,4}='Flood+drought+storm+landslide'; Results_temp{1,5}='Flood+drought'; Results_temp(2:5,1)={'Fatalities, L','Fatalities, LM','Fatalities, UM','Fatalities, H'}'; Results_temp(6:9,1)={'Affected, L','Affected, LM','Affected, UM','Affected, H'}'; Results_temp(10:13,1)={'Ec. Losses, L','Ec. Losses, LM','Ec. Losses, UM','Ec. Losses, H'}'; Results_temp(14:17,1)={'Numb. Events, L','Numb. Events, LM','Numb. Events, UM','Numb. Events, H'}'; Results_slope=Results_temp; Results_pvalue=Results_temp; for iy=1:size(Hazards_vec,2) Hazard=Hazards_vec{1,iy}; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%Run pre-processing scripts %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% run load_data run processing_policy_data run processing_hazard_data %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%Run data analysis scripts %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% run merge_policy_hazard run analysis_baseline30yr run statistical_analysis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%Store temporary results for the given set of natural hazards %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% sen_tot_temp=reshape(sen_tot,16,1); pval_tot_temp=reshape(pval_tot,16,1); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%Save results displayed in Table 1.2 for all sets of natural hazards %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Results_slope(2:end,iy+1)=num2cell(sen_tot_temp); Results_pvalue(2:end,iy+1)=num2cell(pval_tot_temp); clearvars -except iy Results_slope Results_pvalue Norm_PFAchange Hazards_vec lower_limit higher_limit lower_limit_baseline higher_limit_baseline end