This analysis explores the population health and economic impacts of severe weather events in the United States using data from the NOAA Storm Database. Population health impacts were measured using the total number of fatalities and injuries, while economic impacts were measured using the combination of property and crop damage estimates. Results show that a small number of event types account for the majority of both health-related and economic losses nationwide. In addition, the ranking of the top six event types differs between population health and economic impacts.
knitr::opts_chunk$set(echo = TRUE,
warning = FALSE,
message = FALSE)
library(tidyverse)
df <- read.csv("repdata_data_StormData.csv")
df$BGN_DATE <- as.Date(df$BGN_DATE, format = "%m/%d/%Y %H:%M:%S")
df <- df %>%
rename_with(tolower)
df <- df %>%
mutate(evtype = str_trim(tolower(evtype)),
propdmgexp = str_trim(tolower(propdmgexp)),
cropdmgexp = str_trim(tolower(cropdmgexp))
)
df <- df %>%
mutate(propdmg_dollars = propdmg *
case_when(
propdmgexp == "k" ~ 1e3,
propdmgexp == "m" ~ 1e6,
propdmgexp == "b" ~ 1e9,
TRUE ~ 1),
cropdmg_dollars = cropdmg *
case_when(
cropdmgexp == "k" ~ 1e3,
cropdmgexp == "m" ~ 1e6,
cropdmgexp == "b" ~ 1e9,
TRUE ~ 1)
)
df$year <- year(df$bgn_date)
df_year <- df %>%
group_by(year) %>%
summarise(total_events = n())
g_year <- ggplot(df_year, aes(x = year, y = total_events)) +
geom_point(color = "steelblue",alpha = 0.6) +
geom_vline(xintercept = 1990, linetype = "dashed") +
annotate("text", x = 1990, y = max(df_year$total_events) * 0.8,
label = "1990", hjust = -0.1) +
labs(x = "Year",
y = "Number of Recorded Events",
title = "Number of Severe Weather Events Recorded per Year in the United States")
g_year
df_health <- df %>%
group_by(evtype) %>%
summarise(total_fatalities = sum(fatalities, na.rm = TRUE),
total_injuries = sum(injuries, na.rm = TRUE)) %>%
mutate(total_health_impact = (total_fatalities + total_injuries) / 1e3 ) %>%
arrange(desc(total_health_impact))
df_econ <- df %>%
group_by(evtype) %>%
summarise(total_prop_dmg = sum(propdmg_dollars, na.rm = TRUE),
total_crop_dmg = sum(cropdmg_dollars, na.rm = TRUE)
) %>%
mutate(total_econ_dmg_billions = (total_prop_dmg + total_crop_dmg) / 1e9) %>%
arrange(desc(total_econ_dmg_billions))
plot_df_health <- head(df_health)
g_health <- ggplot(plot_df_health, aes(x = reorder(evtype, total_health_impact),
y = total_health_impact)) +
geom_col(fill = "steelblue") +
coord_flip() +
labs(x = "Weather Event Type",
y = "Number of Fatalities and Injuries (Thousands)",
title = "Weather Events with Greatest Population Health Impacts
in the United States")
g_health
plot_df_econ <- head(df_econ)
g_econ <- ggplot(plot_df_econ, aes(x = reorder(evtype, total_econ_dmg_billions),
y = total_econ_dmg_billions)) +
geom_col(fill = "steelblue") +
coord_flip() +
labs(x = "Weather Event Type",
y = "Property and Crop Damages (Billions of Dollars)",
title = "Weather Events with Greatest Economic Impacts
in the United States")
g_econ
Population health impacts were assessed by aggregating the total number of fatalities and injuries associated with each weather event type. Figure_2 shows the top six contributors to fatalities and injuries in the United States, tornado being the strongest contributor by far. These event types represent the greatest risk to population health in the United States when considering both fatal and non-fatal outcomes.
Economic impacts were evaluated using the combined cost of property and crop damage, expressed in billions of dollars. Figure_3 shows the top six event types that had the greatest contributions to economic losses. Flood had the strongest contribution of $150 billion in property and crop damages. These findings highlight the substantial financial burden associated with extreme weather events.