Natural disasters are among the most impactful events that can profoundly affect individuals, communities, and societies. Their potential to cause widespread destruction, loss of life, and long-term economic and social disruption underscores the critical need for effective disaster risk management. By identifying and understanding risk situations, we can develop and implement strategic actions to prevent, mitigate, and overcome the adverse effects of such events. Equipping ourselves with knowledge and preparedness not only enhances resilience but also empowers communities to respond effectively, reducing vulnerability and safeguarding lives and livelihoods in the face of natural hazards.
This analysis seeks to address two critical questions regarding the impact of natural disasters and severe weather events across the United States:
Across the United States, which types of events (as indicated in the EVTYPE variable) are most harmful with respect to population health?
Across the United States, which types of events have the greatest economic consequences?
By exploring these questions, this study aims to enhance our understanding of the risks posed by natural disasters, ultimately contributing to more informed decision-making and effective disaster preparedness and response strategies.
The dataset used in this analysis comes from the storm database of the U.S. National Oceanic and Atmospheric Administration (NOAA). The primary objective of the study is to assess and quantify the impacts of these meteorological events, focusing on two key dimensions: harm to people (injuries and fatalities) and property damage.
To carry out this analysis, a structured workflow was implemented in R. Initially, the pacman package was used to efficiently manage and load the necessary libraries. Subsequently, data transformation and cleaning were performed using the dplyr package, which enabled advanced data manipulation operations such as filtering, grouping, and summarization.
From these processes, specific datasets were generated to facilitate the visualization of results. For this purpose, the ggplot2 package was used, along with additional extensions (ggplot extras), which allowed for the creation of clear and detailed graphs representing the analyzed dimensions. These graphs not only summarize the key findings but also provide a visual foundation for interpreting the impacts of storms in terms of human and material damage.
This block of code sets up the working environment for the analysis. First, it downloads the necessary files from an external source and extracts them for use. Next, it loads the required R packages and, finally, imports the data into the RStudio project, ensuring everything is ready for subsequent processing and analysis.
# URL as a string
#url <- "https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2FStormData.csv.bz2"
# Download the csv
#download.file(url = url, destfile = "data/storm.bz2")
# Extract the file
#unzip(zipfile = "data/storm.bz2", exdir = "data/")
# Load the Libraries
if (!require("pacman")) {
install.packages("pacman")
}
pacman::p_load(dplyr, tidyverse, stringr)
# Load the data
storm <- read.csv("storm.csv")
The data transformation process involves the use of the mutate function to convert values stored as characters. During this process, the str_to_upper function is applied to standardize the text into uppercase, and str_trim is used to remove leading and trailing blank spaces from each text string. These operations aim to normalize and condense the values.
Additionally, the mutate function is also applied to the PROPDMGEXP and CROPDMGEXP variables to recode certain values that were originally categorical into numeric values. This process transforms the exponents for property damage (PROPDMGEXP) and crop damage (CROPDMGEXP) into a standardized numeric representation, making them easier to use in subsequent calculations and analysis.
The group_by function is used to group values according to the EVTYPE variable (event type). Then, the summarize function is applied to count cases by summing the values of the FATALITIES and INJURIES variables into a new variable called HEALTH (health impact), and the values of PROPDMG (property damage) and CROPDMG (crop damage) into a variable called ECONOMIC (economic impact). Finally, each resulting dataframe is sorted in descending order to facilitate the identification of the most impactful events.
pacman::p_load(dplyr, tidyverse, stringr)
population <- storm %>%
mutate(EVTYPE = str_trim(str_to_upper(EVTYPE))) %>%
mutate(HEALTH = FATALITIES + INJURIES) %>%
group_by(EVTYPE) %>%
summarise(PEOPLE_HARM = sum(HEALTH)) %>%
arrange(desc(PEOPLE_HARM))
economic <- storm %>%
mutate(EVTYPE = str_trim(str_to_upper(EVTYPE))) %>%
mutate(PROPDMGEXP = case_when(
PROPDMGEXP == "K" ~ 1000,
PROPDMGEXP == "M" ~ 1000000,
PROPDMGEXP == "B" ~ 1000000000,
TRUE ~ as.numeric(PROPDMGEXP)
)) %>%
mutate(PROPDMG = coalesce(PROPDMGEXP, 0)) %>%
mutate(CROPDMGEXP = case_when(
CROPDMGEXP == "K" ~ 1000,
CROPDMGEXP == "M" ~ 1000000,
CROPDMGEXP == "B" ~ 1000000000,
TRUE ~ as.numeric(CROPDMGEXP)
)) %>%
mutate(CROPDMG = coalesce(CROPDMGEXP, 0)) %>%
mutate(ECONOMIC = PROPDMG + CROPDMG) %>%
group_by(EVTYPE) %>%
summarise(PROPERTY_HARM = sum(ECONOMIC)) %>%
arrange(desc(PROPERTY_HARM))
# Final data
data <- full_join(population, economic)
Lastly, a full_join is performed between the two grouped dataframes, merging the health impact (HEALTH) and economic impact (ECONOMIC) data into a single dataframe. This enables a comprehensive analysis of the events, linking both human health effects and material damages into one unified data structure.
To create the graphs, the data is first segmented by selecting the top 10 values for each variable of interest. Then, ggplot2 is used to generate clear and effective visualizations that allow for the identification and comparison of the most impactful events in terms of health (HEALTH). These graphs facilitate the interpretation of the results and highlight the most relevant patterns.
## data
plot_1 <- data %>%
arrange(desc(PEOPLE_HARM)) %>%
slice(1:10) %>%
select(-PROPERTY_HARM)
## Plot
ggplot(plot_1, aes(x = reorder(EVTYPE, -PEOPLE_HARM), y = PEOPLE_HARM, fill = EVTYPE)) +
geom_bar(stat = "identity", width = 0.7) +
geom_text(aes(label = PEOPLE_HARM), vjust = -0.5, size = 3.5, color = "black") +
scale_fill_brewer(palette = "Set3") +
theme_minimal() +
theme(
axis.text.x = element_text(angle = 45, hjust = 1, size = 10),
axis.title.y = element_text(size = 12, margin = margin(r = 10)),
plot.title = element_text(size = 14, face = "bold", hjust = 0.5),
legend.position = "none"
) +
xlab("Event Type") +
ylab("Total Population Impact") +
ggtitle("Top 10 Most Impactful Storm Types: Human Health Impact")
Tornado ranks first, with a significant impact of 96,979 on the population, followed by other events like Excessive Heat, Flood, and Lightning. These storms have caused substantial harm, highlighting their potential to affect human health through injuries and fatalities.
This information is critical for disaster risk management, as it identifies the most dangerous storm types and their consequences. By understanding which events pose the greatest threat to human health, policymakers and emergency services can prioritize preparedness efforts, allocate resources effectively, and develop targeted response strategies. Such data is essential for building resilient communities and reducing the impact of natural disasters on public health.
The role of climate change cannot be overlooked in this context. Rising global temperatures are intensifying the frequency and severity of extreme weather events, such as heatwaves, floods, and storms. For example, Excessive Heat events are becoming more common and deadly due to warmer climates, while heavier rainfall contributes to more severe flooding. Addressing climate change through mitigation and adaptation measures is crucial to reducing the future risks posed by these events and safeguarding vulnerable populations.
To create the graphs, the data is first segmented by selecting the top 10 values for each variable of interest. Then, ggplot2 is used to generate clear and effective visualizations that allow for the identification and comparison of the most impactful events in terms of economy (ECONOMIC). These graphs facilitate the interpretation of the results and highlight the most relevant patterns.
## Datos
plot_2 <- data %>%
arrange(desc(PROPERTY_HARM)) %>%
slice(1:10) %>%
select(-PEOPLE_HARM)
## Plot
ggplot(plot_2, aes(x = reorder(EVTYPE, -PROPERTY_HARM), y = PROPERTY_HARM, fill = EVTYPE)) +
geom_bar(stat = "identity", width = 0.7) +
geom_text(aes(label = PROPERTY_HARM), vjust = -0.5, size = 3.5, color = "black") +
scale_fill_brewer(palette = "Set3") +
theme_minimal() +
theme(
axis.text.x = element_text(angle = 45, hjust = 1, size = 10),
axis.title.y = element_text(size = 12, margin = margin(r = 10)),
plot.title = element_text(size = 14, face = "bold", hjust = 0.5),
legend.position = "none"
) +
xlab("Event Type") +
ylab("Total Property Impact") +
ggtitle("Top 10 Most Impactful Storm Types: Property Impact")
Leading the list is Hurricane/Typhoon, with an estimated property damage value of $306 billion, followed by Tornado and Flood, which also show significant economic impacts. Other events, such as Drought, Flash Flood, and Storm Surge, further highlight the diverse and widespread nature of property damage caused by extreme weather events.
This data underscores the immense economic burden that natural disasters place on communities, infrastructure, and the economy as a whole. Understanding which storm types cause the most property damage is essential for disaster risk management, as it helps prioritize investments in infrastructure resilience, insurance policies, and emergency response planning.
To mitigate these risks, it is crucial to integrate climate adaptation strategies into urban planning, strengthen building codes, and invest in early warning systems. Additionally, reducing greenhouse gas emissions to limit global warming is vital to curbing the long-term escalation of these costly disasters. This data serves as a stark reminder of the urgent need to address climate change and build more resilient communities.
This analysis of the impacts of extreme weather events on human health and property in the United States reveals key findings that are critical for disaster risk management and strategic planning. The main results include:
Human Health Impact: Tornadoes are the most devastating events in terms of health, affecting 96,979 people, followed by excessive heat and floods. These events cause injuries, fatalities, and strain on public health systems.
Economic Impact on Property: Hurricanes/typhoons lead in property damage, with an estimated cost of $306 billion, followed by tornadoes and floods. These events result in significant economic losses, affecting infrastructure, homes, and livelihoods.
Role of Climate Change: Climate change is exacerbating the frequency and intensity of these events. For example, rising global temperatures are intensifying heatwaves and storms, while increased precipitation is worsening floods. This suggests that health and economic impacts could worsen in the future if adequate measures are not taken.
Recommendations for Decision-Making
Resource Prioritization: Data indicates that preparedness and response efforts should focus on the most impactful events, such as tornadoes, hurricanes, and floods. This includes strengthening early warning systems and improving critical infrastructure.
Investment in Resilience: It is crucial to invest in disaster-resilient infrastructure, such as buildings and roads designed to withstand extreme events. Additionally, insurance and compensation policies should be promoted to help communities recover more quickly.
Climate Change Adaptation: Risk management plans should integrate climate change adaptation strategies, such as wetland restoration to mitigate floods and the creation of urban green spaces to reduce the effects of heatwaves.
Education and Awareness: Communities should be educated about the risks associated with these events and how to prepare for them. This includes awareness campaigns on safety measures during storms, floods, and heatwaves.
Climate Change Mitigation: In the long term, it is essential to reduce greenhouse gas emissions to limit global warming and, consequently, the intensification of these extreme weather events.
In summary, this information not only underscores the urgency of acting against current natural disasters but also provides a solid foundation for making informed decisions that protect communities, reduce economic losses, and build a more resilient future in the face of climate change.