%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % This script estimate the average hazard for the baseline period 2007-2011 % as 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 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%Estimate hazard indicators for 2007-2011 based on the HFA countries %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% a=1; for j=1:size(countryChange,1) %loop based on country vector from policy change temp_country=countryChange{j,1}; temp_namecountry=countryChange{j,2}; position=find(strcmp(emdatcountries_1970_2018, temp_country)==1); %which position in EMDATA is the country 'pais' if (~isempty(position)) %if the country 'pais' is year_temp=EM_DATA_1970_2018_Disaster{10,position+1}; %%Any disasters occurring during 2007-N until 2009 rows=find(year_temp>=lower_limit & year_temp<=higher_limit); if (~isempty(rows)) %if there were nature induced disasters, take the indicators country_code_vec{1,a}=temp_country; country_name_vec{1,a}=temp_namecountry; %%Death temp_death=EM_DATA_1970_2018_Disaster{4,position+1}(rows,1); temp_affected=EM_DATA_1970_2018_Disaster{8,position+1}(rows,1); temp_damage=EM_DATA_1970_2018_Disaster{9,position+1}(rows,1); temp_occurrence=EM_DATA_1970_2018_Disaster{3,position+1}(rows,1); Summary_data(1,a)=nanmean(temp_death); Summary_data(2,a)=nanmean(temp_affected); Summary_data(3,a)=nanmean(temp_damage); Summary_data(4,a)=nanmean(temp_occurrence); clear temp_damage; clear temp_death; clear temp_damage; clear temp_occurrence a=a+1; end end end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%Merge policy and hazards data %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% a=1; for s=1:size(Summary_data,2) %arranges the matrix to be used in correlation country=country_code_vec{1,s}; name_country=country_name_vec{1,s}; position_HFA=find(strcmp(countryChange, country)==1); if (~isempty(position_HFA)) analysis_country{a,1}=country; analysis_country{a,2}=name_country; Analysis_0711(1:4,a)=Summary_data(:,s); % Analysis_0711(5:9,a)=HFAChange(position_HFA,:); a=a+1; end end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%GDP estimate for 2015 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Income_2015=zeros(size(analysis_country,1),2); for tt=1:size(analysis_country,1) %loop based on country vector from policy change temp_country=analysis_country{tt,1}; positionGDP=find(strcmp(Income_countries, temp_country)==1); %position in GDP data is the country 'pais' Income_classes=Income_classes_values(positionGDP, 9); Income_2015(tt,2)=Income_classes; end