Synopsis This analysis explores the U.S. National Oceanic and Atmospheric Administration (NOAA) storm database to determine which types of severe weather events are most harmful to public health and have the greatest economic consequences. The dataset was processed in R, focusing on fatalities, injuries, property damage, and crop damage. The results indicate that tornadoes are the most dangerous to public health, causing the highest number of fatalities and injuries. Meanwhile, floods and hurricanes/typhoons have the most significant economic impacts, leading to the highest property and crop damage. These findings can help government and municipal officials prioritize disaster preparedness and resource allocation.
#### 1. Downloading and Loading the Data The dataset was downloaded directly from the NOAA website as a compressed CSV file (repdata_data_StormData.csv.bz2). The following R code was used to load and process the data:
library(dplyr)
library(ggplot2)
library(tidyr)
library(magrittr)
if (!file.exists("repdata_data_StormData.csv.bz2")) {
download.file(
url = "https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2FStormData.csv.bz2",
destfile = "repdata_data_StormData.csv.bz2",
method = "curl"
)
}
storm_data <- read.csv("repdata_data_StormData.csv.bz2")
We focus on the following variables:
EVTYPE (event type)
FATALITIES (number of deaths)
INJURIES (number of injuries)
PROPDMG (property damage)
PROPDMGEXP (property damage exponent, e.g., K, M, B)
CROPDMG (crop damage)
CROPDMGEXP (crop damage exponent)
First, we process the damage values by converting the exponent letters into numeric multipliers:
convert_exp <- function(exp) {
exp <- toupper(exp)
multiplier <- case_when(
exp == "K" ~ 1e3,
exp == "M" ~ 1e6,
exp == "B" ~ 1e9,
TRUE ~ 1 # Default (no multiplier)
)
return(multiplier)
}
storm_data <- storm_data %>%
mutate(
PROP_DAMAGE = PROPDMG * sapply(PROPDMGEXP, convert_exp),
CROP_DAMAGE = CROPDMG * sapply(CROPDMGEXP, convert_exp),
TOTAL_DAMAGE = PROP_DAMAGE + CROP_DAMAGE
)
We summarize the data to identify the most harmful events for public health and the most economically damaging events:
health_impact <- storm_data %>%
group_by(EVTYPE) %>%
summarise(
FATALITIES = sum(FATALITIES),
INJURIES = sum(INJURIES),
TOTAL_HEALTH = FATALITIES + INJURIES
) %>%
arrange(desc(TOTAL_HEALTH))
economic_impact <- storm_data %>%
group_by(EVTYPE) %>%
summarise(
PROP_DAMAGE = sum(PROP_DAMAGE),
CROP_DAMAGE = sum(CROP_DAMAGE),
TOTAL_ECONOMIC = sum(TOTAL_DAMAGE)
) %>%
arrange(desc(TOTAL_ECONOMIC))
top_health <- head(health_impact, 10)
print(top_health)
## # A tibble: 10 × 4
## EVTYPE FATALITIES 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
ggplot(top_health, aes(x = reorder(EVTYPE, -TOTAL_HEALTH), y = TOTAL_HEALTH)) +
geom_bar(stat = "identity", fill = "red") +
labs(
title = "Top 10 Most Harmful Weather Events (Fatalities + Injuries)",
x = "Event Type",
y = "Total Health Impact"
) +
theme(axis.text.x = element_text(angle = 45, hjust = 1))
Tornadoes are the deadliest and most injury-causing events, followed by excessive heat and flash floods.
top_economic <- head(economic_impact, 10)
print(top_economic)
## # A tibble: 10 × 4
## EVTYPE PROP_DAMAGE CROP_DAMAGE TOTAL_ECONOMIC
## <chr> <dbl> <dbl> <dbl>
## 1 FLOOD 144657709807 5661968450 150319678257
## 2 HURRICANE/TYPHOON 69305840000 2607872800 71913712800
## 3 TORNADO 56937160779. 414953270 57352114049.
## 4 STORM SURGE 43323536000 5000 43323541000
## 5 HAIL 15732267048. 3025954473 18758221521.
## 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
ggplot(top_economic, aes(x = reorder(EVTYPE, -TOTAL_ECONOMIC), y = TOTAL_ECONOMIC / 1e9)) +
geom_bar(stat = "identity", fill = "blue") +
labs(
title = "Top 10 Most Economically Damaging Weather Events",
x = "Event Type",
y = "Total Economic Damage (Billions USD)"
) +
theme(axis.text.x = element_text(angle = 45, hjust = 1))
Floods and hurricanes/typhoons cause the most economic damage, followed by tornadoes and storm surges.
This analysis highlights that:
Tornadoes are the most dangerous to public health.
Floods and hurricanes have the highest economic impact.
Government and municipal agencies should prioritize disaster preparedness and mitigation strategies for these high-impact weather events to minimize harm to people and infrastructure.