Storms and other severe weather events can cause both public health and economic problems for communities and municipalities. Many severe events can result in fatalities, injuries, and property damage, and preventing such outcomes to the extent possible is a key concern.
This article involves exploring 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.
This article is to explore the US NOAA Storm Database and answer some basic questions about severe weather events. The two questions which are answered are: 1. Across the United States, which types of events are most harmful with respect to population health? 2. Across the United States, which types of events have the greatest economic consequences?
This analysis reveals that “Storm” events are the most harmful with respect to population and “Storm” events have the greatest economic consequences. With these findings the municipality manager can better prioritize and mobilize resources for different types of events.
invisible(library(R.utils))
invisible(library(ggplot2))
In this section we load and pre-process the Storm data. The data come in the form of a comma-separated-value file compressed via the bzip2 algorithm to reduce its size. It is downloaded from the course web site. The events in the database start in the year 1950 and end in November 2011.
download.file("https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2FStormData.csv.bz2", "StormData.csv.bz2")
bunzip2("StormData.csv.bz2", "StormData.csv", remove = FALSE, skip = TRUE)
## [1] "StormData.csv"
## attr(,"temporary")
## [1] FALSE
storm.data <- read.csv("StormData.csv")
sd_inj <- aggregate(storm.data$INJURIES, by=list(storm.data$EVTYPE), FUN=sum)
names(sd_inj) <- c("event_type", "injuries")
maxinj <- max(sd_inj$injuries)
The following events have had maximum injuries of 91346 :
sd_inj[sd_inj$injuries==maxinj,"event_type"]
## [1] TORNADO
## 985 Levels: HIGH SURF ADVISORY COASTAL FLOOD ... WND
top_inj <- head(sd_inj[order(-sd_inj$injuries),], 5)
qplot(x=top_inj$event_type, y=top_inj$injuries, main = "# of Injuries per top events", xlab = "Event Type", ylab = "# of Injuries", geom = "point", asp=1/2)
sd_eco <- aggregate(storm.data$PROPDMG+storm.data$CROPDMG, by=list(storm.data$EVTYPE), FUN=sum)
names(sd_eco) <- c("event_type", "dmg")
maxdmg <- max(sd_eco$dmg)
The following events have had maximum damage of 3312276.68 $:
sd_eco[sd_eco$dmg==maxdmg,"event_type"]
## [1] TORNADO
## 985 Levels: HIGH SURF ADVISORY COASTAL FLOOD ... WND
top_eco <- head(sd_eco[order(-sd_eco$dmg),],5)
qplot(x=top_eco$event_type, y=top_eco$dmg, main = "$ of damage per top events", xlab = "Event Type", ylab = "$ of damage", geom = "point", asp=1/2)