%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % This script is used to plot Figure 2 reported in: % % 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; %%Plot normalized PFA changes if =1, otherwise plot results of figure 1 Hazard={'All'}; %%Define anlaysis period for the estimation of the normalized hazard indices lower_limit=2007; higher_limit=2011; lower_limit_baseline=[1970,1980,1990,2000]; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%Run data processing scripts %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% run load_data run processing_policy_data run processing_hazard_data %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%Run data analysis scripts %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% run merge_policy_hazard run analysis_4baselines %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%Plot Figure 2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%Define image quality and name ImageFontSize=12; FontTitle_title=18; LabelFontSize=14; scatter_size=50; LineWidth_zero=1; AxisFontName='Arial'; %%Parameter horintal line x_line1=0:2010; y_line1=0; %%Color scatter plots for the different PFA color_years=[0.6350, 0.0780, 0.1840;0.3010, 0.7450, 0.9330;0.4660, 0.6740, 0.1880;0.4940, 0.1840, 0.5560;0.9290, 0.6940, 0.1250]; Title_text={'Fatalities','Affected people','Economic losses','Number of events'}; %%Label y-axis if Norm_PFAchange==0 ylabel_text='Policy changes (PFA average value)'; elseif Norm_PFAchange==1 ylabel_text='Policy changes (normalized PFA value)'; end for ii=1:4 data_plot_temp=reshape(Total_Diff_tab(ii,:,:),size(Total_Diff_tab,2),size(Total_Diff_tab,3)); figure plot(x_line1,y_line1*ones(size(x_line1)),'--k','LineWidth',LineWidth_zero) hold on for i=1:5 scatter(1970:10:2000,data_plot_temp(i,:),scatter_size,color_years(i,:),'filled','MarkerEdgeColor',color_years(i,:)); hold on end grid off xlim([1965 2005]) ylim([-0.4 0.2]) xticks([1970 1980 1990 2000]) xticklabels({'1970','1980','1990','2000'}) ylabel(ylabel_text,'Interpreter','Latex','FontSize',LabelFontSize) title(Title_text{ii},'FontSize',FontTitle_title) set(gca,'FontName',AxisFontName,'FontSize',ImageFontSize) set(gca,'children',get(gca,'children')) %Send to back the ensemble end