Synopsis

This report explores the U.S. National Oceanic and Atmospheric Administration (NOAA) Storm Database to determine:

  1. Which types of events are most harmful to population health?
  2. Which types of events have the greatest economic consequences?

Using raw storm data from 1950 to 2011, we process and analyze health and economic damages caused by weather events. The resulting insights can help prioritize resources for emergency planning and mitigation.


Data Processing

# Load the raw compressed CSV data
storm_data <- read.csv("repdata-data-StormData.csv.bz2")
# Select only necessary columns
storm <- storm_data %>% 
  select(EVTYPE, FATALITIES, INJURIES, PROPDMG, PROPDMGEXP, CROPDMG, CROPDMGEXP)
# Convert exponents to numeric multipliers
exp_convert <- function(x) {
  x <- toupper(as.character(x))
  ifelse(x %in% c("", "+", "-", "?"), 0,
  ifelse(x == "H", 1e2,
  ifelse(x == "K", 1e3,
  ifelse(x == "M", 1e6,
  ifelse(x == "B", 1e9, as.numeric(x)))))
  )
}

storm <- storm %>%
  mutate(PROPDMGEXP = exp_convert(PROPDMGEXP),
         CROPDMGEXP = exp_convert(CROPDMGEXP),
         PROPDMGVAL = PROPDMG * PROPDMGEXP,
         CROPDMGVAL = CROPDMG * CROPDMGEXP)

Results

1. Events Most Harmful to Population Health

health_impact <- storm %>% 
  group_by(EVTYPE) %>% 
  summarise(Fatalities = sum(FATALITIES), Injuries = sum(INJURIES)) %>% 
  mutate(Total = Fatalities + Injuries) %>% 
  arrange(desc(Total)) %>% 
  top_n(10, Total)

# Plot
ggplot(health_impact, aes(x = reorder(EVTYPE, Total), y = Total)) +
  geom_col(fill = "firebrick") +
  coord_flip() +
  labs(title = "Top 10 Weather Events Impacting Population Health",
       x = "Event Type", y = "Total Fatalities and Injuries")

2. Events with Greatest Economic Consequences

economic_impact <- storm %>% 
  group_by(EVTYPE) %>% 
  summarise(Property = sum(PROPDMGVAL), Crop = sum(CROPDMGVAL)) %>% 
  mutate(Total = Property + Crop) %>% 
  arrange(desc(Total)) %>% 
  top_n(10, Total)

# Plot
ggplot(economic_impact, aes(x = reorder(EVTYPE, Total), y = Total / 1e9)) +
  geom_col(fill = "darkgreen") +
  coord_flip() +
  labs(title = "Top 10 Weather Events Causing Economic Damage",
       x = "Event Type", y = "Total Damage (Billion USD)")


Conclusion

The analysis reveals that: - Tornadoes are by far the most harmful to population health. - Floods and hurricanes cause the most economic damage.

These insights underscore the need for disaster preparedness and mitigation plans targeted at these high-impact event types.


Session Info

sessionInfo()
## R version 4.4.0 (2024-04-24)
## Platform: aarch64-apple-darwin20
## Running under: macOS 15.1
## 
## Matrix products: default
## BLAS:   /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRblas.0.dylib 
## LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.0
## 
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
## 
## time zone: America/Guyana
## tzcode source: internal
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] stringr_1.5.1   lubridate_1.9.3 readr_2.1.5     ggplot2_3.5.1  
## [5] dplyr_1.1.4    
## 
## loaded via a namespace (and not attached):
##  [1] gtable_0.3.5      jsonlite_1.8.8    highr_0.10        compiler_4.4.0   
##  [5] tidyselect_1.2.1  jquerylib_0.1.4   scales_1.3.0      yaml_2.3.8       
##  [9] fastmap_1.2.0     R6_2.5.1          labeling_0.4.3    generics_0.1.3   
## [13] knitr_1.46        tibble_3.2.1      munsell_0.5.1     bslib_0.7.0      
## [17] pillar_1.9.0      tzdb_0.4.0        rlang_1.1.3       utf8_1.2.4       
## [21] stringi_1.8.4     cachem_1.1.0      xfun_0.44         sass_0.4.9       
## [25] timechange_0.3.0  cli_3.6.2         withr_3.0.0       magrittr_2.0.3   
## [29] digest_0.6.35     grid_4.4.0        rstudioapi_0.16.0 hms_1.1.3        
## [33] lifecycle_1.0.4   vctrs_0.6.5       evaluate_0.23     glue_1.7.0       
## [37] farver_2.1.2      fansi_1.0.6       colorspace_2.1-0  rmarkdown_2.27   
## [41] tools_4.4.0       pkgconfig_2.0.3   htmltools_0.5.8.1