This report presents the data analysis done on the NOAA Storm database. The analysis was done mainly to answer two questions: 1. Across the United States, which types of events (as indicated in the 𝙴𝚅𝚃𝚈𝙿𝙴 variable) are most harmful with respect to population health? 2. Across the United States, which types of events have the greatest economic consequences?
Loading the data.
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
data<-read.csv('storm.csv.bz2')
names(data)<-tolower(names(data))
head(data)
## state__ bgn_date bgn_time time_zone county countyname state
## 1 1 4/18/1950 0:00:00 0130 CST 97 MOBILE AL
## 2 1 4/18/1950 0:00:00 0145 CST 3 BALDWIN AL
## 3 1 2/20/1951 0:00:00 1600 CST 57 FAYETTE AL
## 4 1 6/8/1951 0:00:00 0900 CST 89 MADISON AL
## 5 1 11/15/1951 0:00:00 1500 CST 43 CULLMAN AL
## 6 1 11/15/1951 0:00:00 2000 CST 77 LAUDERDALE AL
## evtype bgn_range bgn_azi bgn_locati end_date end_time county_end
## 1 TORNADO 0 0
## 2 TORNADO 0 0
## 3 TORNADO 0 0
## 4 TORNADO 0 0
## 5 TORNADO 0 0
## 6 TORNADO 0 0
## countyendn end_range end_azi end_locati length width f mag fatalities
## 1 NA 0 14.0 100 3 0 0
## 2 NA 0 2.0 150 2 0 0
## 3 NA 0 0.1 123 2 0 0
## 4 NA 0 0.0 100 2 0 0
## 5 NA 0 0.0 150 2 0 0
## 6 NA 0 1.5 177 2 0 0
## injuries propdmg propdmgexp cropdmg cropdmgexp wfo stateoffic zonenames
## 1 15 25.0 K 0
## 2 0 2.5 K 0
## 3 2 25.0 K 0
## 4 2 2.5 K 0
## 5 2 2.5 K 0
## 6 6 2.5 K 0
## latitude longitude latitude_e longitude_ remarks refnum
## 1 3040 8812 3051 8806 1
## 2 3042 8755 0 0 2
## 3 3340 8742 0 0 3
## 4 3458 8626 0 0 4
## 5 3412 8642 0 0 5
## 6 3450 8748 0 0 6
In this section, the net property and crop damages have been calculated in billions USD. Following that, data has been aggregated based on the event type. This means that we have found the fatalities, injuries, net crop damage and net property damage for each type of event from the year 1950 to 2010. Then top 10 events in each of these categories have been chosen.
data<-select(data,evtype,fatalities,injuries,propdmg,propdmgexp,cropdmg,cropdmgexp)
cropdmgexp<-as.character(unique(data$cropdmgexp))
cropexp<- c(1,6,3,6,9,1,0,3,2)
cropexpdt<-data.frame(cbind(cropdmgexp,cropexp))
cropexpdt$cropexp<-as.numeric(cropexpdt$cropexp)
data<-merge(data,cropexpdt,by = 'cropdmgexp')
data$cropdmgnet<- ((data$cropdmg * 10^data$cropexp)/10^9)
propdmgexp<-as.character(unique(data$propdmgexp))
propexp<-c(3,6,1,9,6,0,0,5,6,0,4,2,3,2,7,2,0,1,8)
propexpdt<-data.frame(cbind(propdmgexp,propexp))
propexpdt$propexp<-as.numeric(propexpdt$propexp)
data<-merge(data,propexpdt,by='propdmgexp')
data$propdmgnet<-(data$propdmg * 10^data$propexp)/10^10
data<-select(data,evtype,fatalities,injuries,cropdmgnet,propdmgnet)
pophlth<-aggregate(cbind(fatalities,injuries)~evtype,data,sum)
economic<-aggregate(cbind(cropdmgnet,propdmgnet)~evtype,data,sum)
pophlth$net<-pophlth$fatalities + pophlth$injuries
economic$net<-economic$cropdmgnet + economic$propdmgnet
pophlth<-arrange(pophlth,desc(net))
pophlth10<-pophlth[1:10,]
pophlth_f<-arrange(pophlth,desc(fatalities))
pophlth_f10<-pophlth_f[1:10,]
pophlth_i<-arrange(pophlth,desc(injuries))
pophlth_i10<-pophlth_i[1:10,]
economic<-arrange(economic,desc(net))
economic10<-economic[1:10,]
economic_p<-arrange(economic,desc(propdmgnet))
economic_p10<-economic_p[1:10,]
economic_c<-arrange(economic,desc(cropdmgnet))
economic_c10<-economic_c[1:10,]
par(mfrow = c(1,3), mar = c(12,4,5,2))
barplot(pophlth10$net,names.arg = pophlth10$evtype,ylim = c(0,100000),las = 3, main = 'Net Effect on Population Health',ylab = 'Fatalities + Injuries')
barplot(pophlth_f10$fatalities, las = 3,names.arg = pophlth_f10$evtype,ylim = c(0,7000), main = 'Deaths due to Event',ylab = 'Number of Deaths')
barplot(pophlth_i10$injuries,names.arg = pophlth_i10$evtype, las = 3,ylim = c(0,100000), main = 'Injuries due to Event', ylab = 'Number of Injuries')
maxph<-pophlth10[1,4]
As observed in the figures above, the most destructive events on the basis of effect on population health is unequivocally tornadoes. They cause a total of 96979 injuries and deaths in USA. Other major destructive events are Excessive Heat, Floods, TSTM Winds, and Lightning.
par(mfrow = c(1,3), mar = c(12,4,5,2))
barplot(economic10$net,las =3,names.arg = economic10$evtype,ylim = c(0,160),main = 'Net Economic Consequences',ylab = 'Net Damage (Crop + Property) in Billions USD')
barplot(economic_c10$cropdmgnet,las=3,names.arg = economic_c10$evtype, ylab = 'Damage to crops (in Billions USD)', main = 'Crop damage due to Event')
barplot(economic_p10$propdmgnet,las=3,names.arg = economic_p10$evtype, ylim = c(0,160),main = 'Property damage due to Event',ylab = 'Damage to property (in Billions USD)')
maxec<-floor(economic10[1,4])
As observed in the figures above, the most destructive events on the basis of economic consequences are floods causing approximately 146 billions US dollars worth of damages. Other major destructive events in this category are Hurricane/Typhoon, Tornado, Hail and Flash Floods.