Synopsis

This analysis explores the U.S. National Oceanic and Atmospheric Administration’s (NOAA) storm database to determine which types of weather events are most harmful to population health and which have the greatest economic consequences. By analyzing event types, fatalities, injuries, and property damage data from 1950 to 2011, we identify tornadoes, excessive heat, and floods as major contributors to both health and economic impacts. The analysis includes loading, cleaning, and summarizing the raw data and presents key insights through reproducible code and plots.

Libraries

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

Load data

storm_data <- read.csv("repdata_data_StormData.csv.bz2")

Display tables

head(storm_data)
##   STATE__           BGN_DATE BGN_TIME TIME_ZONE COUNTY COUNTYNAME STATE  EVTYPE
## 1       1  4/18/1950 0:00:00     0130       CST     97     MOBILE    AL TORNADO
## 2       1  4/18/1950 0:00:00     0145       CST      3    BALDWIN    AL TORNADO
## 3       1  2/20/1951 0:00:00     1600       CST     57    FAYETTE    AL TORNADO
## 4       1   6/8/1951 0:00:00     0900       CST     89    MADISON    AL TORNADO
## 5       1 11/15/1951 0:00:00     1500       CST     43    CULLMAN    AL TORNADO
## 6       1 11/15/1951 0:00:00     2000       CST     77 LAUDERDALE    AL TORNADO
##   BGN_RANGE BGN_AZI BGN_LOCATI END_DATE END_TIME COUNTY_END COUNTYENDN
## 1         0                                               0         NA
## 2         0                                               0         NA
## 3         0                                               0         NA
## 4         0                                               0         NA
## 5         0                                               0         NA
## 6         0                                               0         NA
##   END_RANGE END_AZI END_LOCATI LENGTH WIDTH F MAG FATALITIES INJURIES PROPDMG
## 1         0                      14.0   100 3   0          0       15    25.0
## 2         0                       2.0   150 2   0          0        0     2.5
## 3         0                       0.1   123 2   0          0        2    25.0
## 4         0                       0.0   100 2   0          0        2     2.5
## 5         0                       0.0   150 2   0          0        2     2.5
## 6         0                       1.5   177 2   0          0        6     2.5
##   PROPDMGEXP CROPDMG CROPDMGEXP WFO STATEOFFIC ZONENAMES LATITUDE LONGITUDE
## 1          K       0                                         3040      8812
## 2          K       0                                         3042      8755
## 3          K       0                                         3340      8742
## 4          K       0                                         3458      8626
## 5          K       0                                         3412      8642
## 6          K       0                                         3450      8748
##   LATITUDE_E LONGITUDE_ REMARKS REFNUM
## 1       3051       8806              1
## 2          0          0              2
## 3          0          0              3
## 4          0          0              4
## 5          0          0              5
## 6          0          0              6

Data Processing

Before summarizing health and economic impacts:

  1. Select only the relevant columns (EVTYPE, FATALITIES, INJURIES, PROPDMG, PROPDMGEXP, CROPDMG, CROPDMGEXP).
    Justification: These fields capture event type and the two dimensions of impact we care about (human and economic).

  2. Standardize damage figures by converting the exponent codes (K, M, B) into numeric multipliers.
    Justification: The raw dataset stores property and crop damage in two parts (base value + exponent code). To compute total dollar losses, we must map these codes to actual numbers (e.g. “K” → 1,000).

Select relevant columns

storm <- storm_data %>%
    select(EVTYPE, FATALITIES, INJURIES, PROPDMG, PROPDMGEXP, CROPDMG, CROPDMGEXP)

Convert damage exponents

exp_map <- c("K" = 1e3, "M" = 1e6, "B" = 1e9)
storm$PROPDMGEXP <- toupper(storm$PROPDMGEXP)
storm$CROPDMGEXP <- toupper(storm$CROPDMGEXP)

storm <- storm %>%
  mutate(PROPDMGVAL = PROPDMG * exp_map[PROPDMGEXP],
         CROPDMGVAL = CROPDMG * exp_map[CROPDMGEXP]) %>%
  mutate(PROPDMGVAL = ifelse(is.na(PROPDMGVAL), 0, PROPDMGVAL),
         CROPDMGVAL = ifelse(is.na(CROPDMGVAL), 0, CROPDMGVAL))

Results

Events Most Harmful to Population Health

health_impact <- storm %>%
  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) %>%
  arrange(desc(Total_Health_Impact)) %>%
  head(10)

ggplot(health_impact, aes(x = reorder(EVTYPE, Total_Health_Impact), y = Total_Health_Impact)) +
  geom_bar(stat = "identity", fill = "tomato") +
  coord_flip() +
  labs(title = "Top 10 Weather Events by Population Health Impact",
       x = "Event Type", y = "Total Fatalities + Injuries")
Top 10 weather events ranked by combined fatalities and injuries (1950–2011). Tornadoes dominate population health impact.

Top 10 weather events ranked by combined fatalities and injuries (1950–2011). Tornadoes dominate population health impact.

Events with the Greatest Economic Consequences

economic_impact <- storm %>%
  group_by(EVTYPE) %>%
  summarise(Property_Damage = sum(PROPDMGVAL, na.rm=TRUE),
            Crop_Damage = sum(CROPDMGVAL, na.rm=TRUE)) %>%
  mutate(Total_Damage = Property_Damage + Crop_Damage) %>%
  arrange(desc(Total_Damage)) %>%
  head(10)

ggplot(economic_impact, aes(x = reorder(EVTYPE, Total_Damage), y = Total_Damage)) +
  geom_bar(stat = "identity", fill = "steelblue") +
  coord_flip() +
  scale_y_continuous(labels = dollar_format(scale = 1e-9, suffix = "B")) +
  labs(title = "Top 10 Weather Events by Economic Damage",
       x = "Event Type", y = "Total Damage (USD)")
Top 10 weather events by total economic damage (property + crop) in U.S. dollars, 1950–2011. Floods, hurricanes/typhoons, and tornadoes account for the largest losses.

Top 10 weather events by total economic damage (property + crop) in U.S. dollars, 1950–2011. Floods, hurricanes/typhoons, and tornadoes account for the largest losses.

Conclusion

The analsis shows that: