This report explores the NOAA Storm Database to analyze the impact of severe weather events in the United States between 1950 and 2011. The database contains information about storm characteristics, as well as estimates of fatalities, injuries, and economic damages. Our primary goal is to identify which types of events are most harmful to population health and which have the greatest economic consequences.To measure health impacts, we summarize the number of fatalities and injuries associated with each event type. To measure economic impacts, we combine reported property damage and crop damage. The data required cleaning and aggregation because event types (EVTYPE) were not always consistently recorded.Our results show that tornadoes are the most dangerous events with respect to population health, causing the highest numbers of fatalities and injuries. In contrast, floods, hurricanes/typhoons, and storm surges are responsible for the largest economic damages. These findings highlight the importance of preparedness and resource allocation for these high-impact weather events.
# Load required libraries
library(data.table)
##
## Attaching package: 'data.table'
## The following objects are masked from 'package:dplyr':
##
## between, first, last
# File URL for NOAA Storm Database (47 MB bz2 file)
fileUrl <- "https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2FStormData.csv.bz2"
# Download the file to the current working directory
download.file(fileUrl, destfile = "StormData.csv.bz2", mode = "wb")
Read the CSV directly from the compressed file using data.table then Select the relevant columns.
storm_data <- fread("StormData.csv.bz2")
storm <- storm_data %>%
select(EVTYPE, FATALITIES, INJURIES, PROPDMG, PROPDMGEXP, CROPDMG, CROPDMGEXP)
str(storm)
## Classes 'data.table' and 'data.frame': 902297 obs. of 7 variables:
## $ EVTYPE : chr "TORNADO" "TORNADO" "TORNADO" "TORNADO" ...
## $ FATALITIES: num 0 0 0 0 0 0 0 0 1 0 ...
## $ INJURIES : num 15 0 2 2 2 6 1 0 14 0 ...
## $ PROPDMG : num 25 2.5 25 2.5 2.5 2.5 2.5 2.5 25 25 ...
## $ PROPDMGEXP: chr "K" "K" "K" "K" ...
## $ CROPDMG : num 0 0 0 0 0 0 0 0 0 0 ...
## $ CROPDMGEXP: chr "" "" "" "" ...
## - attr(*, ".internal.selfref")=<externalptr>
We clean the damage exponents by converting K, M and B into numerical multipliers
prop_mult <- c("K"=1e3, "M"=1e6, "B"=1e9)
crop_mult <- c("K"=1e3, "M"=1e6, "B"=1e9)
We can get the actual values of the property damage in USd by multiplying PROPDMG by PROPDMGEXP, we also convert missing and blank values with the digi 1.
storm <- storm %>%
mutate(PROPDMGEXP = toupper(PROPDMGEXP),
CROPDMGEXP = toupper(CROPDMGEXP),
prop_dmg = PROPDMG * coalesce(prop_mult[PROPDMGEXP], 1),
crop_dmg = CROPDMG * coalesce(crop_mult[CROPDMGEXP], 1))
str(storm)
## Classes 'data.table' and 'data.frame': 902297 obs. of 9 variables:
## $ EVTYPE : chr "TORNADO" "TORNADO" "TORNADO" "TORNADO" ...
## $ FATALITIES: num 0 0 0 0 0 0 0 0 1 0 ...
## $ INJURIES : num 15 0 2 2 2 6 1 0 14 0 ...
## $ PROPDMG : num 25 2.5 25 2.5 2.5 2.5 2.5 2.5 25 25 ...
## $ PROPDMGEXP: chr "K" "K" "K" "K" ...
## $ CROPDMG : num 0 0 0 0 0 0 0 0 0 0 ...
## $ CROPDMGEXP: chr "" "" "" "" ...
## $ prop_dmg : Named num 25000 2500 25000 2500 2500 2500 2500 2500 25000 25000 ...
## ..- attr(*, "names")= chr [1:902297] "K" "K" "K" "K" ...
## $ crop_dmg : Named num 0 0 0 0 0 0 0 0 0 0 ...
## ..- attr(*, "names")= chr [1:902297] "" "" "" "" ...
## - attr(*, ".internal.selfref")=<externalptr>
Here we will explore which events are most harmful with respect to population health and also which types of events have the greatest economic consequences in the United States.
health <- storm %>%
group_by(EVTYPE) %>%
summarise(fatalities = sum(FATALITIES, na.rm=TRUE),
injuries = sum(INJURIES, na.rm=TRUE)) %>%
mutate(total = fatalities + injuries) %>%
arrange(desc(total))
head(health, 10)
## # A tibble: 10 × 4
## EVTYPE fatalities injuries total
## <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
# Plot
ggplot(head(health, 10), aes(x=reorder(EVTYPE, total), y=total)) +
geom_col(fill="red") +
coord_flip() +
labs(title="Top 10 Most Harmful Weather Events (Health)",
x="Event Type", y="Fatalities + Injuries")
The data show that tornadoes are by far the most harmful weather event
to population health, causing more than 90,000 combined fatalities and
injuries across the United States. Other event types with significant
health impacts include excessive heat, floods, thunderstorm winds, and
lightning.
The bar plot of the top 10 event types confirms that tornadoes dominate in terms of human harm, followed by a steep decline for the next categories.
econ <- storm %>%
group_by(EVTYPE) %>%
summarise(total_damage = sum(prop_dmg + crop_dmg, na.rm=TRUE)) %>%
arrange(desc(total_damage))
head(econ, 10)
## # A tibble: 10 × 2
## EVTYPE total_damage
## <chr> <dbl>
## 1 FLOOD 150319678257
## 2 HURRICANE/TYPHOON 71913712800
## 3 TORNADO 57352114049.
## 4 STORM SURGE 43323541000
## 5 HAIL 18758221521.
## 6 FLASH FLOOD 17562129167.
## 7 DROUGHT 15018672000
## 8 HURRICANE 14610229010
## 9 RIVER FLOOD 10148404500
## 10 ICE STORM 8967041360
# Plot
ggplot(head(econ, 10), aes(x=reorder(EVTYPE, total_damage), y=total_damage/1e9)) +
geom_col(fill="blue") +
coord_flip() +
labs(title="Top 10 Events by Economic Damage",
x="Event Type", y="Damage (Billions USD)")
The analysis indicates that floods are the most economically damaging weather events, with estimated losses exceeding $150 billion. Hurricanes/typhoons, tornadoes, and storm surges are also responsible for substantial financial damage, particularly in coastal and storm-prone regions.
The top 10 most economically costly event types clearly show floods as the leading contributor, with hurricanes and storm surges following closely behind.