Synopsis

Decision makers need to be informed of the severity of storm damage in order to plan prevenative measures for the future. This study will present a summary of fatalities and injuries.

stormdf<-read.csv("../data/repdata_data_StormData.csv.bz2") #,nrows=1000)
         names(stormdf) <- tolower(names(stormdf))
# Put longitude values into decimal and global sign convention
        stormdf$longitudedeg<- -stormdf$longitude/100.
        stormdf$latitudedeg<-stormdf$latitude/100.
# Strip extraneous time element from variable bgn_date and convert date to R standard
        bgn_date_split<-strsplit(as.character(stormdf$bgn_date)," 0")
        bgn_date_2colmatrix<-matrix(unlist(bgn_date_split),ncol=2,byrow = TRUE)
        
        if(length(unique(bgn_date_2colmatrix[,2]))  > 1) {print( "Unexpected result!")
                } else { 
                adate<-as.Date(bgn_date_2colmatrix[,1],"%m/%d/%Y")
                daterange<-range(adate)
                # add formatted Date column to dataframe
                stormdf$formattedDate<-adate
                }  
library(ggplot2)
library(maps)

library(grid)
library(gridExtra)

Data Processing

## Data has been collected over the time period:  1950-01-03 to 2011-11-30

Units

-Number of persons: fatalities, injuries

-Damage: dollars

Transformations

Longitude and latitude were converted to units of degrees by dividing by 100. Longitude was assigned a negative value in order to maintain international standards and use in the R mapping packages.

Analysis

## The total number of observations is: 902297

plot of chunk observations

## TX 
## 63

Illustrate the variability of incidences per state. Texas was found to contain the most events.

  1. Across the United States, which types of events are most harmful with respect to population health?
sapply(stormdf[,c("fatalities","injuries")],sum, na.rm = TRUE) # Sum all occurrances
## fatalities   injuries 
##      15145     140528
max.fatalities<-max(stormdf$fatalities)
print(stormdf$evtype[stormdf$fatalities == max.fatalities])
## [1] HEAT
## 985 Levels: ? ABNORMALLY DRY ABNORMALLY WET ... WND
print(stormdf$state[stormdf$fatalities == max.fatalities])
## [1] IL
## 72 Levels: AK AL AM AN AR AS AZ CA CO CT DC DE FL GA GM GU HI IA ID ... XX
max.injuries<-max(stormdf$injuries)
print(stormdf$evtype[stormdf$injuries == max.injuries])
## [1] TORNADO
## 985 Levels: ? ABNORMALLY DRY ABNORMALLY WET ... WND
print(stormdf$state[stormdf$injuries == max.injuries])
## [1] TX
## 72 Levels: AK AL AM AN AR AS AZ CA CO CT DC DE FL GA GM GU HI IA ID ... XX
  1. Across the United States, which types of events have the greatest economic consequences?
sapply(stormdf[,c("propdmg","cropdmg")],sum, na.rm = TRUE) # Sum all costs
##  propdmg  cropdmg 
## 10884500  1377827
max.propdmg<-max(stormdf$propdmg)
print(stormdf$evtype[stormdf$propdmg == max.propdmg])
## [1] THUNDERSTORM WIND FLASH FLOOD       FLASH FLOOD       WATERSPOUT       
## 985 Levels: ? ABNORMALLY DRY ABNORMALLY WET ... WND
print(stormdf$state[stormdf$propdmg == max.propdmg])
## [1] NC IL IL AM
## 72 Levels: AK AL AM AN AR AS AZ CA CO CT DC DE FL GA GM GU HI IA ID ... XX
max.cropdmg<-max(stormdf$cropdmg)
print(stormdf$evtype[stormdf$cropdmg == max.cropdmg])
## [1] DROUGHT
## 985 Levels: ? ABNORMALLY DRY ABNORMALLY WET ... WND
print(stormdf$state[stormdf$cropdmg == max.cropdmg])
## [1] MT
## 72 Levels: AK AL AM AN AR AS AZ CA CO CT DC DE FL GA GM GU HI IA ID ... XX

Results Results of the analysis show that the highest fatality occurred during a heat wave in Illiois. The largest number of injuries occurred with a tornado in Texas.

Maximum property damage was due to Thunderstorm, wind, flash flood and waterspouts. This occurred in states North Carolina, Illinois, and American Samoa. Maximum crop damage occurred due to drought in Montana.

Discussion

The maximum fatalities were attributed to a heat wave in Illinois. There were no injuries under this classification, nor did it cause property damage. It demonstrates that, although winds and tornadoes are more dramatic, the simple rise in temperature can cause more fatalities.

Conclusions

Further research is needed to fully due justice to this interesting data set. Also the skills of the author in subsetting need to be enhanced.