Synopsis

This report mainly studied how storms impacted both public health and economic problems for communities and municipalities. The study found, Tornado, Excessive Heat, TSTM WIND are the most harmful with respect to population health, Tornado , FlASH FLOOD, TSTM WIND etc. have the greatest economic consequences. This study results may help to prioritize resources for different types of events in preparing for severe weather events.

Data Processing

After reading in the origin data, a new data set called “storm” was subset to keep only those usufull variables for later analysis.

wbh<-read.csv(bzfile("repdata-data-StormData.csv.bz2"))
storm<-wbh[,c("EVTYPE", 'FATALITIES', 'INJURIES',  'PROPDMG', 'CROPDMG')]
str(storm)
## 'data.frame':    902297 obs. of  5 variables:
##  $ EVTYPE    : Factor w/ 985 levels "?","ABNORMALLY DRY",..: 830 830 830 830 830 830 830 830 830 830 ...
##  $ FATALITIES: num  0 0 0 0 0 0 0 0 1 0 ...
##  $ INJURIES  : num  15 0 2 2 2 6 1 0 14 0 ...
##  $ PROPDMG   : num  25 2.5 25 2.5 2.5 2.5 2.5 2.5 25 25 ...
##  $ CROPDMG   : num  0 0 0 0 0 0 0 0 0 0 ...
head(storm) 
##    EVTYPE FATALITIES INJURIES PROPDMG CROPDMG
## 1 TORNADO          0       15    25.0       0
## 2 TORNADO          0        0     2.5       0
## 3 TORNADO          0        2    25.0       0
## 4 TORNADO          0        2     2.5       0
## 5 TORNADO          0        2     2.5       0
## 6 TORNADO          0        6     2.5       0
#table(storm$EVTYPE)

Get total number of fatalities/injuries by each type of storm event, and make the barcharts for comparisions:

require(lattice)
## Loading required package: lattice
fata<-tapply(storm$FATALITIES, storm$EVTYPE,sum, na.rm=TRUE)
Data<-fata[order(-fata)][1:10]
barchart(Data, xlab="Total Number", main="Total Number of Fatalities")

plot of chunk unnamed-chunk-2

injury<-tapply(storm$INJURIES, storm$EVTYPE,sum, na.rm=TRUE)
Data<-injury[order(-injury)][1:10]
barchart(Data, xlab="Total Number", main="Total Number of Injuries")

plot of chunk unnamed-chunk-2

Get top ten damages by each type of storm event for properties damages:

prop<-tapply(storm$PROPDMG, storm$EVTYPE,sum, na.rm=TRUE)
Num1<-prop[order(-prop)][1:10]
Num1
##            TORNADO        FLASH FLOOD          TSTM WIND 
##            3212258            1420125            1335966 
##              FLOOD  THUNDERSTORM WIND               HAIL 
##             899938             876844             688693 
##          LIGHTNING THUNDERSTORM WINDS          HIGH WIND 
##             603352             446293             324732 
##       WINTER STORM 
##             132721

Get top ten damages by each type of storm event for crop damages:

crop<-tapply(storm$CROPDMG, storm$EVTYPE,sum, na.rm=TRUE)
Num2<-crop[order(-crop)][1:10]
Num2
##               HAIL        FLASH FLOOD              FLOOD 
##             579596             179200             168038 
##          TSTM WIND            TORNADO  THUNDERSTORM WIND 
##             109203             100019              66791 
##            DROUGHT THUNDERSTORM WINDS          HIGH WIND 
##              33899              18685              17283 
##         HEAVY RAIN 
##              11123

Get total damages by each type of storm event, and make the barchart for comparisions

tot<-tapply(storm$PROPDMG+storm$CROPDMG, storm$EVTYPE,sum, na.rm=TRUE)
Tot=tot[order(-tot)][1:10]

barchart(Tot, xlab="Total Damages(Properties + Crops)", main="Total Damage(Properties + Crops)")

plot of chunk unnamed-chunk-5

Results

In this study, the top ten types of storms which cause the most fatalities and injuries, and the top ten types of storms that brought most properties and crops damage were given. Generally speaking, TORNADO, FLOOD, TSTM WIND etc. contribute the most in both situations.