This analysis examines the U.S. National Oceanic and Atmospheric Administration (NOAA) Storm Database to identify the types of severe weather events that have had the greatest impact on population health and the economy. Population health impact was evaluated using the total number of fatalities and injuries associated with each event type. Economic impact was evaluated using estimated property and crop damage after accounting for the magnitude codes reported in the database. The analysis shows which event types are associated with the largest health burden and economic losses across the United States.
The raw storm data were downloaded directly from the course website. The original compressed .csv.bz2 file was read into R without preprocessing outside the analysis.
url <- "https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2FStormData.csv.bz2"
file <- "StormData.csv.bz2"
if (!file.exists(file)) {
download.file(url, file, mode = "wb")
}
storm <- read.csv(
bzfile(file),
stringsAsFactors = FALSE
)
dim(storm)
## [1] 902297 37
The variables FATALITIES and INJURIES were used to evaluate population health effects. For each event type, the total numbers of fatalities and injuries were summed.
health <- aggregate(
cbind(FATALITIES, INJURIES) ~ EVTYPE,
data = storm,
FUN = sum,
na.rm = TRUE
)
health$TOTAL_HEALTH <- health$FATALITIES + health$INJURIES
health <- health[
order(health$TOTAL_HEALTH, decreasing = TRUE),
]
top_health <- head(health, 10)
top_health
## EVTYPE FATALITIES INJURIES TOTAL_HEALTH
## 834 TORNADO 5633 91346 96979
## 130 EXCESSIVE HEAT 1903 6525 8428
## 856 TSTM WIND 504 6957 7461
## 170 FLOOD 470 6789 7259
## 464 LIGHTNING 816 5230 6046
## 275 HEAT 937 2100 3037
## 153 FLASH FLOOD 978 1777 2755
## 427 ICE STORM 89 1975 2064
## 760 THUNDERSTORM WIND 133 1488 1621
## 972 WINTER STORM 206 1321 1527
For the economic analysis, property damage (PROPDMG) and crop damage (CROPDMG) were converted to dollar values using the corresponding magnitude indicators.
damage_multiplier <- function(x) {
x <- toupper(trimws(as.character(x)))
mult <- rep(1, length(x))
mult[x == "H"] <- 1e2
mult[x == "K"] <- 1e3
mult[x == "M"] <- 1e6
mult[x == "B"] <- 1e9
numeric_code <- grepl("^[0-9]$", x)
mult[numeric_code] <- 10^as.numeric(x[numeric_code])
mult
}
storm$PROPDMG_DOLLARS <-
storm$PROPDMG * damage_multiplier(storm$PROPDMGEXP)
storm$CROPDMG_DOLLARS <-
storm$CROPDMG * damage_multiplier(storm$CROPDMGEXP)
storm$TOTAL_ECONOMIC <-
storm$PROPDMG_DOLLARS + storm$CROPDMG_DOLLARS
economic <- aggregate(
TOTAL_ECONOMIC ~ EVTYPE,
data = storm,
FUN = sum,
na.rm = TRUE
)
economic <- economic[
order(economic$TOTAL_ECONOMIC, decreasing = TRUE),
]
top_economic <- head(economic, 10)
top_economic
## EVTYPE TOTAL_ECONOMIC
## 170 FLOOD 150319678257
## 411 HURRICANE/TYPHOON 71913712800
## 834 TORNADO 57362333946
## 670 STORM SURGE 43323541000
## 244 HAIL 18761221986
## 153 FLASH FLOOD 18243991078
## 95 DROUGHT 15018672000
## 402 HURRICANE 14610229010
## 590 RIVER FLOOD 10148404500
## 427 ICE STORM 8967041360
The following figure shows the ten event types associated with the largest combined number of fatalities and injuries.
par(mar = c(5, 11, 4, 2))
barplot(
rev(top_health$TOTAL_HEALTH),
names.arg = rev(top_health$EVTYPE),
horiz = TRUE,
las = 1,
xlab = "Total fatalities and injuries",
main = "Weather Events Most Harmful to Population Health"
)
Figure 1. Total fatalities and injuries for the ten weather-event categories associated with the greatest population health impact in the NOAA Storm Database.
The results indicate that TORNADO produced the largest combined number of fatalities and injuries, with 96,979 recorded health outcomes.
The following figure shows the ten event types associated with the greatest combined property and crop damage.
par(mar = c(5, 11, 4, 2))
barplot(
rev(top_economic$TOTAL_ECONOMIC / 1e9),
names.arg = rev(top_economic$EVTYPE),
horiz = TRUE,
las = 1,
xlab = "Total economic damage (billions of US dollars)",
main = "Weather Events with the Greatest Economic Impact"
)
Figure 2. Estimated property and crop losses for the ten weather-event categories associated with the greatest economic consequences.
The largest estimated economic loss was associated with FLOOD, with total property and crop damage of approximately $150.3 billion.
The NOAA Storm Database indicates that the weather events responsible for the greatest population health burden are not necessarily the same as those responsible for the greatest economic losses. Population health impact was assessed using fatalities and injuries, whereas economic impact was assessed using adjusted property and crop damage. These results provide a quantitative overview of the severe weather events associated with the greatest consequences in the United States.