Analysis of Severe Weather Events: Health and Economic Impact

Synopsis:

This analysis explores the NOAA Storm Database to identify the types of severe weather events that are most harmful to population health and those that have the greatest economic consequences across the United States. The study covers data from various events, including tornadoes, floods, hurricanes, and other weather-related incidents. The analysis uses R and relevant packages to process and visualize the data, providing insights to help government and municipal managers prioritize resources for disaster preparedness.

Data Processing: Loading and Cleaning the Data

# Load necessary libraries
if (!requireNamespace("dplyr", quietly = TRUE)) install.packages("dplyr")
library(dplyr)
## 
## 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
if (!requireNamespace("ggplot2", quietly = TRUE)) install.packages("ggplot2")
library(ggplot2)
if (!requireNamespace("knitr", quietly = TRUE)) install.packages("knitr")
library(knitr)

# Load the data
file_path <- "C:/Users/milli/OneDrive/Desktop/repdata_data_StormData.csv"
if (!file.exists(file_path)) {
  stop("The file does not exist in the specified path.")
}
storm_data <- read.csv(file_path, stringsAsFactors = FALSE)

# Convert relevant columns to appropriate types
storm_data$BGN_DATE <- as.Date(storm_data$BGN_DATE, format = "%m/%d/%Y %H:%M:%S")

# Extract year for further analysis
storm_data$year <- as.numeric(format(storm_data$BGN_DATE, "%Y"))

Description and Justification for Data Transformations:

Conversion of Date: The BGN_DATE column was converted to Date format to facilitate time-based analysis.

Extraction of Year: The year was extracted from the BGN_DATE for easier grouping and summarization.

Filtering and Summarizing the Data

# Summarize health impacts
health_impact <- storm_data %>%
  group_by(EVTYPE) %>%
  summarize(
    total_injuries = sum(INJURIES, na.rm = TRUE),
    total_fatalities = sum(FATALITIES, na.rm = TRUE)
  ) %>%
  arrange(desc(total_injuries + total_fatalities))

# Summarize economic impacts
economic_impact <- storm_data %>%
  group_by(EVTYPE) %>%
  summarize(
    total_prop_damage = sum(PROPDMG, na.rm = TRUE),
    total_crop_damage = sum(CROPDMG, na.rm = TRUE)
  ) %>%
  arrange(desc(total_prop_damage + total_crop_damage))

Results: Most Harmful Events to Population Health

# Top 10 events by health impact
top_health_impact <- head(health_impact, 10)
kable(top_health_impact)
EVTYPE total_injuries total_fatalities
TORNADO 91346 5633
EXCESSIVE HEAT 6525 1903
TSTM WIND 6957 504
FLOOD 6789 470
LIGHTNING 5230 816
HEAT 2100 937
FLASH FLOOD 1777 978
ICE STORM 1975 89
THUNDERSTORM WIND 1488 133
WINTER STORM 1321 206

Description: The table lists the top 10 event types that cause the most injuries and fatalities across the United States.

Events with Greatest Economic Consequences

# Top 10 events by economic impact
top_economic_impact <- head(economic_impact, 10)
kable(top_economic_impact)
EVTYPE total_prop_damage total_crop_damage
TORNADO 3212258.2 100018.52
FLASH FLOOD 1420124.6 179200.46
TSTM WIND 1335965.6 109202.60
HAIL 688693.4 579596.28
FLOOD 899938.5 168037.88
THUNDERSTORM WIND 876844.2 66791.45
LIGHTNING 603351.8 3580.61
THUNDERSTORM WINDS 446293.2 18684.93
HIGH WIND 324731.6 17283.21
WINTER STORM 132720.6 1978.99

Description: The table shows the top 10 event types that result in the most property and crop damage, indicating significant economic consequences.

Figures: Figure 1: Top Events by Health Impact

ggplot(top_health_impact, aes(x = reorder(EVTYPE, -total_injuries - total_fatalities), y = total_injuries + total_fatalities)) +
  geom_bar(stat = "identity", fill = "red") +
  labs(title = "Top 10 Events by Health Impact", x = "Event Type", y = "Total Injuries and Fatalities") +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

Description: This bar plot depicts the top 10 event types by their total injuries and fatalities, highlighting the most harmful events to population health.

Figure 2: Top Events by Economic Impact

ggplot(top_economic_impact, aes(x = reorder(EVTYPE, -total_prop_damage - total_crop_damage), y = total_prop_damage + total_crop_damage)) +
  geom_bar(stat = "identity", fill = "blue") +
  labs(title = "Top 10 Events by Economic Impact", x = "Event Type", y = "Total Property and Crop Damage") +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

Description: This bar plot shows the top 10 event types by total property and crop damage, indicating the events with the greatest economic consequences.

Conclusion:

This analysis highlights the types of severe weather events that have the most significant impact on public health and the economy. Tornadoes, hurricanes, and floods emerge as the most critical events that require focused attention and resource allocation for preparedness and mitigation efforts.