library(dplyr)
library(ggplot2)
library(knitr)
This analysis explores the U.S. National Oceanic and Atmospheric Administration (NOAA) Storm Database to determine which types of severe weather events have the greatest impact on population health and the economy. Population health impact is measured using the total number of fatalities and injuries, while economic impact is measured using the combined value of property and crop damage. The analysis begins with the original compressed storm data file and performs all data processing within this report. Results show that tornadoes are the leading cause of injuries and fatalities, while floods and related events account for the highest economic losses.
The data were read directly from the original compressed NOAA storm database file. Population health impact was calculated by summing fatalities and injuries for each event type. Economic impact was calculated by converting the property and crop damage exponents into numeric multipliers and summing the resulting dollar values.
storm <- read.csv(
"repdata_data_StormData.csv.bz2",
stringsAsFactors = FALSE
)
dim(storm)
## [1] 902297 37
health <- storm %>%
group_by(EVTYPE) %>%
summarise(
Fatalities = sum(FATALITIES, na.rm = TRUE),
Injuries = sum(INJURIES, na.rm = TRUE),
Total = Fatalities + Injuries,
.groups = "drop"
) %>%
arrange(desc(Total))
kable(head(health, 10))
| EVTYPE | Fatalities | Injuries | Total |
|---|---|---|---|
| TORNADO | 5633 | 91346 | 96979 |
| EXCESSIVE HEAT | 1903 | 6525 | 8428 |
| TSTM WIND | 504 | 6957 | 7461 |
| FLOOD | 470 | 6789 | 7259 |
| LIGHTNING | 816 | 5230 | 6046 |
| HEAT | 937 | 2100 | 3037 |
| FLASH FLOOD | 978 | 1777 | 2755 |
| ICE STORM | 89 | 1975 | 2064 |
| THUNDERSTORM WIND | 133 | 1488 | 1621 |
| WINTER STORM | 206 | 1321 | 1527 |
convert_exp <- function(exp){
exp <- toupper(exp)
if(exp == "H") return(1e2)
if(exp == "K") return(1e3)
if(exp == "M") return(1e6)
if(exp == "B") return(1e9)
if(exp %in% c("0","1","2","3","4","5","6","7","8")) {
return(10^as.numeric(exp))
}
return(1)
}
storm$PROP_MULT <- sapply(storm$PROPDMGEXP, convert_exp)
storm$CROP_MULT <- sapply(storm$CROPDMGEXP, convert_exp)
storm$PropertyDamage <- storm$PROPDMG * storm$PROP_MULT
storm$CropDamage <- storm$CROPDMG * storm$CROP_MULT
storm$EconomicDamage <- storm$PropertyDamage + storm$CropDamage
economic <- storm %>%
group_by(EVTYPE) %>%
summarise(
TotalDamage = sum(EconomicDamage, na.rm = TRUE),
.groups = "drop"
) %>%
arrange(desc(TotalDamage))
kable(head(economic,10))
| EVTYPE | TotalDamage |
|---|---|
| FLOOD | 150319678257 |
| HURRICANE/TYPHOON | 71913712800 |
| TORNADO | 57362333947 |
| STORM SURGE | 43323541000 |
| HAIL | 18761221986 |
| FLASH FLOOD | 18243991079 |
| DROUGHT | 15018672000 |
| HURRICANE | 14610229010 |
| RIVER FLOOD | 10148404500 |
| ICE STORM | 8967041360 |
The table below shows the ten event types with the highest combined number of fatalities and injuries.
top_health <- head(health,10)
ggplot(top_health,
aes(x = reorder(EVTYPE, Total),
y = Total)) +
geom_col(fill = "steelblue") +
coord_flip() +
labs(
title = "Top 10 Weather Events Affecting Population Health",
x = "Event Type",
y = "Fatalities + Injuries"
) +
theme_minimal()
The results indicate that tornadoes are responsible for the highest combined number of fatalities and injuries in the United States. Excessive heat, floods, lightning, and thunderstorms also contribute significantly to population health impacts.
The table below summarizes the ten weather event types with the greatest total economic damage.
top_damage <- head(economic,10)
ggplot(top_damage,
aes(x = reorder(EVTYPE, TotalDamage),
y = TotalDamage/1e9)) +
geom_col(fill = "firebrick") +
coord_flip() +
labs(
title = "Top 10 Weather Events by Economic Damage",
x = "Event Type",
y = "Damage (Billions of USD)"
) +
theme_minimal()
Floods, hurricanes, storm surges, and tornadoes account for the greatest economic losses in the NOAA Storm Database. These events cause substantial property damage as well as significant agricultural losses.