This analysis examines the U.S. National Oceanic and Atmospheric Administration (NOAA) Storm Database to understand the impact of severe weather events across the United States. The dataset includes information on different types of weather events along with associated fatalities, injuries, and economic damage. The objective of this study is to identify which types of events are most harmful to population health and which have the greatest economic consequences. Population health impact is measured using the total number of fatalities and injuries caused by each event type. Economic impact is evaluated based on the total property damage and crop damage reported. The data is processed and aggregated by event type to determine overall impact levels. The results highlight the most significant weather events contributing to both human harm and financial loss. Visualizations are used to clearly present the top contributing event types. The findings provide insight into patterns of damage caused by severe weather. This analysis can help authorities prioritize resources and improve preparedness for future events.
library(dplyr)
## Warning: package 'dplyr' was built under R version 4.5.3
##
## 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
data <- read.csv("repdata_data_StormData.csv")
data2 <- data %>%
select(EVTYPE, FATALITIES, INJURIES, PROPDMG, CROPDMG)
data2$health <- data2$FATALITIES + data2$INJURIES
data2$economic <- data2$PROPDMG + data2$CROPDMG
health_summary <- data2 %>%
group_by(EVTYPE) %>%
summarise(total = sum(health)) %>%
arrange(desc(total)) %>%
head(10)
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 4.5.3
ggplot(health_summary, aes(x=reorder(EVTYPE, total), y=total)) +
geom_bar(stat="identity") +
coord_flip() +
labs(title="Top 10 Events Harmful to Health")
The results show that tornadoes are the most harmful event type in terms of population health, causing the highest number of fatalities and injuries. Other events such as excessive heat and strong winds also contribute significantly.
econ_summary <- data2 %>%
group_by(EVTYPE) %>%
summarise(total = sum(economic)) %>%
arrange(desc(total)) %>%
head(10)
ggplot(econ_summary, aes(x=reorder(EVTYPE, total), y=total)) +
geom_bar(stat="identity") +
coord_flip() +
labs(title="Top 10 Economic Damage Events")
The economic analysis shows that tornadoes cause the greatest financial damage, followed by flash floods and thunderstorms, which result in major property and crop losses.