Synopsis

This report analyzes the U.S. National Oceanic and Atmospheric Administration (NOAA) Storm Database to identify which types of severe weather events have the most significant impact on population health and the economy across the United States. Using data on fatalities, injuries, and property damage from various storm events, we identify the event types that are most harmful to human health and those that have the greatest economic consequences. The findings are presented with summaries and visualizations to aid government and municipal managers in resource allocation for disaster preparedness and response.

Data Processing

# Load necessary libraries
library(dplyr)
library(ggplot2)
library(knitr)

# Download and read the data
url <- "https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2FStormData.csv.bz2"
download.file(url, destfile = "StormData.csv.bz2")
data <- read.csv(bzfile("StormData.csv.bz2"))

# Examine the structure of the data
str(data)
## 'data.frame':    902297 obs. of  37 variables:
##  $ STATE__   : num  1 1 1 1 1 1 1 1 1 1 ...
##  $ BGN_DATE  : chr  "4/18/1950 0:00:00" "4/18/1950 0:00:00" "2/20/1951 0:00:00" "6/8/1951 0:00:00" ...
##  $ BGN_TIME  : chr  "0130" "0145" "1600" "0900" ...
##  $ TIME_ZONE : chr  "CST" "CST" "CST" "CST" ...
##  $ COUNTY    : num  97 3 57 89 43 77 9 123 125 57 ...
##  $ COUNTYNAME: chr  "MOBILE" "BALDWIN" "FAYETTE" "MADISON" ...
##  $ STATE     : chr  "AL" "AL" "AL" "AL" ...
##  $ EVTYPE    : chr  "TORNADO" "TORNADO" "TORNADO" "TORNADO" ...
##  $ BGN_RANGE : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ BGN_AZI   : chr  "" "" "" "" ...
##  $ BGN_LOCATI: chr  "" "" "" "" ...
##  $ END_DATE  : chr  "" "" "" "" ...
##  $ END_TIME  : chr  "" "" "" "" ...
##  $ COUNTY_END: num  0 0 0 0 0 0 0 0 0 0 ...
##  $ COUNTYENDN: logi  NA NA NA NA NA NA ...
##  $ END_RANGE : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ END_AZI   : chr  "" "" "" "" ...
##  $ END_LOCATI: chr  "" "" "" "" ...
##  $ LENGTH    : num  14 2 0.1 0 0 1.5 1.5 0 3.3 2.3 ...
##  $ WIDTH     : num  100 150 123 100 150 177 33 33 100 100 ...
##  $ F         : int  3 2 2 2 2 2 2 1 3 3 ...
##  $ MAG       : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ FATALITIES: num  0 0 0 0 0 0 0 0 1 0 ...
##  $ INJURIES  : num  15 0 2 2 2 6 1 0 14 0 ...
##  $ PROPDMG   : num  25 2.5 25 2.5 2.5 2.5 2.5 2.5 25 25 ...
##  $ PROPDMGEXP: chr  "K" "K" "K" "K" ...
##  $ CROPDMG   : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ CROPDMGEXP: chr  "" "" "" "" ...
##  $ WFO       : chr  "" "" "" "" ...
##  $ STATEOFFIC: chr  "" "" "" "" ...
##  $ ZONENAMES : chr  "" "" "" "" ...
##  $ LATITUDE  : num  3040 3042 3340 3458 3412 ...
##  $ LONGITUDE : num  8812 8755 8742 8626 8642 ...
##  $ LATITUDE_E: num  3051 0 0 0 0 ...
##  $ LONGITUDE_: num  8806 0 0 0 0 ...
##  $ REMARKS   : chr  "" "" "" "" ...
##  $ REFNUM    : num  1 2 3 4 5 6 7 8 9 10 ...
# Select relevant columns for the analysis
data <- data %>%
  select(EVTYPE, FATALITIES, INJURIES, PROPDMG, PROPDMGEXP, CROPDMG, CROPDMGEXP)

# Convert PROPDMGEXP and CROPDMGEXP to appropriate multipliers
data$PROPDMGEXP <- as.character(data$PROPDMGEXP)
data$CROPDMGEXP <- as.character(data$CROPDMGEXP)

# Define a function to convert exponents to numerical multipliers
convert_exp <- function(exp) {
  if (exp %in% c("K", "k")) return(1e3)
  if (exp %in% c("M", "m")) return(1e6)
  if (exp %in% c("B", "b")) return(1e9)
  if (exp %in% c("", "0")) return(1)
  return(NA)
}

# Apply the function to the property and crop damage exponents
data$PROPDMGEXP <- sapply(data$PROPDMGEXP, convert_exp)
data$CROPDMGEXP <- sapply(data$CROPDMGEXP, convert_exp)

# Calculate the total damage
data <- data %>%
  mutate(PROPDMG = PROPDMG * PROPDMGEXP,
         CROPDMG = CROPDMG * CROPDMGEXP,
         TOTALDMG = PROPDMG + CROPDMG)

# Summarize the data by event type
summary_data <- data %>%
  group_by(EVTYPE) %>%
  summarize(TotalFatalities = sum(FATALITIES, na.rm = TRUE),
            TotalInjuries = sum(INJURIES, na.rm = TRUE),
            TotalDamage = sum(TOTALDMG, na.rm = TRUE)) %>%
  arrange(desc(TotalFatalities))

# Display the top event types by fatalities, injuries, and economic damage
top_fatalities <- summary_data %>% arrange(desc(TotalFatalities)) %>% head(10)
top_injuries <- summary_data %>% arrange(desc(TotalInjuries)) %>% head(10)
top_damage <- summary_data %>% arrange(desc(TotalDamage)) %>% head(10)

kable(top_fatalities, caption = "Top 10 Event Types by Fatalities")
Top 10 Event Types by Fatalities
EVTYPE TotalFatalities TotalInjuries TotalDamage
TORNADO 5633 91346 57352113887
EXCESSIVE HEAT 1903 6525 500155700
FLASH FLOOD 978 1777 17561699079
HEAT 937 2100 403258500
LIGHTNING 816 5230 940751520
TSTM WIND 504 6957 5038935845
FLOOD 470 6789 150319678257
RIP CURRENT 368 232 1000
HIGH WIND 248 1137 5908617560
AVALANCHE 224 170 3721800
kable(top_injuries, caption = "Top 10 Event Types by Injuries")
Top 10 Event Types by Injuries
EVTYPE TotalFatalities TotalInjuries TotalDamage
TORNADO 5633 91346 57352113887
TSTM WIND 504 6957 5038935845
FLOOD 470 6789 150319678257
EXCESSIVE HEAT 1903 6525 500155700
LIGHTNING 816 5230 940751520
HEAT 937 2100 403258500
ICE STORM 89 1975 8967041360
FLASH FLOOD 978 1777 17561699079
THUNDERSTORM WIND 133 1488 3897964322
HAIL 15 1361 18733221486
kable(top_damage, caption = "Top 10 Event Types by Economic Damage")
Top 10 Event Types by Economic Damage
EVTYPE TotalFatalities TotalInjuries TotalDamage
FLOOD 470 6789 150319678257
HURRICANE/TYPHOON 64 1275 71913712800
TORNADO 5633 91346 57352113887
STORM SURGE 13 38 43323541000
HAIL 15 1361 18733221486
FLASH FLOOD 978 1777 17561699079
DROUGHT 0 4 15018672000
HURRICANE 61 46 14610229010
RIVER FLOOD 2 2 10148404500
ICE STORM 89 1975 8967041360

Results

Event Types Most Harmful to Population Health

The following table lists the top 10 event types with the highest number of fatalities:

kable(top_fatalities, caption = "Top 10 Event Types by Fatalities")
Top 10 Event Types by Fatalities
EVTYPE TotalFatalities TotalInjuries TotalDamage
TORNADO 5633 91346 57352113887
EXCESSIVE HEAT 1903 6525 500155700
FLASH FLOOD 978 1777 17561699079
HEAT 937 2100 403258500
LIGHTNING 816 5230 940751520
TSTM WIND 504 6957 5038935845
FLOOD 470 6789 150319678257
RIP CURRENT 368 232 1000
HIGH WIND 248 1137 5908617560
AVALANCHE 224 170 3721800

The following table lists the top 10 event types with the highest number of injuries:

kable(top_injuries, caption = "Top 10 Event Types by Injuries")
Top 10 Event Types by Injuries
EVTYPE TotalFatalities TotalInjuries TotalDamage
TORNADO 5633 91346 57352113887
TSTM WIND 504 6957 5038935845
FLOOD 470 6789 150319678257
EXCESSIVE HEAT 1903 6525 500155700
LIGHTNING 816 5230 940751520
HEAT 937 2100 403258500
ICE STORM 89 1975 8967041360
FLASH FLOOD 978 1777 17561699079
THUNDERSTORM WIND 133 1488 3897964322
HAIL 15 1361 18733221486

Event Types with Greatest Economic Consequences

The following table lists the top 10 event types with the highest economic damage:

kable(top_damage, caption = "Top 10 Event Types by Economic Damage")
Top 10 Event Types by Economic Damage
EVTYPE TotalFatalities TotalInjuries TotalDamage
FLOOD 470 6789 150319678257
HURRICANE/TYPHOON 64 1275 71913712800
TORNADO 5633 91346 57352113887
STORM SURGE 13 38 43323541000
HAIL 15 1361 18733221486
FLASH FLOOD 978 1777 17561699079
DROUGHT 0 4 15018672000
HURRICANE 61 46 14610229010
RIVER FLOOD 2 2 10148404500
ICE STORM 89 1975 8967041360

Visualizations

  1. Fatalities and Injuries by Event Type
 plot1 <-ggplot(top_fatalities, aes(x = reorder(EVTYPE, -TotalFatalities), y = TotalFatalities)) +
  geom_bar(stat = "identity") +
  coord_flip() +
  labs(title = "Top 10 Event Types by Fatalities",
       x = "Event Type", y = "Total Fatalities")
print(plot1)

plot2<-ggplot(top_injuries, aes(x = reorder(EVTYPE, -TotalInjuries), y = TotalInjuries)) +
  geom_bar(stat = "identity") +
  coord_flip() +
  labs(title = "Top 10 Event Types by Injuries",
       x = "Event Type", y = "Total Injuries")
print(plot2)

  1. Economic Damage by Event Type
ggplot(top_damage, aes(x = reorder(EVTYPE, -TotalDamage), y = TotalDamage)) +
  geom_bar(stat = "identity") +
  coord_flip() +
  labs(title = "Top 10 Event Types by Economic Damage",
       x = "Event Type", y = "Total Damage")

Conclusion

This analysis of the NOAA Storm Database highlights that tornadoes are the most harmful event type concerning both fatalities and injuries, while floods cause the greatest economic damage. These insights can help prioritize resources for disaster preparedness and response.