Synopsis

This analysis examines the NOAA Storm Database to identify the most harmful weather events in the United States with respect to population health and economic impact. The data shows that tornadoes cause the most fatalities and injuries, while floods and hurricanes cause the greatest economic damage. The analysis processes raw data from the NOAA database, focusing on fatalities, injuries, property damage, and crop damage. The results are presented through summary tables and visualizations to help government and municipal managers prioritize resources for severe weather event preparation.

Data Processing

First, we’ll load and process the raw data from the compressed CSV file:

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

# Convert property and crop damage values to actual dollar amounts
storm_data <- storm_data %>%
  mutate(
    # Convert property damage
    prop_damage = case_when(
      PROPDMGEXP == "K" ~ PROPDMG * 1000,
      PROPDMGEXP == "M" ~ PROPDMG * 1000000,
      PROPDMGEXP == "B" ~ PROPDMG * 1000000000,
      TRUE ~ PROPDMG
    ),
    # Convert crop damage
    crop_damage = case_when(
      CROPDMGEXP == "K" ~ CROPDMG * 1000,
      CROPDMGEXP == "M" ~ CROPDMG * 1000000,
      CROPDMGEXP == "B" ~ CROPDMG * 1000000000,
      TRUE ~ CROPDMG
    )
  )

# Clean up event types
storm_data$EVTYPE <- str_to_title(storm_data$EVTYPE)

Results

Impact on Population Health

Let’s analyze which events are most harmful to population health by examining fatalities and injuries:

# Calculate total fatalities and injuries by event type
health_impact <- storm_data %>%
  group_by(EVTYPE) %>%
  summarise(
    total_fatalities = sum(FATALITIES),
    total_injuries = sum(INJURIES),
    total_health_impact = total_fatalities + total_injuries
  ) %>%
  arrange(desc(total_health_impact)) %>%
  head(10)

# Create a plot of the top 10 events by health impact
health_plot <- health_impact %>%
  pivot_longer(
    cols = c(total_fatalities, total_injuries),
    names_to = "impact_type",
    values_to = "count"
  ) %>%
  ggplot(aes(x = reorder(EVTYPE, count), y = count, fill = impact_type)) +
  geom_bar(stat = "identity", position = "stack") +
  coord_flip() +
  labs(
    title = "Top 10 Weather Events by Health Impact",
    x = "Event Type",
    y = "Number of People Affected",
    fill = "Impact Type"
  ) +
  theme_minimal() +
  scale_fill_manual(
    values = c("total_fatalities" = "red", "total_injuries" = "orange"),
    labels = c("Fatalities", "Injuries")
  )

print(health_plot)

(Caption: This plot shows the top 10 weather events by health impact, where the total bar is the total number affected, and the % orange shows how much of that total was injuries, vice versa for red/fatalities.)

Economic Impact

Now let’s analyze which events have the greatest economic consequences:

# Calculate total economic damage by event type
economic_impact <- storm_data %>%
  group_by(EVTYPE) %>%
  summarise(
    total_prop_damage = sum(prop_damage, na.rm = TRUE),
    total_crop_damage = sum(crop_damage, na.rm = TRUE),
    total_damage = total_prop_damage + total_crop_damage
  ) %>%
  arrange(desc(total_damage)) %>%
  head(10)

# Create a plot of the top 10 events by economic impact
economic_plot <- economic_impact %>%
  pivot_longer(
    cols = c(total_prop_damage, total_crop_damage),
    names_to = "damage_type",
    values_to = "amount"
  ) %>%
  ggplot(aes(x = reorder(EVTYPE, amount), y = amount/1e9, fill = damage_type)) +
  geom_bar(stat = "identity", position = "stack") +
  coord_flip() +
  labs(
    title = "Top 10 Weather Events by Economic Impact",
    x = "Event Type",
    y = "Damage (Billions of Dollars)",
    fill = "Damage Type"
  ) +
  theme_minimal() +
  scale_fill_manual(
    values = c("total_prop_damage" = "blue", "total_crop_damage" = "green"),
    labels = c("Property Damage", "Crop Damage")
  )

print(economic_plot)

(Caption: This plot shows the top 10 weather events by economic impact, where the total bar is the total damage in USD billions, and the % blue shows how much of that total was crop damage, vice versa for green/property damage.)

Summary Tables

Here are the summary tables for both health and economic impacts:

# Health impact summary
print("Top 10 Events by Health Impact:")
## [1] "Top 10 Events by Health Impact:"
print(health_impact)
## # A tibble: 10 × 4
##    EVTYPE            total_fatalities total_injuries total_health_impact
##    <chr>                        <dbl>          <dbl>               <dbl>
##  1 Tornado                       5633          91346               96979
##  2 Excessive Heat                1903           6525                8428
##  3 Tstm Wind                      504           6957                7461
##  4 Flood                          470           6789                7259
##  5 Lightning                      816           5230                6046
##  6 Heat                           937           2100                3037
##  7 Flash Flood                    978           1777                2755
##  8 Ice Storm                       89           1975                2064
##  9 Thunderstorm Wind              133           1488                1621
## 10 Winter Storm                   206           1321                1527
# Economic impact summary
print("Top 10 Events by Economic Impact:")
## [1] "Top 10 Events by Economic Impact:"
print(economic_impact)
## # A tibble: 10 × 4
##    EVTYPE            total_prop_damage total_crop_damage  total_damage
##    <chr>                         <dbl>             <dbl>         <dbl>
##  1 Flood                 144657709807         5661968450 150319678257 
##  2 Hurricane/Typhoon      69305840000         2607872800  71913712800 
##  3 Tornado                56925660790.         414953270  57340614060.
##  4 Storm Surge            43323536000               5000  43323541000 
##  5 Hail                   15727367053.        3025537890  18752904943.
##  6 Flash Flood            16140812067.        1421317100  17562129167.
##  7 Drought                 1046106000        13972566000  15018672000 
##  8 Hurricane              11868319010         2741910000  14610229010 
##  9 River Flood             5118945500         5029459000  10148404500 
## 10 Ice Storm               3944927860         5022113500   8967041360

The analysis reveals that tornadoes are the most harmful weather events with respect to population health, causing both the highest number of fatalities and injuries. In terms of economic impact, floods and hurricanes cause the most significant damage, affecting both property and crops. These findings can help government and municipal managers prioritize resources for severe weather event preparation and response.