This report explores the consequences of severe storm events in the
United States using NOAA’s historical storm database (1950–2011).We
focus on identifying which types of events cause the greatest harm to
public health and economic stability.
Fatalities, injuries and total damage costs are used as key impact
metrics.
The analysis reveals tornadoes as the primary cause of human
casualties.Floods, hurricanes, and tornadoes account for the highest
economic damages across states.Graphs and tables provide clear
comparisons across event types.Events are ranked by damage scale to
support policy and preparedness planning.Simple transformations (e.g.,
exponent decoding) are applied to ensure accurate cost
estimates.Findings underscore the importance of targeted response
strategies for high-risk weather events.
Download and load the file.
download.file("https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2FStormData.csv.bz2",
destfile="storm.bz2")
storm<-read.csv("storm.bz2")
Create new variable with total propriety damage costs.
multipliers <- c("K" = 1e3, "M" = 1e6, "B" = 1e9)
storm$PROPDMGT <- storm$PROPDMG * multipliers[as.character(storm$PROPDMGEXP)]
storm$PROPDMGT[is.na(storm$PROPDMGT)] <- storm$PROPDMG[is.na(storm$PROPDMGT)]
Create new variable with total crop damage costs.
multipliers <- c("K" = 1e3, "M" = 1e6, "B" = 1e9)
storm$CROPDMGT <- storm$CROPDMG * multipliers[as.character(storm$CROPDMGEXP)]
storm$CROPDMGT[is.na(storm$CROPDMGT)] <- storm$CROPDMG[is.na(storm$CROPDMGT)]
Create new variable with total damage costs.
storm$DMGT <- rowSums(storm[,c("PROPDMGT","CROPDMGT")],na.rm=TRUE)
Create a subset with top 10 event type with more fatalities.
top_events_fat <- names(sort(tapply(storm$FATALITIES, storm$EVTYPE, sum), decreasing = TRUE))[1:10]
subset_storm_fat <- subset(storm, EVTYPE %in% top_events_fat)
Create a subset with top 10 event type with more injuries.
top_events_inj <- names(sort(tapply(storm$INJURIES, storm$EVTYPE, sum), decreasing = TRUE))[1:10]
subset_storm_inj <- subset(storm, EVTYPE %in% top_events_inj)
Top 10 events with more fatalities are tornado, excessive heat, flash flood, heat, lightning, tstm wind, flood, rip current, high wind, avalanche.
Barplot with top 10 events with more fatalities.
library(ggplot2)
ggplot(subset_storm_fat, aes(x = reorder(EVTYPE, -FATALITIES, sum), y = FATALITIES)) +
stat_summary(fun = sum, geom = "bar") +
labs(title = "Fatalities by Top 10 Event Types", x = "Event Type", y = "Total Fatalities") +
theme(axis.text.x = element_text(angle = 45, hjust = 1))
Top 10 events with more injuries are: tornado, tstm wind, flood, excessive heat, lightning, heat, ice storm, flash flood, thunderstorm wind, hail.
Barplot with top 10 events with more injuries.
ggplot(subset_storm_inj, aes(x = reorder(EVTYPE, -INJURIES, sum), y = INJURIES)) +
stat_summary(fun = sum, geom = "bar") +
labs(title = "Injuries by Top 10 Event Types", x = "Event Type", y = "Total Injuries") +
theme(axis.text.x = element_text(angle = 45, hjust = 1))
Create a subset with top 10 event type with more total damage costs.
top_events_dmgt <- names(sort(tapply(storm$DMGT, storm$EVTYPE, sum), decreasing = TRUE))[1:10]
subset_storm_dmgt <- subset(storm, EVTYPE %in% top_events_dmgt)
Top 10 events with more total damage costs are: flood, hurricane/typhoon, tornado, storm surge, hail, flash flood, drought, hurricane, river flood, ice storm.
Barplot with top 10 events with more total damage costs.
ggplot(subset_storm_dmgt, aes(x = reorder(EVTYPE, -DMGT, sum), y = DMGT)) +
stat_summary(fun = sum, geom = "bar") +
labs(title = "Total Damage Costs by Top 10 Event Types", x = "Event Type", y = "Total Damage Costs") +
theme(axis.text.x = element_text(angle = 45, hjust = 1))