Synopsis

This analysis explores the U.S. NOAA Storm Database to determine which weather events are most harmful to population health and which have the greatest economic consequences. The data includes records from 1950 to 2011. Population health impact is measured using fatalities and injuries, while economic impact is assessed through property and crop damage. The results show that tornadoes are the most harmful in terms of injuries, while excessive heat causes the most fatalities. Floods and hurricanes contribute the most to economic damage. These findings can help authorities prioritize preparedness and resource allocation.


Data Processing

Loading the data

# Load necessary libraries
library(dplyr)
## Warning: package 'dplyr' was built under R version 4.5.3
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 4.5.3
# Read the dataset
setwd("C:/Users/Om Dave/Downloads/repdata_data_StormData.csv")
data <- read.csv("repdata_data_StormData.csv")

Selecting relevant variables

# Keep only required columns
data <- data %>%
  select(EVTYPE, FATALITIES, INJURIES, PROPDMG, CROPDMG)

Creating new variables

# Create total health impact and economic damage
data <- data %>%
  mutate(
    HEALTH = FATALITIES + INJURIES,
    ECONOMIC = PROPDMG + CROPDMG
  )

Aggregating data by event type

# Health impact summary
health_data <- data %>%
  group_by(EVTYPE) %>%
  summarise(TOTAL_HEALTH = sum(HEALTH, na.rm = TRUE)) %>%
  arrange(desc(TOTAL_HEALTH))

# Economic impact summary
economic_data <- data %>%
  group_by(EVTYPE) %>%
  summarise(TOTAL_ECONOMIC = sum(ECONOMIC, na.rm = TRUE)) %>%
  arrange(desc(TOTAL_ECONOMIC))

Selecting top 10 events

top_health <- head(health_data, 10)
top_economic <- head(economic_data, 10)

Results

1. Events most harmful to population health

ggplot(top_health, aes(x = reorder(EVTYPE, TOTAL_HEALTH), y = TOTAL_HEALTH)) +
  geom_bar(stat = "identity") +
  coord_flip() +
  labs(
    title = "Top 10 Most Harmful Weather Events to Population Health",
    x = "Event Type",
    y = "Total (Fatalities + Injuries)"
  )

Explanation: This plot shows that tornadoes are the leading cause of injuries and fatalities among all weather events. Other significant contributors include excessive heat and floods.


2. Events with greatest economic consequences

ggplot(top_economic, aes(x = reorder(EVTYPE, TOTAL_ECONOMIC), y = TOTAL_ECONOMIC)) +
  geom_bar(stat = "identity") +
  coord_flip() +
  labs(
    title = "Top 10 Weather Events with Highest Economic Damage",
    x = "Event Type",
    y = "Total Damage (Property + Crop)"
  )

Explanation: Floods and hurricanes have the greatest economic impact, causing extensive damage to infrastructure and agriculture. These events require significant financial resources for recovery.