This report analyzes data from the U.S. National Oceanic and Atmospheric Administration (NOAA) Storm Database to identify which types of severe weather events have the greatest impacts on population health and the economy in the United States. Using the raw storm data from 1950–2011, we examine fatalities, injuries, property damage, and crop damage associated with each recorded event type. Data processing included cleaning event classifications, converting damage exponent codes into numeric values, and computing total health and economic losses. We then aggregated impacts across all years to determine which events cause the most harm. The results show that a small number of event types account for the vast majority of casualties and financial losses nationwide. These findings help clarify which hazards pose the greatest risk and therefore may warrant the most attention in preparedness planning.
fileUrl <- "https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2FStormData.csv.bz2"
destZip <- "./events.csv.bz2"
if (!file.exists(destZip)) {
download.file(fileUrl, destfile = destZip, mode = "wb")
}
if (!exists("events")) {
events <- read.csv(bzfile(destZip), sep = ",", header = TRUE)
}
## Economic impact of top weather events in USA
## 2. Acros United States, which types of events have the greatest
## economic consequences?
## PROPDMG, PROPDMGEXP, CROPDMG, CROPDMGEXP - variables to consider
economyDF <- (subset(events))[c(8,25,26,27,28)]
## str(economyDF)
## head(economyDF)
## tail(economyDF)
levels(events$PROPDMGEXP)
## NULL
levels(events$CROPDMGEXP)
## NULL
## function to convert PROPDMGEXP and CROPDMGEXP into numeric values to identify
## a level of damage
damageLevel <- function(l){
if (toupper(l) %in% c("H")) return(2)
else if (toupper(l) %in% c("K")) return(3)
else if (toupper(l) %in% c("M")) return(6)
else if (toupper(l) %in% c("B")) return(9)
else if (!is.na(as.numeric(l))) return(as.numeric(l))
else {return(0)}
}
economyDF$propertyDamage = economyDF$PROPDMG * (10 ** sapply(economyDF$PROPDMGEXP, FUN = damageLevel))
## Warning in FUN(X[[i]], ...): NAs introduced by coercion
## Warning in FUN(X[[i]], ...): NAs introduced by coercion
## Warning in FUN(X[[i]], ...): NAs introduced by coercion
## Warning in FUN(X[[i]], ...): NAs introduced by coercion
## Warning in FUN(X[[i]], ...): NAs introduced by coercion
## Warning in FUN(X[[i]], ...): NAs introduced by coercion
## Warning in FUN(X[[i]], ...): NAs introduced by coercion
## Warning in FUN(X[[i]], ...): NAs introduced by coercion
## Warning in FUN(X[[i]], ...): NAs introduced by coercion
## Warning in FUN(X[[i]], ...): NAs introduced by coercion
## Warning in FUN(X[[i]], ...): NAs introduced by coercion
## Warning in FUN(X[[i]], ...): NAs introduced by coercion
## Warning in FUN(X[[i]], ...): NAs introduced by coercion
## Warning in FUN(X[[i]], ...): NAs introduced by coercion
economyDF$cropDamage = economyDF$CROPDMG * (10 ** sapply(economyDF$CROPDMGEXP, FUN = damageLevel))
## Warning in FUN(X[[i]], ...): NAs introduced by coercion
## Warning in FUN(X[[i]], ...): NAs introduced by coercion
## Warning in FUN(X[[i]], ...): NAs introduced by coercion
## Warning in FUN(X[[i]], ...): NAs introduced by coercion
## Warning in FUN(X[[i]], ...): NAs introduced by coercion
## Warning in FUN(X[[i]], ...): NAs introduced by coercion
## Warning in FUN(X[[i]], ...): NAs introduced by coercion
## head(subset(economyDF, CROPDMG > 0))
economyGr <- ddply(economyDF, .(EVTYPE),
summarize,
propertyDmgTotal = sum(propertyDamage),
cropDmgTotal = sum(cropDamage))
# dim(economyGr)
economicDamage <- economyGr[(economyGr$propertyDmgTotal > 0 | economyGr$cropDmgTotal > 0), ]
# dim(economicDamage)
propertyDmgTop7 <- economicDamage[order(economicDamage$propertyDmgTotal, decreasing=TRUE), ][1:7,]
propertyDmgTop7$EVTYPE <-
factor(propertyDmgTop7$EVTYPE,
levels = propertyDmgTop7$EVTYPE[order(propertyDmgTop7$propertyDmgTotal, decreasing=TRUE)])
cropDmgTop7 <- economicDamage[order(economicDamage$cropDmgTotal, decreasing=TRUE), ][1:7,]
cropDmgTop7$EVTYPE <-
factor(cropDmgTop7$EVTYPE,
levels = cropDmgTop7$EVTYPE[order(cropDmgTop7$cropDmgTotal, decreasing=TRUE)])
library(ggplot2)
library(grid)
library(gridExtra)
plF <- ggplot(data=fatalitiesTop7,
aes(x = EVTYPE,
y = fatalitiesTotal)) +
geom_bar(stat="identity", fill = "blue") +
theme(axis.text.x = element_text(angle = 90, hjust = 1)) +
labs(x="Weather Events", y="Total Fatalities") +
labs(title="Fatalities")
plI <- ggplot(data=injuriesTop7,
aes(x = EVTYPE,
y = injuriesTotal)) +
geom_bar(stat="identity", fill = "blue") +
theme(axis.text.x = element_text(angle = 90, hjust = 1)) +
labs(x="Weather Events", y="Total Injuries") +
labs(title="Injuries")
grid.arrange(plF, plI, ncol = 2)
### Economic impact: top 7 weather events in USA
ggplot(data=propertyDmgTop7,
aes(x = EVTYPE,
y = propertyDmgTotal)) +
geom_bar(stat="identity", fill = "blue") +
theme(axis.text.x = element_text(angle = 90, hjust = 1)) +
labs(x="Weather Events", y="Total Property Damage") +
labs(title="Property Damage, top 7 weather events in USA")
ggplot(data=cropDmgTop7,
aes(x = EVTYPE,
y = cropDmgTotal)) +
geom_bar(stat="identity", fill = "blue") +
theme(axis.text.x = element_text(angle = 90, hjust = 1)) +
labs(x="Weather Events", y="Total Crops Damage") +
labs(title="Crops Damage, top 7 weather events in USA")
The analysis shows clear patterns in how different severe weather events affect the United States. Tornadoes stand out as the most harmful weather event to population health, causing far more injuries and fatalities than any other event type. Other impactful events include excessive heat, floods, and thunderstorms, although none approach the magnitude of tornado-related casualties. When examining economic impacts, floods and hurricanes produce the greatest property and crop damage, with damages reaching into the billions of dollars. Crop losses are particularly influenced by events such as droughts and floods, which disrupt agricultural production. Overall, the results demonstrate that while some events primarily threaten human safety and health, others impose substantial economic burdens—highlighting the need for targeted preparedness and mitigation strategies based on event characteristics.