Synopsis

This report presents the most harmful weather events for population heath and those with the greatest economic consequences in the United States. Analysis of the NOAA Storm Database shows that tornados have the greatest impact on public health and flooding does the most economic damage.

Data Processing

It should be noted that the categories in the data set are not very well labelled. For this broad analysis they have been left unaltered but for more detailed work it could be worth combining some of them together based on which categories of event are deemed to be equivalent.

The data is extracted and loaded from the National Weather Service Storm Data. This can be downloaded from https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2FStormData.csv.bz2.

library(data.table)
data <-  read.csv(bzfile("./repdata_data_StormData.csv.bz2"),stringsAsFactors=FALSE)
dt <- data.table(data)
dt$event <- as.factor(dt$EVTYPE)

Fatalities and injuries are converted to numeric values and combined to give an indicator for public health effects. The top ten events are calculated.

library(data.table)
dt$FATALITIES <- as.numeric(dt$FATALITIES)
dt$INJURIES <- as.numeric(dt$INJURIES)
dt$health <- dt$INJURIES + dt$FATALITIES
byHealth <- dt[,list(total_injuries_and_fatalities=sum(health)),by=event]
byHealth <- head(byHealth[order(total_injuries_and_fatalities,decreasing=T)],10)

Monetary exponent values are applied and values for crop and property damage combined to give an indicator for economic impact. The top ten events are calculated.

Code Multiplier
H Hundreds
K Thousands
M Millions
B Billions
dt$PROPDMGMUL <- 
    ifelse (tolower(dt$PROPDMGEXP) == 'h',       100,
    ifelse (tolower(dt$PROPDMGEXP) == 'k',      1000,
    ifelse (tolower(dt$PROPDMGEXP) == 'm',   1000000,
    ifelse (tolower(dt$PROPDMGEXP) == 'b',1000000000,
                                                   1))))

dt$CROPDMGMUL <- 
    ifelse (tolower(dt$CROPDMGEXP) == 'h',       100,
    ifelse (tolower(dt$CROPDMGEXP) == 'k',      1000,
    ifelse (tolower(dt$CROPDMGEXP) == 'm',   1000000,
    ifelse (tolower(dt$CROPDMGEXP) == 'b',1000000000,
                                                   1))))
dt$economy <- dt$PROPDMG * dt$PROPDMGMUL + dt$CROPDMG * dt$CROPDMGMUL
byEconomy <- dt[,list(total_econonic_impact=sum(economy)/1000000000),by=event]
byEconomy <- head(byEconomy[order(total_econonic_impact,decreasing=T)],10)

Results

Population Health

The following figure shows the top ten events ranked by how many injuries and fatalities they cause. Tornados have the greatest impact on public health.

library(lattice)
byHealth$event <- factor(byHealth$event, levels=unique( as.character(byHealth$event) ) )
barchart(total_injuries_and_fatalities~event, byHealth, scales=list(x=list(rot=90)), ylab="Total injuries and fatalities")

Economic Consequences

The following figure shows the top ten events ranked by how much economic damage they cause. Floods have the greatest impact on the economy.

byEconomy$event <- factor(byEconomy$event, levels=unique( as.character(byEconomy$event) ) )
barchart(total_econonic_impact~event, byEconomy, scales=list(x=list(rot=90)), ylab="Economic impact (BILLIONS $)")