SYNOPSIS

This report explores the U.S. National Oceanic and Atmospheric Administration’s (NOAA) storm database. This database tracks characteristics of major storms and weather events in the United States, including when and where they occur, as well as estimates of any fatalities, injuries, and property damage.

Using this data disasters that cause the greatest economic and physical damage across the US is analysed.

DATA PROCESSING

loading and processing the data

RESULTS

Across the United States, which types of events are most harmful with respect to population health?

To answer the above question significant deaths and injuries since data was recorded began and since 2000 are examined. As records in the past may not be comprehensive recorded data since 2000 is predomintately used to draw conclusions. A plot of the data is given below.

library(ggplot2)
library(gridExtra)
## Loading required package: grid
#deaths
z <- ggplot(sig_deaths, aes(y=V1,x=reorder(EVTYPE,-V1))) + geom_bar(stat="identity") 
z <- z + theme(axis.text.x = element_text(angle = 90, hjust = 1, size = 7))
z <- z + labs(title = "Significant Deaths since 1950 by event type", x="Event Type", y = "total deaths")

#injuries
za <- ggplot(sig_injuries, aes(y=V1,x=reorder(EVTYPE,-V1))) + geom_bar(stat="identity") 
za <- za + theme(axis.text.x = element_text(angle = 90, hjust = 1, size = 7))
za <- za + labs(title = "Significant Injuries since 1950 by event type", x="Event Type", y = "total injuries")

#deaths since 2000
zb <- ggplot(sig_deaths_2000, aes(y=V1,x=reorder(EVTYPE,-V1))) + geom_bar(stat="identity") 
zb <- zb + theme(axis.text.x = element_text(angle = 90, hjust = 1, size = 7))
zb <- zb + labs(title = "Significant Deaths since 2000 by event type", x="Event Type", y = "total deaths")

#injuries since 2000
zc <- ggplot(sig_injuries_2000, aes(y=V1,x=reorder(EVTYPE,-V1))) + geom_bar(stat="identity") 
zc <- zc + theme(axis.text.x = element_text(angle = 90, hjust = 1, size = 7))
zc <- zc + labs(title = "Significant Injuries since 2000 by event type", x="Event Type", y = "total injuries")

grid.arrange(z,za,zb,zc, ncol=2)

As can be seen tornados are clearly the most harmful to population health. Excessive heat is also a significant cause of death since 2000.

Across the United States, which types of events have the greatest economic consequences?

library(plyr)
library(maps)
## 
## Attaching package: 'maps'
## 
## The following object is masked from 'package:plyr':
## 
##     ozone
econ_prop <- ddply(ass2_data, .(EVTYPE, STATE), function(ass2_data) sum(ass2_data$PROPDMG))

#select event type for state with maximum damage
econ_prop_max <- ddply(econ_prop, .(STATE), function(econ_prop) max(econ_prop$V1))
econ_prop_max <- merge(econ_prop_max, econ_prop, by = c("V1","STATE"))
z <- merge(econ_prop_max, states, by.x = "STATE", by.y = "Abbreviation")
z$State <- tolower(z$State)

all_states <- map_data("state")
Total <- merge(all_states, z, by.x = "region", by.y = "State")

#map of US by damage
p <- ggplot()
p <- p + geom_polygon(data=Total, aes(x=long, y=lat, group = group, fill=Total$V1),colour="white") + scale_fill_continuous(low = "thistle2", high = "darkred", guide="colorbar", name = "Economic Loss ($M)")
p <- p + labs(title = "Total Economic loss by state")

#map of US by category
r <- ggplot()
r <- r + geom_polygon(data=Total, aes(x=long, y=lat, group = group, fill=Total$EVTYPE),colour="white" ) 
r <- r + scale_fill_discrete(name = "Disaster Type")
r <- r + labs(title = "Event type causing maximum Economic loss in each state")

grid.arrange(p, r, ncol =1)

As can be seen Texas has suffered a significantly larger economic loss than the other states. Tornados cause the most damage in the centre of the US. The west coast tends to suffer from extreme weather such as high winds and flash floods. And the north east corner suffers from flooding.