This analysis uses the NOAA Storm Database to investigate the effects of severe weather events across the United States. The analysis focuses on two questions: which types of events are most harmful to population health, and which types of events have the greatest economic consequences. Population health is evaluated using fatalities and injuries associated with each event type, while economic consequences are evaluated using property and crop damage. The results show that tornadoes have the greatest impact on population health, while floods have the greatest combined economic impact.
The analysis uses the original NOAA Storm Database in its compressed
.bz2 format. The data are downloaded directly from the
source URL so that the analysis does not depend on a personal computer
directory.
library(dplyr)
library(ggplot2)
library(scales)
# URL of the original NOAA Storm Database
fileUrl <- "https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2FStormData.csv.bz2"
# Download the original .bz2 file if it does not already exist
if (!file.exists("StormData.csv.bz2")) {
download.file(
fileUrl,
destfile = "StormData.csv.bz2",
mode = "wb"
)
}
# Read the compressed .bz2 file directly
storm <- read.csv(
bzfile("StormData.csv.bz2"),
stringsAsFactors = FALSE
)
# Check the dimensions of the dataset
dim(storm)
## [1] 902297 37
The NOAA Storm Database contains 902,297 observations of severe weather events.
The variables used for the population health analysis are:
EVTYPE: weather event typeFATALITIES: number of fatalitiesINJURIES: number of injuriesThe variables used for the economic analysis are:
PROPDMG: property damage valuePROPDMGEXP: property damage exponentCROPDMG: crop damage valueCROPDMGEXP: crop damage exponentFatalities and injuries were aggregated separately by weather event type. This allows the event types with the greatest numbers of fatalities and injuries to be identified independently.
health <- storm %>%
group_by(EVTYPE) %>%
summarise(
Fatalities = sum(FATALITIES, na.rm = TRUE),
Injuries = sum(INJURIES, na.rm = TRUE),
.groups = "drop"
)
# Top 10 event types by fatalities
top_fatalities <- health %>%
arrange(desc(Fatalities)) %>%
slice_head(n = 10)
# Top 10 event types by injuries
top_injuries <- health %>%
arrange(desc(Injuries)) %>%
slice_head(n = 10)
top_fatalities
## # A tibble: 10 × 3
## EVTYPE Fatalities Injuries
## <chr> <dbl> <dbl>
## 1 TORNADO 5633 91346
## 2 EXCESSIVE HEAT 1903 6525
## 3 FLASH FLOOD 978 1777
## 4 HEAT 937 2100
## 5 LIGHTNING 816 5230
## 6 TSTM WIND 504 6957
## 7 FLOOD 470 6789
## 8 RIP CURRENT 368 232
## 9 HIGH WIND 248 1137
## 10 AVALANCHE 224 170
top_injuries
## # A tibble: 10 × 3
## EVTYPE Fatalities Injuries
## <chr> <dbl> <dbl>
## 1 TORNADO 5633 91346
## 2 TSTM WIND 504 6957
## 3 FLOOD 470 6789
## 4 EXCESSIVE HEAT 1903 6525
## 5 LIGHTNING 816 5230
## 6 HEAT 937 2100
## 7 ICE STORM 89 1975
## 8 FLASH FLOOD 978 1777
## 9 THUNDERSTORM WIND 133 1488
## 10 HAIL 15 1361
For the population-health figure, a combined descriptive measure was calculated by adding fatalities and injuries. This measure is used to rank the event types displayed in the figure, while fatalities and injuries remain available as separate measures for interpretation.
health_plot <- health %>%
mutate(
Health_Impact = Fatalities + Injuries
) %>%
arrange(desc(Health_Impact)) %>%
slice_head(n = 10)
health_plot
## # A tibble: 10 × 4
## EVTYPE Fatalities Injuries 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
The property and crop damage values are recorded using separate damage values and exponent fields. The exponent fields are used to convert the reported values into dollar amounts.
The standard K, M, and B codes
represent thousands, millions, and billions, respectively. The
additional legacy codes present in this historical dataset are also
handled explicitly.
damage_multiplier <- function(x) {
x <- toupper(trimws(x))
result <- rep(1, length(x))
# Standard NOAA damage exponent codes
result[x == "K"] <- 1e3
result[x == "M"] <- 1e6
result[x == "B"] <- 1e9
# Additional legacy code
result[x == "H"] <- 1e2
# Numeric exponent codes
numeric_codes <- grepl("^[0-8]$", x)
result[numeric_codes] <- 10^as.numeric(
x[numeric_codes]
)
result
}
Property and crop damage are then converted to dollar amounts and aggregated by event type.
economic <- storm %>%
mutate(
Property_Damage =
PROPDMG * damage_multiplier(PROPDMGEXP),
Crop_Damage =
CROPDMG * damage_multiplier(CROPDMGEXP),
Total_Damage =
Property_Damage + Crop_Damage
) %>%
group_by(EVTYPE) %>%
summarise(
Property_Damage =
sum(Property_Damage, na.rm = TRUE),
Crop_Damage =
sum(Crop_Damage, na.rm = TRUE),
Total_Damage =
sum(Total_Damage, na.rm = TRUE),
.groups = "drop"
) %>%
arrange(desc(Total_Damage))
head(economic, 10)
## # A tibble: 10 × 4
## EVTYPE Property_Damage Crop_Damage Total_Damage
## <chr> <dbl> <dbl> <dbl>
## 1 FLOOD 144657709807 5661968450 150319678257
## 2 HURRICANE/TYPHOON 69305840000 2607872800 71913712800
## 3 TORNADO 56947380676. 414953270 57362333946.
## 4 STORM SURGE 43323536000 5000 43323541000
## 5 HAIL 15735267513. 3025954473 18761221986.
## 6 FLASH FLOOD 16822673978. 1421317100 18243991078.
## 7 DROUGHT 1046106000 13972566000 15018672000
## 8 HURRICANE 11868319010 2741910000 14610229010
## 9 RIVER FLOOD 5118945500 5029459000 10148404500
## 10 ICE STORM 3944927860 5022113500 8967041360
The following figure shows the ten event types with the largest combined number of fatalities and injuries.
ggplot(
health_plot,
aes(
x = reorder(EVTYPE, Health_Impact),
y = Health_Impact
)
) +
geom_col() +
coord_flip() +
labs(
title = "Top 10 Weather Events by Population Health Impact",
x = "Weather Event",
y = "Fatalities and Injuries"
) +
theme_minimal()
Tornadoes have by far the largest population-health impact in the dataset. They caused 5,633 fatalities and 91,346 injuries, giving a combined total of 96,979 fatalities and injuries.
Tornadoes also rank first when fatalities and injuries are considered separately. The next most harmful event type based on the combined measure is excessive heat, with 1,903 fatalities and 6,525 injuries, for a combined total of 8,428.
Therefore, tornadoes are the most harmful event type with respect to population health in the NOAA Storm Database.
The following figure shows the ten event types with the largest combined property and crop damage.
economic_plot <- economic %>%
slice_head(n = 10)
ggplot(
economic_plot,
aes(
x = reorder(EVTYPE, Total_Damage),
y = Total_Damage
)
) +
geom_col() +
coord_flip() +
scale_y_continuous(
labels = label_dollar(
scale = 1e-9,
suffix = "B"
)
) +
labs(
title = "Top 10 Weather Events by Economic Damage",
x = "Weather Event",
y = "Total Damage (Billions of Dollars)"
) +
theme_minimal()
Floods have the largest economic impact, with approximately $150.32 billion in combined property and crop damage.
Approximately $144.66 billion of the flood damage was property damage, while approximately $5.66 billion was crop damage.
Hurricane/typhoon events rank second with approximately $71.91 billion, followed by tornadoes with approximately $57.36 billion.
Therefore, floods have the greatest economic consequences in the NOAA Storm Database.
The analysis demonstrates that different severe weather events have different types of impacts.
For population health, tornadoes are the most harmful event type. They produced 5,633 fatalities and 91,346 injuries, making them the leading event type for both measures.
For economic consequences, floods have the greatest impact. They produced approximately $150.32 billion in combined property and crop damage, substantially more than the next highest event category.
Therefore, based on the NOAA Storm Database:
These results illustrate why severe weather preparedness needs to consider both human and economic impacts, since the event type causing the greatest loss of life and injury is not necessarily the event type causing the greatest financial damage.