This report explores the U.S. NOAA Storm Database to identify the weather events most harmful to population health and those with the greatest economic consequences. Using historical data from 1950 to 2011, we summarize the total number of fatalities, injuries, and property/crop damages. We find that tornadoes are the most harmful to public health, while floods result in the most economic damage.
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 4.4.3
storm <- read.csv("repdata_data_StormData.csv.bz2")
storm_clean <- storm %>%
select(EVTYPE, FATALITIES, INJURIES, PROPDMG, PROPDMGEXP, CROPDMG, CROPDMGEXP)
exp_map <- c("K"=1e3, "M"=1e6, "B"=1e9, "0"=1)
storm_clean$PROPDMGEXP <- toupper(storm_clean$PROPDMGEXP)
storm_clean$CROPDMGEXP <- toupper(storm_clean$CROPDMGEXP)
storm_clean$PROPDMGVAL <- storm_clean$PROPDMG * ifelse(storm_clean$PROPDMGEXP %in% names(exp_map),
exp_map[storm_clean$PROPDMGEXP], 1)
storm_clean$CROPDMGVAL <- storm_clean$CROPDMG * ifelse(storm_clean$CROPDMGEXP %in% names(exp_map),
exp_map[storm_clean$CROPDMGEXP], 1)
health_impact <- storm_clean %>%
group_by(EVTYPE) %>%
summarise(
Fatalities = sum(FATALITIES, na.rm = TRUE),
Injuries = sum(INJURIES, na.rm = TRUE),
Total = Fatalities + Injuries
) %>%
arrange(desc(Total))
top10_health <- health_impact[1:10, ]
ggplot(top10_health, aes(x = reorder(EVTYPE, Total), y = Total)) +
geom_bar(stat = "identity", fill = "firebrick") +
coord_flip() +
labs(title = "Top 10 Most Harmful Weather Events to Population Health",
x = "Event Type",
y = "Total Fatalities + Injuries")
Tornadoes are the most harmful weather events to population health in the US, with a total of more than 96,000 combined fatalities and injuries. Excessive heat, thunderstorms, floods, and lightning also contribute significantly to the number of casualties.
The following chart summarizes the 10 most economically damaging weather events in the US, based on combined property and crop damage.
econ_impact <- storm_clean %>%
group_by(EVTYPE) %>%
summarise(EconomicLoss = sum(PROPDMGVAL + CROPDMGVAL, na.rm = TRUE)) %>%
arrange(desc(EconomicLoss))
top10_econ <- econ_impact[1:10, ]
ggplot(top10_econ, aes(x = reorder(EVTYPE, EconomicLoss), y = EconomicLoss / 1e9)) +
geom_bar(stat = "identity", fill = "steelblue") +
coord_flip() +
labs(title = "Top 10 Events Causing Greatest Economic Damage",
x = "Event Type",
y = "Total Economic Loss (in Billion USD)")
Floods are the most economically damaging events, causing more than $150 billion in losses. Hurricanes, tornadoes, and storm surges also represent a major portion of damages.