Synopsis

This analysis identifies tornadoes as the most harmful weather events to population health and floods as the most economically damaging. The NOAA storm database was processed in R to analyze fatalities/injuries and property/crop damage. Results are presented through two key visualizations.

Data Processing

if (!exists("storm_clean")) {
  if (!file.exists("storm_data.csv.bz2")) {
    download.file("https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2FStormData.csv.bz2", 
                  "storm_data.csv.bz2")
  }
  
  storm <- read.csv("storm_data.csv.bz2")
  
  storm_clean <- storm %>%
    mutate(
      EVTYPE = toupper(EVTYPE),
      EVTYPE = case_when(
        grepl("TORNADO|TORNDAO", EVTYPE) ~ "TORNADO",
        grepl("THUNDERSTORM|TSTM", EVTYPE) ~ "THUNDERSTORM",
        grepl("HURRICANE", EVTYPE) ~ "HURRICANE",
        grepl("HEAT|EXCESSIVE HEAT", EVTYPE) ~ "EXCESSIVE HEAT",
        grepl("FLOOD|FLASH FLOOD", EVTYPE) ~ "FLOOD",
        TRUE ~ EVTYPE
      ),
      PROPDMG = PROPDMG * case_when(
        PROPDMGEXP %in% c("K","k") ~ 1000,
        PROPDMGEXP %in% c("M","m") ~ 1e6,
        PROPDMGEXP %in% c("B","b") ~ 1e9,
        TRUE ~ 1
      ),
      CROPDMG = CROPDMG * case_when(
        CROPDMGEXP %in% c("K","k") ~ 1000,
        CROPDMGEXP %in% c("M","m") ~ 1e6,
        CROPDMGEXP %in% c("B","b") ~ 1e9,
        TRUE ~ 1
      )
    )
}

Results

1. Health Impact Analysis

health <- storm_clean %>%
  group_by(EVTYPE) %>%
  summarise(Total = sum(FATALITIES + INJURIES)) %>%
  arrange(desc(Total)) %>%
  head(5)

ggplot(health, aes(x=reorder(EVTYPE, -Total), y=Total/1000)) +
  geom_col(fill="red") +
  labs(title="Top 5 Harmful Weather Events",
       x="Event Type", y="Fatalities + Injuries (thousands)") +
  theme(axis.text.x = element_text(angle=45, hjust=1))

2. Economic Impact Analysis

economic <- storm_clean %>%
  group_by(EVTYPE) %>%
  summarise(Total = sum(PROPDMG + CROPDMG)) %>%
  arrange(desc(Total)) %>%
  head(5)

ggplot(economic, aes(x=reorder(EVTYPE, -Total), y=Total/1e9)) +
  geom_col(fill="blue") +
  labs(title="Top 5 Economically Damaging Events",
       x="Event Type", y="Total Damage (billions USD)") +
  theme(axis.text.x = element_text(angle=45, hjust=1))

Conclusion

From the analysis, tornadoes are the most harmful event type with respect to population health, causing the highest number of fatalities and injuries. On the other hand, floods and hurricanes have the greatest economic impact due to significant property and crop damage.

This analysis can support municipal decision-makers in disaster preparedness and resource allocation by highlighting the most impactful weather events.