Synopsis

This report analyzes the U.S. National Oceanic and Atmospheric Administration (NOAA) Storm Database covering severe weather events from 1950 through November 2011. Using the raw compressed CSV file (repdata_data_StormData.csv.bz2), we evaluate which EVTYPE categories pose the greatest threat to population health and cause the largest economic damages across the United States. Population health harm is measured by total fatalities and injuries, while economic impact is measured by combining property damage and crop damage scaled by their magnitude exponents (PROPDMGEXP and CROPDMGEXP). Raw event labels are standardized by trimming whitespace, converting to uppercase, and grouping common variations so rankings are not artificially fragmented. Tornadoes cause the highest total health burden (driven heavily by injuries), whereas excessive heat and tornadoes rank among the leading causes of fatalities. Floods, hurricanes/typhoons, and storm surges/tides account for the most severe economic losses. These findings provide a clear quantitative baseline for municipal and state planners prioritizing disaster preparedness and mitigation resources.


Data Processing

Loading the Raw Data

All preprocessing begins directly from the raw repdata_data_StormData.csv.bz2 file inside R. If the file is not already in the working directory, the code downloads it from the course archive before reading it with read.csv().

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

data_file <- "repdata_data_StormData.csv.bz2"
data_url <- "https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2FStormData.csv.bz2"

if (!file.exists(data_file)) {
  download.file(data_url, destfile = data_file, mode = "wb")
}

storm_raw <- read.csv(data_file, stringsAsFactors = FALSE)
dim(storm_raw)
## [1] 902297     37

Data Transformations and Justifications

To answer both questions accurately without distorting totals, we apply several targeted transformations:

  1. Subset Relevant Columns: We keep only EVTYPE, FATALITIES, INJURIES, PROPDMG, PROPDMGEXP, CROPDMG, and CROPDMGEXP to reduce memory overhead and keep the pipeline transparent.
  2. Standardize Event Types (EVTYPE): The raw dataset contains nearly 1,000 distinct EVTYPE strings due to capitalization differences, extra spaces, typos, and singular/plural variants (e.g., TSTM WIND vs. THUNDERSTORM WIND, HURRICANE/TYPHOON vs. HURRICANE). We convert text to uppercase, collapse whitespace, and map frequent variants into canonical categories while preserving distinct event types.
  3. Decode Damage Exponents (PROPDMGEXP, CROPDMGEXP): Dollar damage requires multiplying PROPDMG and CROPDMG by their exponent codes: K / k = \(10^3\) (thousand), M / m = \(10^6\) (million), B / b = \(10^9\) (billion), and H / h = \(10^2\) (hundred). Numeric digits 0–8 are treated as powers of 10 (\(10^{\text{digit}}\)), while blank, +, -, or ? symbols are treated as multiplier 0 to avoid inflating unscaled entries.
decode_exp <- function(exp_vec) {
  exp_clean <- toupper(trimws(as.character(exp_vec)))
  dplyr::case_when(
    exp_clean == "H" ~ 1e2,
    exp_clean == "K" ~ 1e3,
    exp_clean == "M" ~ 1e6,
    exp_clean == "B" ~ 1e9,
    exp_clean %in% as.character(0:8) ~ 10 ^ as.numeric(exp_clean),
    TRUE ~ 0
  )
}

clean_evtype <- function(ev) {
  x <- toupper(trimws(as.character(ev)))
  x <- gsub("\\s+", " ", x)

  dplyr::case_when(
    grepl("TORNADO", x) ~ "TORNADO",
    grepl("TSTM|THUNDERSTORM", x) & !grepl("MARINE", x) ~ "THUNDERSTORM WIND",
    grepl("MARINE TSTM|MARINE THUNDERSTORM", x) ~ "MARINE THUNDERSTORM WIND",
    grepl("HURRICANE|TYPHOON", x) ~ "HURRICANE/TYPHOON",
    grepl("STORM SURGE|STORM TIDE", x) ~ "STORM SURGE/TIDE",
    grepl("FLASH FLOOD", x) ~ "FLASH FLOOD",
    grepl("FLOOD|FLD", x) & !grepl("FLASH", x) ~ "FLOOD",
    grepl("LIGHTNING|LIGNTNING", x) ~ "LIGHTNING",
    grepl("RIP CURRENT", x) ~ "RIP CURRENT",
    grepl("EXCESSIVE HEAT|EXTREME HEAT|RECORD HEAT", x) ~ "EXCESSIVE HEAT",
    grepl("^HEAT$|WARM WEATHER", x) ~ "HEAT",
    grepl("EXTREME COLD|WIND CHILL|EXTREME WINDCHILL", x) ~ "EXTREME COLD/WIND CHILL",
    grepl("WINTER STORM", x) ~ "WINTER STORM",
    grepl("WINTER WEATHER|WINTRY MIX", x) ~ "WINTER WEATHER",
    grepl("HIGH WIND", x) & !grepl("MARINE", x) ~ "HIGH WIND",
    grepl("STRONG WIND", x) ~ "STRONG WIND",
    grepl("WILDFIRE|WILD/FOREST FIRE", x) ~ "WILDFIRE",
    grepl("HAIL", x) & !grepl("MARINE", x) ~ "HAIL",
    grepl("HEAVY SNOW", x) ~ "HEAVY SNOW",
    grepl("BLIZZARD", x) ~ "BLIZZARD",
    grepl("DROUGHT", x) ~ "DROUGHT",
    grepl("ICE STORM", x) ~ "ICE STORM",
    grepl("TROPICAL STORM", x) ~ "TROPICAL STORM",
    grepl("DENSE FOG|FOG", x) ~ "DENSE FOG",
    grepl("AVALANCHE", x) ~ "AVALANCHE",
    TRUE ~ x
  )
}

storm_clean <- storm_raw %>%
  select(EVTYPE, FATALITIES, INJURIES, PROPDMG, PROPDMGEXP, CROPDMG, CROPDMGEXP) %>%
  mutate(
    EVENT_GROUP = clean_evtype(EVTYPE),
    FATALITIES = as.numeric(FATALITIES),
    INJURIES = as.numeric(INJURIES),
    PROP_USD = as.numeric(PROPDMG) * decode_exp(PROPDMGEXP),
    CROP_USD = as.numeric(CROPDMG) * decode_exp(CROPDMGEXP),
    TOTAL_DMG_USD = PROP_USD + CROP_USD,
    TOTAL_HEALTH = FATALITIES + INJURIES
  )

Results

Population Health Impact: Fatalities and Injuries

To evaluate population health harm across the United States, we aggregate total fatalities, injuries, and combined casualties (FATALITIES + INJURIES) by standardized event category.

health_summary <- storm_clean %>%
  group_by(EVENT_GROUP) %>%
  summarise(
    fatalities = sum(FATALITIES, na.rm = TRUE),
    injuries = sum(INJURIES, na.rm = TRUE),
    total_casualties = sum(TOTAL_HEALTH, na.rm = TRUE),
    .groups = "drop"
  ) %>%
  arrange(desc(total_casualties))

top_health <- head(health_summary, 10)
knitr::kable(
  top_health,
  col.names = c("Event Type", "Fatalities", "Injuries", "Total Casualties"),
  format.args = list(big.mark = ","),
  caption = "Top 10 Severe Weather Event Types by Total Population Health Impact (1950–2011)"
)
Top 10 Severe Weather Event Types by Total Population Health Impact (1950–2011)
Event Type Fatalities Injuries Total Casualties
TORNADO 5,661 91,407 97,068
THUNDERSTORM WIND 710 9,510 10,220
EXCESSIVE HEAT 2,020 6,730 8,750
FLOOD 518 6,881 7,399
LIGHTNING 817 5,231 6,048
HEAT 937 2,102 3,039
FLASH FLOOD 1,035 1,802 2,837
ICE STORM 89 1,990 2,079
HIGH WIND 295 1,507 1,802
WINTER STORM 217 1,353 1,570
health_long <- top_health %>%
  select(EVENT_GROUP, Fatalities = fatalities, Injuries = injuries) %>%
  pivot_longer(cols = c(Fatalities, Injuries), names_to = "Metric", values_to = "Count") %>%
  mutate(EVENT_GROUP = factor(EVENT_GROUP, levels = rev(top_health$EVENT_GROUP)))

ggplot(health_long, aes(x = EVENT_GROUP, y = Count, fill = Metric)) +
  geom_col() +
  coord_flip() +
  facet_wrap(~ Metric, scales = "free_x") +
  scale_y_continuous(labels = comma) +
  labs(
    title = "Most Harmful U.S. Weather Events to Population Health (1950–2011)",
    subtitle = "Top 10 standardized event categories ranked by combined fatalities and injuries",
    x = NULL,
    y = "Number of People Affected",
    caption = "Figure 1: Tornadoes account for the overwhelming majority of injuries and overall casualties, while excessive heat and tornadoes lead in fatalities."
  ) +
  theme_minimal(base_size = 12) +
  theme(legend.position = "none")

Figure 1 Description: The two-panel horizontal bar chart compares the top 10 event categories across Fatalities (left) and Injuries (right). Tornadoes dominate injuries by a wide margin and rank near the top for fatalities alongside excessive heat, thunderstorm winds, and floods.

Economic Consequences: Property and Crop Damage

To evaluate economic impact, we sum property damage and crop damage in U.S. dollars (shown in billions of dollars for readability) across each standardized event type.

econ_summary <- storm_clean %>%
  group_by(EVENT_GROUP) %>%
  summarise(
    prop_dmg_b = sum(PROP_USD, na.rm = TRUE) / 1e9,
    crop_dmg_b = sum(CROP_USD, na.rm = TRUE) / 1e9,
    total_dmg_b = sum(TOTAL_DMG_USD, na.rm = TRUE) / 1e9,
    .groups = "drop"
  ) %>%
  arrange(desc(total_dmg_b))

top_econ <- head(econ_summary, 10)
knitr::kable(
  top_econ,
  digits = 2,
  col.names = c("Event Type", "Property Damage ($B)", "Crop Damage ($B)", "Total Damage ($B)"),
  caption = "Top 10 Severe Weather Event Types by Total Economic Damage in Billions USD (1950–2011)"
)
Top 10 Severe Weather Event Types by Total Economic Damage in Billions USD (1950–2011)
Event Type Property Damage (\(B)| Crop Damage (\)B) Total Damage ($B)
FLOOD 150.68 10.86 161.54
HURRICANE/TYPHOON 85.36 5.52 90.87
TORNADO 58.60 0.42 59.02
STORM SURGE/TIDE 47.96 0.00 47.97
FLASH FLOOD 17.59 1.53 19.12
HAIL 15.98 3.05 19.02
DROUGHT 1.05 13.97 15.02
THUNDERSTORM WIND 11.18 1.27 12.45
ICE STORM 3.95 5.02 8.97
TROPICAL STORM 7.71 0.69 8.41
econ_long <- top_econ %>%
  select(EVENT_GROUP, `Property Damage` = prop_dmg_b, `Crop Damage` = crop_dmg_b) %>%
  pivot_longer(cols = c(`Property Damage`, `Crop Damage`), names_to = "Damage_Type", values_to = "Billions_USD") %>%
  mutate(EVENT_GROUP = factor(EVENT_GROUP, levels = rev(top_econ$EVENT_GROUP)))

ggplot(econ_long, aes(x = EVENT_GROUP, y = Billions_USD, fill = Damage_Type)) +
  geom_col() +
  coord_flip() +
  scale_y_continuous(labels = dollar_format(prefix = "$", suffix = "B")) +
  labs(
    title = "Greatest Economic Consequences of U.S. Weather Events (1950–2011)",
    subtitle = "Top 10 standardized event categories by combined property and crop damage",
    x = NULL,
    y = "Economic Damage (Billions USD)",
    fill = "Damage Category",
    caption = "Figure 2: Floods, hurricanes/typhoons, and storm surges/tides drive the largest economic losses, primarily through property damage while drought heavily impacts crops."
  ) +
  theme_minimal(base_size = 12) +
  theme(legend.position = "top")

Figure 2 Description: The stacked horizontal bar chart breaks down total economic losses in billions of USD into Property Damage and Crop Damage for the top 10 event types. Flooding, hurricanes/typhoons, and storm surges/tides generate the largest total costs, largely from structural/property losses, while drought stands out for substantial crop damage.