Synopsis

The following analysis uses the NOAA (National Oceanic and Atmospheric Administration) weather data that includes data on individual weather events and their impacts. The report will use one data frame, “joined_data”, in order to complete this analysis. “joined_data” is comprised of data from the weather events coming from three categories, details, fatalities and locations. Each of these are vital to the report and the information that it will provide. This report will look at the commonality of the events and the the times of year and locations they take place. It will also asses the destruction caused by these weather events in terms of the impact on people’s health and crop supply. This analysis can be used to help determine the allocation of the amount, and types of resources to local governments to best protect their citizens.

Data Processing

Loading Data

knitr::opts_knit$set(root.dir = "/Users/liammeyers/Downloads/DAT511_FinalProject")
joined_data <- read.csv("/Users/liammeyers/Downloads/DAT511_FinalProject/StormEvents_joined_data.csv")
head(joined_data, c(1,7))
##   BEGIN_YEARMONTH BEGIN_DAY BEGIN_TIME END_YEARMONTH END_DAY END_TIME
## 1          202404        30       2033        202404      30     2033
##   EPISODE_ID.x
## 1       189851

The data is loading in properly.

Question 1:

pop_health <- data.frame(joined_data$EVENT_TYPE, joined_data$INJURIES_DIRECT, joined_data$INJURIES_INDIRECT,
                         joined_data$DEATHS_DIRECT, joined_data$DEATHS_INDIRECT)
unique(pop_health$joined_data.EVENT_TYPE)
##  [1] "Thunderstorm Wind"          "Excessive Heat"            
##  [3] "Heavy Snow"                 "Heat"                      
##  [5] "Hail"                       "High Wind"                 
##  [7] "Funnel Cloud"               "Heavy Rain"                
##  [9] "Tornado"                    "Drought"                   
## [11] "Lake-Effect Snow"           "Dust Storm"                
## [13] "Winter Weather"             "Marine Thunderstorm Wind"  
## [15] "Winter Storm"               "Flood"                     
## [17] "Flash Flood"                "Tropical Storm"            
## [19] "Waterspout"                 "Avalanche"                 
## [21] "Astronomical Low Tide"      "Strong Wind"               
## [23] "Lightning"                  "Coastal Flood"             
## [25] "Blizzard"                   "Extreme Cold/Wind Chill"   
## [27] "Wildfire"                   "Debris Flow"               
## [29] "Rip Current"                "Dense Fog"                 
## [31] "High Surf"                  "Marine High Wind"          
## [33] "Cold/Wind Chill"            "Ice Storm"                 
## [35] "Frost/Freeze"               "Sneakerwave"               
## [37] "Freezing Fog"               "Sleet"                     
## [39] "Marine Hail"                "Dust Devil"                
## [41] "Storm Surge/Tide"           "Marine Tropical Storm"     
## [43] "Hurricane (Typhoon)"        "Marine Dense Fog"          
## [45] "Marine Strong Wind"         "Marine Hurricane/Typhoon"  
## [47] "Tropical Depression"        "Seiche"                    
## [49] "Lakeshore Flood"            "Marine Tropical Depression"

The first question deals with the health of the population and what events have the largest impact on it. To do this, a new data frame with the necessary columns was created and the unique weather events are shown.

pop_health2 <- subset(pop_health,joined_data.INJURIES_DIRECT > 0 | joined_data.INJURIES_INDIRECT > 0 |
                        joined_data.DEATHS_DIRECT > 0 | joined_data.DEATHS_INDIRECT > 0)
unique(pop_health2$joined_data.EVENT_TYPE)
##  [1] "Lake-Effect Snow"        "Dust Storm"             
##  [3] "Heat"                    "Avalanche"              
##  [5] "Hail"                    "Excessive Heat"         
##  [7] "Tornado"                 "Lightning"              
##  [9] "Heavy Rain"              "Rip Current"            
## [11] "Dense Fog"               "High Surf"              
## [13] "Strong Wind"             "Cold/Wind Chill"        
## [15] "Blizzard"                "Winter Storm"           
## [17] "Winter Weather"          "Flash Flood"            
## [19] "Flood"                   "Thunderstorm Wind"      
## [21] "High Wind"               "Heavy Snow"             
## [23] "Extreme Cold/Wind Chill" "Debris Flow"            
## [25] "Wildfire"                "Freezing Fog"           
## [27] "Ice Storm"               "Coastal Flood"          
## [29] "Tropical Storm"          "Sneakerwave"            
## [31] "Dust Devil"              "Marine Strong Wind"     
## [33] "Hurricane (Typhoon)"

In order to see what storms are actually the most impactful on the public’s health, event types that have 0 fatalities or injuries associated with them were removed.

pop_health2$storm_severity <- ((pop_health2$joined_data.DEATHS_DIRECT*1) + 
                            (pop_health2$joined_data.DEATHS_INDIRECT*.7) +
                            (pop_health2$joined_data.INJURIES_DIRECT*.3) + 
                          (pop_health2$joined_data.INJURIES_INDIRECT*.1))

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
events_grouped <- group_by(pop_health2,joined_data.EVENT_TYPE)
severity_totals <- summarise(events_grouped, storm_severity_totals = sum(storm_severity))
severity_totals <- arrange(severity_totals,desc(storm_severity_totals))

severity_avg <- summarise(events_grouped, storm_severity_avg = mean(storm_severity))
severity_avg <- arrange(severity_avg,desc(storm_severity_avg))

severity_table <- severity_totals
severity_table <- left_join(severity_table,severity_avg, by = 'joined_data.EVENT_TYPE')

In order to judge the severity of storms, the metric “storm_severity” was created. This attempts to capture the level of destruction caused by each individual storm by weighing the fatalities and injuries. Using this metric, a table was created with two columns, severity total which is the sum of weather event types severity and severity average, which is the same idea, but looks at the mean of each storm.

Question 2:

states <- data.frame(joined_data$EVENT_TYPE,joined_data$STATE)

library(maps)

s <- trimws(tolower(states$joined_data.STATE))
if (all(nchar(s[!is.na(s)]) == 2)) {
  s <- tolower(state.name[match(toupper(s), state.abb)])
}

counts <- table(s, states$joined_data.EVENT_TYPE)
top_event <- data.frame(state = rownames(counts),
                        event = colnames(counts)[apply(counts, 1, which.max)],
                        stringsAsFactors = FALSE)

event_levels <- sort(unique(top_event$event))
cols <- setNames(hcl.colors(length(event_levels), "Set 3"), event_levels)

st <- map("state", plot = FALSE, fill = TRUE)
st_names  <- sub(":.*", "", st$names)
fill_cols <- cols[top_event$event[match(st_names, top_event$state)]]

# Map code adapted from Claude (Claude Sonnet 5.5, Anthropic), generated 2026-11-29 via claude.ai.

One effective way to present which weather events are most common in different states, would be a map with each state having a label of the most comment weather event. This was done by creating a data frame with events and states, formatting the data, finding the most common event in each state and then applying that to a map of the US.

Question 3:

months <- data.frame(joined_data$EVENT_TYPE,joined_data$MONTH_NAME)
winter <- subset(months,(joined_data.MONTH_NAME == "January"|joined_data.MONTH_NAME == "February"|
                         joined_data.MONTH_NAME == "December"))
winter_freq <- data.frame(head(sort(table(winter$joined_data.EVENT_TYPE),decreasing = TRUE),18))
winter_freq <- rename(winter_freq, "Event Type" = Var1)

spring <- subset(months,(joined_data.MONTH_NAME == "March"|joined_data.MONTH_NAME == "April"|
                         joined_data.MONTH_NAME == "May"))
spring_freq <- data.frame(head(sort(table(spring$joined_data.EVENT_TYPE),decreasing = TRUE),18))
spring_freq <- rename(spring_freq, "Event Type" = Var1)

summer <- subset(months,(joined_data.MONTH_NAME == "June"|joined_data.MONTH_NAME == "July"|
                         joined_data.MONTH_NAME == "August"))
summer_freq <- data.frame(head(sort(table(summer$joined_data.EVENT_TYPE),decreasing = TRUE),18))
summer_freq <- rename(summer_freq, "Event Type" = Var1)

fall <- subset(months,(joined_data.MONTH_NAME == "September"|joined_data.MONTH_NAME == "October"|
                         joined_data.MONTH_NAME == "November"))
fall_freq <- data.frame(head(sort(table(fall$joined_data.EVENT_TYPE),decreasing = TRUE),18))
fall_freq <- rename(fall_freq, "Event Type" = Var1)

When trying to see what weather events are most common in certain months, one approach would be to divide the data into seasons. To start, the “months” data frame was created, with events and the month they took place. Then for each season, a new data frame was created with just the applicable months. Then the frequency of each event with the season were counted and put into a table.

Question 4:

library(stringr)
library(readr)
crops <- data.frame(joined_data$STATE,joined_data$DAMAGE_CROPS,joined_data$EVENT_TYPE)
crops <- subset(crops, !is.na(joined_data.DAMAGE_CROPS))
crops <- mutate(crops, DCN = parse_number(joined_data.DAMAGE_CROPS))
crops <- mutate(crops, DCL = str_extract(joined_data.DAMAGE_CROPS, "[A-Za-z]+"))
crops <- mutate(crops, mult = if_else(DCL == "M",1000000,1000))
crops <- mutate(crops, Crop_Damage = DCN*mult)


states_grouped <- group_by(crops,joined_data.STATE)
state_totals <- summarise(states_grouped, state_crop_loss = sum(Crop_Damage))
Crop_Damages <- arrange(state_totals,desc(state_crop_loss))
Crop_Damages <- subset(Crop_Damages, state_crop_loss > 10000000)
options(scipen = 91)

events_grouped2 <- group_by(crops,joined_data.EVENT_TYPE)
event_totals2 <- summarise(events_grouped2, crops_totals = sum(Crop_Damage))
event_totals2 <- arrange(event_totals2,desc(crops_totals))
event_totals2 <- subset(event_totals2, crops_totals > 1)

Finally, in order to see what weather events cause the most damage to crops and where in the US that damage takes place a data frame was created with the state, damaged crops and event type columns. Then, due to formatting, the “DAMAGE_CROPS” column needed to be converted to a number. Then two tables were created, one with the sum of the crop damage broken up by state and the other broken up by event.

Results:

1. Across the United States, which types of events are most harmful with respect to population health?

head(severity_table,10)
## # A tibble: 10 × 3
##    joined_data.EVENT_TYPE storm_severity_totals storm_severity_avg
##    <chr>                                  <dbl>              <dbl>
##  1 Excessive Heat                        3582.               13.6 
##  2 Flash Flood                           1393.                5.22
##  3 Heat                                   826.                3.58
##  4 Tornado                                715.                3.74
##  5 Tropical Storm                         286.                3.37
##  6 Debris Flow                            200.                6.90
##  7 Flood                                  190.                1.58
##  8 Thunderstorm Wind                      151.                1.1 
##  9 Winter Storm                           134.                4.63
## 10 Rip Current                             92.6               1.27
#Figure 1

Figure 1 shows the table of the storm severity total and average categorized by event type. Excessive heat is clearly the most destructive type of weather event to the public’s health in terms of total and average affects. In aggregate, flash floods, heat and tornado are very destructive. While on average debris flow and winter storms tends to be very severe, despite the lower rate in which they occur.

2. Across the United States, which types of events most happen in which states?

map("state", fill = TRUE, col = fill_cols, lwd = 0.5)
title("Most Common Event Type by State")

lab <- top_event$event[match(tolower(state.name), top_event$state)]
lab <- gsub(" ", "\n", lab)
ok  <- !state.name %in% c("Alaska", "Hawaii") & !is.na(lab)
text(state.center$x[ok], state.center$y[ok], lab[ok], cex = 0.4)

# Map code adapted from Claude (Claude Sonnet 5.5, Anthropic), generated 2026-11-29 via claude.ai.

#Figure 2

Figure 2 shows the most common extreme weather event that takes place in each state in the contiguous US.
Thunderstorm winds and flash floods are the most common state leaders, accounting for almost the entire Eastern Seaboard and the Midwest. Out west, there seems to be more state specific top events, such as heavy snow in Colorado, drought in New Mexico and hail in Texas.

3. Which types of events are characterized by which months?

par(mfrow = c(2, 2))
pie(winter_freq$Freq, labels = winter_freq$`Event Type`, main = "Winter Weather Event Frequency", cex = .6,
    col = hcl.colors(length(winter_freq$`Event Type`), "Set 3"))
pie(spring_freq$Freq, labels = spring_freq$`Event Type`, main = "Spring Weather Event Frequency", cex = .6,
    col = hcl.colors(length(spring_freq$`Event Type`), "Set 3"))
pie(summer_freq$Freq, labels = summer_freq$`Event Type`, main = "Summer Weather Event Frequency", cex = .6,
    col = hcl.colors(length(summer_freq$`Event Type`), "Set 3"))
pie(fall_freq$Freq, labels = fall_freq$`Event Type`, main = "Fall Weather Event Frequency", cex = .6,
    col = hcl.colors(length(fall_freq$`Event Type`), "Set 3"))

#Figure 3

Figure 3 included 4 pie charts, each representing a different season during 2024. The most common event in each season is marked in red. There are fairly significant difference between the seasons, although flash floods and thunderstorm winds appear to be common year round. These charts should be able to help inform how to prepare resources during each quarter of the year by showing what severe weather should be expected during that time.

4. What states experienced the most crop damage as a result of extreme weather and what events cause that damage?

par(mfrow = c(1, 2))
barplot(Crop_Damages$state_crop_loss,names.arg = Crop_Damages$joined_data.STATE,
          col = "steelblue", main = "Crop Loss by State ($)",
            las = 2, cex.axis = .5, cex.names = .5)
barplot(event_totals2$crops_totals,names.arg = event_totals2$joined_data.EVENT_TYPE,
          col = "steelblue", main = "Crop Loss by Weather Event ($)",
            las = 2, cex.axis = .5, cex.names = .5)

#Figure 4

Figure 4 consists of two bar graphs that show the impact that weather event have on the crop supply around the US. The first plot shows which states are most affected by weather, while the second plot shows what types of weather is causing that destruction. Each of the top 4 states by total crop loss are located in the southeast and by far the weather event responsible for these losses are hurricanes. This makes sense of course, as hurricanes come from the southern Atlantic Ocean and are most destructive when they make landfall in the Florida/Georgia area. These plots make it clear that crop protection during hurricane season in these states should be a priority for state and national governments.