Synopsis

This analysis explores the impact of severe weather events on public health and the economy in the United States using the NOAA Storm Database. The dataset tracks major storms and weather events from 1950 to November 2011. To evaluate population health consequences, we aggregated total fatalities and injuries across different weather event types. For economic consequences, property and crop damage estimates were normalized to actual dollar amounts based on their exponential multipliers and combined. The results indicate that tornadoes are overwhelmingly the most harmful event type to population health, causing the highest numbers of both fatalities and injuries. In contrast, floods pose the greatest economic threat, resulting in the highest total property and crop damage.

Data Processing

The analysis starts directly from the raw comma-separated-value file compressed via the bzip2 algorithm (repdata_data_StormData.csv.bz2), which is already present in the working directory.

First, we load the required libraries for data manipulation and visualization.

library(dplyr)
library(ggplot2)
library(tidyr)

Next, we read the dataset directly from the compressed file. Due to the large file size, caching is applied to optimize compilation time.

# Read the compressed CSV file directly
storm_data <- read.csv("repdata_data_StormData.csv.bz2")

To address the research questions, we focus on the relevant variables: EVTYPE (event type), FATALITIES (deaths), INJURIES (injuries), PROPDMG (property damage), PROPDMGEXP (property damage exponent), CROPDMG (crop damage), and CROPDMGEXP (crop damage exponent).

Data Transformation for Economic Impact

The damage estimates in PROPDMG and CROPDMG must be multiplied by exponent factors specified in PROPDMGEXP and CROPDMGEXP. We handle these alphanumeric characters by converting them into their corresponding numeric multipliers: - ‘H’ or ‘h’ for Hundreds (\(10^2\)) - ‘K’ or ‘k’ for Thousands (\(10^3\)) - ‘M’ or ‘m’ for Millions (\(10^6\)) - ‘B’ or ‘b’ for Billions (\(10^9\)) - Numeric digits 0-8 represent powers of 10 - Invalid symbols (‘+’, ‘-’, ‘?’) or empty strings are treated as 1 (\(10^0\))

# Helper function to convert exponent codes to absolute numeric values
get_multiplier <- function(exp_vector) {
  exp_vector <- toupper(as.character(exp_vector))
  
  multipliers <- case_when(
    exp_vector == "H" ~ 100,
    exp_vector == "K" ~ 1000,
    exp_vector == "M" ~ 1000000,
    exp_vector == "B" ~ 1000000000,
    exp_vector %in% as.character(0:8) ~ 10^as.numeric(exp_vector),
    TRUE ~ 1
  )
  return(multipliers)
}

# Apply multipliers to calculate exact financial damage values
processed_data <- storm_data %>%
  mutate(
    prop_mult = get_multiplier(PROPDMGEXP),
    crop_mult = get_multiplier(CROPDMGEXP),
    Property_Damage = PROPDMG * prop_mult,
    Crop_Damage = CROPDMG * crop_mult,
    Total_Economic_Damage = Property_Damage + Crop_Damage
  )
## Warning: There were 2 warnings in `mutate()`.
## The first warning was:
## ℹ In argument: `prop_mult = get_multiplier(PROPDMGEXP)`.
## Caused by warning:
## ! NAs introduced by coercion
## ℹ Run `dplyr::last_dplyr_warnings()` to see the 1 remaining warning.

Aggregating Health Consequences

We sum up the total fatalities and injuries for each unique weather event type to identify the top 10 most hazardous events.

health_impact <- processed_data %>%
  group_by(EVTYPE) %>%
  summarize(
    Fatalities = sum(FATALITIES, na.rm = TRUE),
    Injuries = sum(INJURIES, na.rm = TRUE),
    Total_Health_Impact = Fatalities + Injuries
  ) %>%
  arrange(desc(Total_Health_Impact))

top_health <- head(health_impact, 10)

Aggregating Economic Consequences

Similarly, we compute the total property and crop financial damage by event type to pinpoint the top 10 events with the greatest economic impact.

economic_impact <- processed_data %>%
  group_by(EVTYPE) %>%
  summarize(
    Total_Property = sum(Property_Damage, na.rm = TRUE),
    Total_Crop = sum(Crop_Damage, na.rm = TRUE),
    Total_Economic = sum(Total_Economic_Damage, na.rm = TRUE)
  ) %>%
  arrange(desc(Total_Economic))

top_economic <- head(economic_impact, 10)

Results

1. Most Harmful Event Types to Population Health

To determine which types of events are most harmful to population health across the United States, we visualize the top 10 weather phenomena with the highest combined toll of fatalities and injuries.

# Restructure data to long format for a stacked bar visualization
health_long <- top_health %>%
  pivot_longer(cols = c(Fatalities, Injuries), names_to = "Impact_Type", values_to = "Count")

ggplot(health_long, aes(x = reorder(EVTYPE, -Total_Health_Impact), y = Count, fill = Impact_Type)) +
  geom_bar(stat = "identity") +
  labs(
    title = "Top 10 Most Harmful Severe Weather Events to Population Health",
    x = "Event Type",
    y = "Total Number of Casualties",
    fill = "Impact Type"
  ) +
  theme_minimal() +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

Figure 1: This plot displays the top 10 severe weather events affecting public health in the United States. The total health impact is split into casualties resulting from fatalities (deaths) and injuries. Tornadoes clearly lead as the most hazardous event type.

2. Event Types with the Greatest Economic Consequences

To evaluate which severe weather events yield the most severe economic impacts, the combined losses of property and crop assets are presented below for the top 10 event types.

# Convert dollar values to billions for scale and change to long format
economic_long <- top_economic %>%
  pivot_longer(cols = c(Total_Property, Total_Crop), names_to = "Damage_Type", values_to = "Amount") %>%
  mutate(Amount_Billions = Amount / 1e9)

ggplot(economic_long, aes(x = reorder(EVTYPE, -Total_Economic), y = Amount_Billions, fill = Damage_Type)) +
  geom_bar(stat = "identity") +
  labs(
    title = "Top 10 Severe Weather Events with Greatest Economic Consequences",
    x = "Event Type",
    y = "Damage Amount (in Billions of USD)",
    fill = "Damage Type"
  ) +
  scale_fill_discrete(labels = c("Crop Damage", "Property Damage")) +
  theme_minimal() +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

Figure 2: This plot illustrates the financial losses incurred from the top 10 severe weather events. The economic impact is broken down into property damage and crop damage in billions of dollars. Floods represent the single largest economic threat, followed by hurricanes/typhoons and tornadoes.