Synopsis

Severe weather events can cause significant harm to public health and the economy. This analysis explores data from the NOAA Storm Database to identify which types of weather events are most harmful to population health and which have the greatest economic consequences. Population health impact is measured using fatalities and injuries. Economic impact is measured using property and crop damage. The data span from 1950 to 2011 across the United States. The results help highlight which weather events should be prioritized for preparedness efforts.


Data Processing

The data for this analysis come from the U.S. National Oceanic and Atmospheric Administration (NOAA) Storm Database. The dataset is provided as a compressed CSV file and is loaded directly into R. Only relevant variables are selected, and damage values are converted into numeric form using the provided exponent fields.

Loading the Data

library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(ggplot2)

storm_data <- read.csv("repdata_data_StormData.csv.bz2", stringsAsFactors = FALSE)

Processing Population Health Data

health_data <- storm_data %>%
select(EVTYPE, FATALITIES, INJURIES) %>%
group_by(EVTYPE) %>%
summarise(
Fatalities = sum(FATALITIES, na.rm = TRUE),
Injuries = sum(INJURIES, na.rm = TRUE),
Total = Fatalities + Injuries
) %>%
arrange(desc(Total)) %>%
slice(1:10)
## `summarise()` ungrouping output (override with `.groups` argument)

Processing Economic Damage Data

convert_exp <- function(exp) {
if (exp == "H" | exp == "h") return(1e2)
if (exp == "K" | exp == "k") return(1e3)
if (exp == "M" | exp == "m") return(1e6)
if (exp == "B" | exp == "b") return(1e9)
return(0)
}

storm_data$PROP_EXP <- sapply(storm_data$PROPDMGEXP, convert_exp)
storm_data$CROP_EXP <- sapply(storm_data$CROPDMGEXP, convert_exp)

storm_data$PROP_DAMAGE <- storm_data$PROPDMG * storm_data$PROP_EXP
storm_data$CROP_DAMAGE <- storm_data$CROPDMG * storm_data$CROP_EXP

econ_data <- storm_data %>%
select(EVTYPE, PROP_DAMAGE, CROP_DAMAGE) %>%
group_by(EVTYPE) %>%
summarise(
Property = sum(PROP_DAMAGE, na.rm = TRUE),
Crop = sum(CROP_DAMAGE, na.rm = TRUE),
Total = Property + Crop
) %>%
arrange(desc(Total)) %>%
slice(1:10)
## `summarise()` ungrouping output (override with `.groups` argument)

Results

Impact on Population Health

ggplot(health_data, aes(x = reorder(EVTYPE, Total), y = Total)) +
geom_bar(stat = "identity", fill = "steelblue") +
coord_flip() +
labs(
title = "Top 10 Weather Events Harmful to Population Health",
x = "Event Type",
y = "Total Fatalities and Injuries"
)

Economic Consequences

ggplot(econ_data, aes(x = reorder(EVTYPE, Total), y = Total / 1e9)) +
geom_bar(stat = "identity", fill = "darkred") +
coord_flip() +
labs(
title = "Top 10 Weather Events by Economic Damage",
x = "Event Type",
y = "Total Damage (Billion USD)"
)

Summary of Findings

The analysis shows that events such as tornadoes and excessive heat have the greatest impact on population health, while floods and hurricanes cause the highest economic damage. Understanding these impacts can help governments and municipalities prioritize resources and improve preparedness for severe weather events.