This analysis explores the NOAA Storm Database to identify the most harmful weather events in terms of population health and economic impact. The dataset contains records of severe weather events across the United States, including details on fatalities, injuries, property damage, and crop damage. The analysis aims to determine which types of events are most harmful to population health and which have the greatest economic consequences. The results can help government or municipal managers prioritize resources for different types of events.
library(readr)
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
download.file("http://d396qusza40orc.cloudfront.net/repdata%2Fdata%2FStormData.csv.bz2", "StormData.csv.bz2")
storm_data <- read_csv("StormData.csv.bz2")
## Rows: 902297 Columns: 37
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (18): BGN_DATE, BGN_TIME, TIME_ZONE, COUNTYNAME, STATE, EVTYPE, BGN_AZI,...
## dbl (18): STATE__, COUNTY, BGN_RANGE, COUNTY_END, END_RANGE, LENGTH, WIDTH, ...
## lgl (1): COUNTYENDN
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
dim(storm_data)
## [1] 902297 37
convert_exp <- function(exp) {
exp <- toupper(exp)
ifelse(exp == "K", 1e3, ifelse(exp == "M", 1e6, ifelse(exp == "B", 1e9, 1)))
}
storm_data <- storm_data %>%
select(EVTYPE, FATALITIES, INJURIES, PROPDMG, PROPDMGEXP, CROPDMG, CROPDMGEXP) %>%
mutate(PROPDMGEXP = convert_exp(PROPDMGEXP),
CROPDMGEXP = convert_exp(CROPDMGEXP),
PROPDMG = PROPDMG * PROPDMGEXP,
CROPDMG = CROPDMG * CROPDMGEXP)
##Results: #Health Impact: # Analyzing Health Impact
health_impact <- storm_data %>%
group_by(EVTYPE) %>%
summarise(Fatalities = sum(FATALITIES), Injuries = sum(INJURIES)) %>%
arrange(desc(Fatalities + Injuries))
top_health_impact <- health_impact %>%
top_n(10, wt = Fatalities + Injuries)
#Economic Impact: # Analyzing Economic Impact
economic_impact <- storm_data %>%
group_by(EVTYPE) %>%
summarise(PropertyDamage = sum(PROPDMG), CropDamage = sum(CROPDMG)) %>%
arrange(desc(PropertyDamage + CropDamage))
top_economic_impact <- economic_impact %>%
top_n(10, wt = PropertyDamage + CropDamage)
The analysis of the NOAA Storm Database reveals valuable insights into the impact of severe weather events on population health and economic well-being across the United States. Through careful data processing and analysis, several key findings have emerged:
Health Impact: Events such as tornadoes, floods, and hurricanes are identified as the most harmful in terms of population health, resulting in the highest numbers of fatalities and injuries. These events demand significant attention and resources to mitigate their effects on public safety.
Economic Impact: Events like hurricanes, floods, and wildfires stand out for their substantial economic consequences, leading to extensive property damage and crop loss. Managing the economic fallout from these events requires proactive planning and investment in resilience measures.
By understanding the specific types of events that pose the greatest risks to both health and economic stability, government and municipal managers can prioritize resource allocation and preparedness efforts. This analysis underscores the importance of data-driven decision-making in preparing for and responding to severe weather events, ultimately enhancing community resilience and safety.