Synopsis

This report analyzes the U.S. NOAA Storm Database to determine which weather events are most harmful to population health and which have the greatest economic impact. The analysis focuses on fatalities, injuries, property damage, and crop damage across different event types. The results help identify the most severe event categories in terms of human and financial loss.

Data Processing

# Load required libraries
library(dplyr)
library(ggplot2)

# Load the dataset
data <- read.csv("repdata_data_StormData.csv.bz2")

# Select relevant columns
data_subset <- data %>%
 select(EVTYPE, FATALITIES, INJURIES, PROPDMG, PROPDMGEXP, CROPDMG, CROPDMGEXP)

# Function to convert damage exponents

exp_to_num <- function(exp) {
ifelse(exp == "K", 1e3,
ifelse(exp == "M", 1e6,
ifelse(exp == "B", 1e9, 1)))
}

# Convert exponents to multipliers

data_subset$PROP_MULT <- exp_to_num(data_subset$PROPDMGEXP)
data_subset$CROP_MULT <- exp_to_num(data_subset$CROPDMGEXP)

# Calculate actual property and crop damage

data_subset$PROP_TOTAL <- data_subset$PROPDMG * data_subset$PROP_MULT
data_subset$CROP_TOTAL <- data_subset$CROPDMG * data_subset$CROP_MULT


# Aggregate health impact
health_impact <- data_subset %>%
  group_by(EVTYPE) %>%
  summarise(
    total_fatalities = sum(FATALITIES, na.rm = TRUE),
    total_injuries = sum(INJURIES, na.rm = TRUE),
    total_health = total_fatalities + total_injuries
  ) %>%
  arrange(desc(total_health))

# Aggregate economic impact
economic_impact <- data_subset %>%
  group_by(EVTYPE) %>%
  summarise(
    total_damage = sum(PROP_TOTAL + CROP_TOTAL, na.rm = TRUE)
  ) %>%
  arrange(desc(total_damage))

# EV Summary

EV_summary <- merge(
  health_impact[, c("EVTYPE", "total_health")],
  economic_impact[, c("EVTYPE", "total_damage")],
  by = "EVTYPE"
  )

Results

Most Harmful Events to Population Health

head(health_impact, 10)
## # A tibble: 10 × 4
##    EVTYPE            total_fatalities total_injuries total_health
##    <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

The table above shows the top 10 event types with the greatest impact on population health, measured as the combined total of fatalities and injuries. Tornadoes, excessive heat, floods, and lightning are among the most harmful events.

par(mar = c(10, 6, 4, 2))
barplot(
  head(health_impact$total_health, 10),
  names.arg = head(health_impact$EVTYPE, 10),
  las = 2,
  main = "Top 10 Harmful Weather Events for Population Health",
  ylab = "Total Fatalities + Injuries"
  )

The figure above shows that tornadoes are the most harmful event type with respect to population health, followed by excessive heat and flooding.

Events with Greatest Economic Consequences

head(economic_impact, 10)
## # A tibble: 10 × 2
##    EVTYPE             total_damage
##    <chr>                     <dbl>
##  1 FLOOD             150319678257 
##  2 HURRICANE/TYPHOON  71913712800 
##  3 TORNADO            57340614060.
##  4 STORM SURGE        43323541000 
##  5 HAIL               18752904943.
##  6 FLASH FLOOD        17562129167.
##  7 DROUGHT            15018672000 
##  8 HURRICANE          14610229010 
##  9 RIVER FLOOD        10148404500 
## 10 ICE STORM           8967041360

The table above shows the top 10 weather event types causing the greatest economic damage, measured as the combined total of property and crop damage.

par(mar = c(10, 5, 4, 2))
barplot(
  head(economic_impact$total_damage, 10),
  names.arg = head(economic_impact$EVTYPE, 10),
  las = 2,
  main = "Top 10 Weather Events with Greatest Economic Consequences",
  ylab = "Total Damage"
  )

The figure above indicates that floods, hurricanes, and tornadoes are among the events with the greatest economic consequences.

Health Impact vs Economic Impact of all Events

ggplot(EV_summary, aes(total_health, total_damage)) +
  geom_point(alpha = 1/5) +
  theme_minimal() +
  geom_smooth(method = "lm") +
  ylab("USD") +
  xlab("Population") +
  ggtitle("Comparing Economic and Human Health Effects of Storm Types")

Comparing the health and economic effects of different storm types. This figure plots total economic impact against the number of people injured or killed by each storm type.