Synopsis

This report explores the U.S. National Oceanic and Atmospheric Administration (NOAA) Storm Database (1950-2011) to identify which types of severe weather events are most harmful to population health and which have the greatest economic consequences. The analysis starts from the raw compressed CSV file, which records events from 1950 to November 2011. Event type labels (EVTYPE) were standardized by converting them to upper case, trimming spaces and grouping the most frequent spelling variants into the official event categories. Population health impact was measured as the total number of fatalities and injuries per event type. Economic impact was measured as the sum of property and crop damage, after converting the damage exponent codes (K, M, B, etc.) into dollar multipliers. One documented data entry error (a 2006 Napa Valley flood recorded in billions instead of millions) was corrected. Tornadoes are the first causes of both fatalities and injuries, followed by heat-related events, thunderstorm winds and floods. Floods, hurricanes/typhoons, tornadoes and storm surges cause the largest total economic losses, while drought dominates crop damage. These rankings can help managers to prioritize resource use, keeping in mind that early years of the database are less complete.

Data Processing

Loading the raw data

The raw data file is downloaded from the course website and read directly from the bzip2-compressed CSV file. The chunk is cached because the file is large.

library(dplyr)
library(tidyr)
library(ggplot2)
library(knitr)
storm_raw <- read.csv("data/raw/repdata_data_StormData.csv.bz2", stringsAsFactors = FALSE)
dim(storm_raw)
## [1] 902297     37

Selecting relevant variables

Only the variables needed to answer the two questions are kept: the event type, health outcomes (fatalities, injuries), economic outcomes (property and crop damage with their exponent codes) and the record identifier (REFNUM), used to correct a known data entry error.

storm <- storm_raw %>%
  select(REFNUM, BGN_DATE, EVTYPE, FATALITIES, INJURIES,
         PROPDMG, PROPDMGEXP, CROPDMG, CROPDMGEXP)

str(storm)
## 'data.frame':    902297 obs. of  9 variables:
##  $ REFNUM    : num  1 2 3 4 5 6 7 8 9 10 ...
##  $ 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" ...
##  $ EVTYPE    : chr  "TORNADO" "TORNADO" "TORNADO" "TORNADO" ...
##  $ 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  "" "" "" "" ...

To reduce processing time, only events that caused at least one fatality, one injury or some damage are retained, since events with no impact do not contribute to either question.

storm <- storm %>%
  filter(FATALITIES > 0 | INJURIES > 0 | PROPDMG > 0 | CROPDMG > 0)

nrow(storm)
## [1] 254633

Cleaning event types

The EVTYPE variable contains many inconsistent labels for the same phenomenon (e.g., “TSTM WIND”, “THUNDERSTORM WINDS”, “Thunderstorm Wind”). The number of distinct labels before cleaning is:

length(unique(storm$EVTYPE))
## [1] 488

Labels are first converted to upper case and stripped of extra spaces. Then, the most common variants are grouped into the official categories listed in Table 1 of the NWS Storm Data Documentation (NWSI 10-1605). The rules are applied in order, so more specific patterns (e.g., marine events, flash floods) are matched before more general ones. Labels that do not match any rule are kept as they are.

storm <- storm %>%
  mutate(
    EVTYPE = toupper(trimws(gsub("\\s+", " ", EVTYPE))),
    EVENT = case_when(
      grepl("MARINE", EVTYPE)                          ~ EVTYPE,
      grepl("TORNADO|FUNNEL|TORNDAO", EVTYPE)          ~ "TORNADO",
      grepl("THUNDERSTORM|TSTM|THUNDERSTROM", EVTYPE)  ~ "THUNDERSTORM WIND",
      grepl("HURRICANE|TYPHOON", EVTYPE)               ~ "HURRICANE/TYPHOON",
      grepl("STORM SURGE|STORM TIDE", EVTYPE)          ~ "STORM SURGE/TIDE",
      grepl("TROPICAL STORM", EVTYPE)                  ~ "TROPICAL STORM",
      grepl("FLASH", EVTYPE)                           ~ "FLASH FLOOD",
      grepl("COASTAL FLOOD|CSTL FLOOD", EVTYPE)        ~ "COASTAL FLOOD",
      grepl("FLOOD|FLD", EVTYPE)                       ~ "FLOOD",
      grepl("EXCESSIVE HEAT|EXTREME HEAT|RECORD HEAT|HEAT WAVE",
            EVTYPE)                                    ~ "EXCESSIVE HEAT",
      grepl("HEAT", EVTYPE)                            ~ "HEAT",
      grepl("EXTREME COLD|EXTREME WIND ?CHILL|HYPOTHERMIA",
            EVTYPE)                                    ~ "EXTREME COLD/WIND CHILL",
      grepl("COLD|WIND ?CHILL", EVTYPE)                ~ "COLD/WIND CHILL",
      grepl("RIP CURRENT", EVTYPE)                     ~ "RIP CURRENT",
      grepl("HIGH SURF|HEAVY SURF|ROUGH SURF", EVTYPE) ~ "HIGH SURF",
      grepl("WILD|FOREST FIRE|GRASS FIRE", EVTYPE)     ~ "WILDFIRE",
      grepl("HAIL", EVTYPE)                            ~ "HAIL",
      grepl("ICE STORM", EVTYPE)                       ~ "ICE STORM",
      grepl("BLIZZARD", EVTYPE)                        ~ "BLIZZARD",
      grepl("WINTER STORM", EVTYPE)                    ~ "WINTER STORM",
      grepl("WINTER WEATHER|WINTRY MIX", EVTYPE)       ~ "WINTER WEATHER",
      grepl("HEAVY SNOW", EVTYPE)                      ~ "HEAVY SNOW",
      grepl("HIGH WIND", EVTYPE)                       ~ "HIGH WIND",
      grepl("STRONG WIND", EVTYPE)                     ~ "STRONG WIND",
      grepl("LIGHTNING", EVTYPE)                       ~ "LIGHTNING",
      grepl("HEAVY RAIN", EVTYPE)                      ~ "HEAVY RAIN",
      grepl("DROUGHT", EVTYPE)                         ~ "DROUGHT",
      grepl("FOG", EVTYPE)                             ~ "DENSE FOG",
      grepl("AVALANCHE|AVALANCE", EVTYPE)              ~ "AVALANCHE",
      grepl("LANDSLIDE|MUDSLIDE|MUD SLIDE", EVTYPE)    ~ "DEBRIS FLOW",
      grepl("FROST|FREEZE", EVTYPE)                    ~ "FROST/FREEZE",
      TRUE                                             ~ EVTYPE
    )
  )

length(unique(storm$EVENT))
## [1] 169

This grouping does not resolve every label, but it covers the variants that account for most fatalities, injuries and damage, which is sufficient to rank the most harmful event types.

Converting damage values to dollars

Property (PROPDMG) and crop (CROPDMG) damage are stored as a number plus a separate exponent code (PROPDMGEXP, CROPDMGEXP). The codes found in the data are:

table(storm$PROPDMGEXP)
## 
##             -      +      0      2      3      4      5      6      7      B 
##  11585      1      5    210      1      1      4     18      3      3     40 
##      h      H      K      m      M 
##      1      6 231428      7  11320
table(storm$CROPDMGEXP)
## 
##             ?      0      B      k      K      m      M 
## 152664      6     17      7     21  99932      1   1985

According to the Storm Data Documentation (Section 2.7), damage should be expressed with “K” for thousands, “M” for millions and “B” for billions. Other codes appear in the data and are converted as follows: “H” = hundreds; numeric codes (0-8) = multiplier of 10; “+” = multiplier of 1; “-”, “?” and blank = 0 (no reliable value). Upper- and lower-case letters are treated the same.

exp_to_multiplier <- function(e) {
  e <- toupper(trimws(e))
  case_when(
    e == "H"                    ~ 1e2,
    e == "K"                    ~ 1e3,
    e == "M"                    ~ 1e6,
    e == "B"                    ~ 1e9,
    e %in% as.character(0:8)    ~ 10,
    e == "+"                    ~ 1,
    TRUE                        ~ 0
  )
}

Correction of a known data entry error. The largest property damage value in the database is a flood in Napa, California (January 2006, REFNUM 605943) recorded as 115 billion dollars. The event narrative and other sources report damages of about 115 million dollars, so the exponent is corrected from “B” to “M”. Without this correction, this single record would dominate the economic ranking.

storm %>% filter(REFNUM == 605943) %>%
  select(REFNUM, BGN_DATE, EVTYPE, PROPDMG, PROPDMGEXP)
##   REFNUM         BGN_DATE EVTYPE PROPDMG PROPDMGEXP
## 1 605943 1/1/2006 0:00:00  FLOOD     115          B
storm$PROPDMGEXP[storm$REFNUM == 605943] <- "M"
storm <- storm %>%
  mutate(
    PROP_USD  = PROPDMG * exp_to_multiplier(PROPDMGEXP),
    CROP_USD  = CROPDMG * exp_to_multiplier(CROPDMGEXP),
    TOTAL_USD = PROP_USD + CROP_USD
  )

Aggregating by event type

health <- storm %>%
  group_by(EVENT) %>%
  summarise(FATALITIES = sum(FATALITIES),
            INJURIES   = sum(INJURIES),
            .groups = "drop") %>%
  mutate(TOTAL_HARMED = FATALITIES + INJURIES) %>%
  arrange(desc(TOTAL_HARMED))

economic <- storm %>%
  group_by(EVENT) %>%
  summarise(PROPERTY = sum(PROP_USD),
            CROP     = sum(CROP_USD),
            .groups = "drop") %>%
  mutate(TOTAL = PROPERTY + CROP) %>%
  arrange(desc(TOTAL))

Results

1. Event types most harmful to population health

The table below lists the 10 event types with the highest total number of people harmed (fatalities + injuries) across the United States.

top_health <- head(health, 10)
kable(top_health,
      col.names = c("Event type", "Fatalities", "Injuries", "Total harmed"),
      format.args = list(big.mark = ","))
Event type Fatalities Injuries Total harmed
TORNADO 5,661 91,410 97,071
THUNDERSTORM WIND 710 9,510 10,220
EXCESSIVE HEAT 2,201 7,124 9,325
FLOOD 512 6,874 7,386
LIGHTNING 817 5,231 6,048
HEAT 937 2,100 3,037
FLASH FLOOD 1,035 1,802 2,837
ICE STORM 89 1,990 2,079
HIGH WIND 293 1,502 1,795
WILDFIRE 90 1,606 1,696
health_long <- top_health %>%
  select(EVENT, FATALITIES, INJURIES) %>%
  pivot_longer(c(FATALITIES, INJURIES),
               names_to = "Outcome", values_to = "Count") %>%
  mutate(EVENT   = factor(EVENT, levels = rev(top_health$EVENT)),
         Outcome = recode(Outcome, FATALITIES = "Fatalities",
                                   INJURIES   = "Injuries"))

ggplot(health_long, aes(x = EVENT, y = Count, fill = Outcome)) +
  geom_col(show.legend = FALSE) +
  coord_flip() +
  facet_wrap(~ Outcome, scales = "free_x") +
  scale_y_continuous(labels = scales::comma) +
  scale_fill_manual(values = c("Fatalities" = "firebrick",
                               "Injuries"   = "darkorange")) +
  labs(x = NULL, y = "Number of people",
       title = "Most harmful event types for population health") +
  theme_minimal()
Figure 1. Total fatalities (left) and injuries (right) for the 10 event types causing the most harm to population health in the United States, 1950-2011. Event types are ordered by total number of people harmed.

Figure 1. Total fatalities (left) and injuries (right) for the 10 event types causing the most harm to population health in the United States, 1950-2011. Event types are ordered by total number of people harmed.

Tornadoes are the most harmful event type for population health, with 5,661 fatalities and 91,410 injuries over the period. Heat-related events (excessive heat and heat) rank high for fatalities, whereas thunderstorm winds, floods and lightning contribute mainly through injuries.

2. Event types with the greatest economic consequences

The table below lists the 10 event types with the highest total economic damage (property + crop), in billions of US dollars (not adjusted for inflation).

top_economic <- head(economic, 10)
top_economic %>%
  mutate(across(c(PROPERTY, CROP, TOTAL), ~ round(.x / 1e9, 2))) %>%
  kable(col.names = c("Event type", "Property (B$)",
                      "Crop (B$)", "Total (B$)"))
Event type Property (B\()| Crop (B\)) Total (B$)
HURRICANE/TYPHOON 85.36 5.52 90.87
TORNADO 58.59 0.42 59.01
STORM SURGE/TIDE 47.96 0.00 47.97
FLOOD 35.35 10.86 46.20
HAIL 15.97 3.05 19.02
FLASH FLOOD 16.91 1.53 18.44
DROUGHT 1.05 13.97 15.02
THUNDERSTORM WIND 10.97 1.27 12.24
ICE STORM 3.95 5.02 8.97
WILDFIRE 8.50 0.40 8.90
economic_long <- top_economic %>%
  select(EVENT, PROPERTY, CROP) %>%
  pivot_longer(c(PROPERTY, CROP),
               names_to = "Damage", values_to = "USD") %>%
  mutate(EVENT  = factor(EVENT, levels = rev(top_economic$EVENT)),
         Damage = recode(Damage, PROPERTY = "Property", CROP = "Crop"))

ggplot(economic_long, aes(x = EVENT, y = USD / 1e9, fill = Damage)) +
  geom_col() +
  coord_flip() +
  scale_fill_manual(values = c("Property" = "steelblue",
                               "Crop"     = "darkolivegreen3")) +
  labs(x = NULL, y = "Damage (billions of US dollars)",
       fill = "Damage type",
       title = "Event types with the greatest economic consequences") +
  theme_minimal()
Figure 2. Total economic damage (property and crop, in billions of US dollars, not adjusted for inflation) for the 10 event types with the greatest economic consequences in the United States, 1950-2011. Bars are split by damage type.

Figure 2. Total economic damage (property and crop, in billions of US dollars, not adjusted for inflation) for the 10 event types with the greatest economic consequences in the United States, 1950-2011. Bars are split by damage type.

The event type with the greatest total economic damage is HURRICANE/TYPHOON, with about 90.9 billion dollars. Property damage accounts for most of the losses for nearly all event types. Drought is the main exception, as its losses are almost entirely due to crop damage.

Limitations

  • Records before the mid-1990s mainly cover tornadoes, thunderstorm winds and hail, which may favour these event types in cumulative totals.
  • Damage values are not adjusted for inflation.
  • The grouping of event types is approximate. Some rare or ambiguous labels were left unchanged.

Session information

sessionInfo()
## R version 4.5.1 (2025-06-13 ucrt)
## Platform: x86_64-w64-mingw32/x64
## Running under: Windows 11 x64 (build 26200)
## 
## Matrix products: default
##   LAPACK version 3.12.1
## 
## locale:
## [1] LC_COLLATE=French_France.utf8  LC_CTYPE=French_France.utf8   
## [3] LC_MONETARY=French_France.utf8 LC_NUMERIC=C                  
## [5] LC_TIME=French_France.utf8    
## 
## time zone: America/Toronto
## tzcode source: internal
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] knitr_1.52    ggplot2_4.0.4 tidyr_1.3.2   dplyr_1.2.1  
## 
## loaded via a namespace (and not attached):
##  [1] gtable_0.3.6       jsonlite_2.0.0     compiler_4.5.1     tidyselect_1.2.1  
##  [5] jquerylib_0.1.4    scales_1.4.0       yaml_2.3.12        fastmap_1.2.0     
##  [9] R6_2.6.1           labeling_0.4.3     generics_0.1.4     tibble_3.3.1      
## [13] bslib_0.12.0       pillar_1.11.1      RColorBrewer_1.1-3 rlang_1.3.0       
## [17] cachem_1.1.0       xfun_0.62          sass_0.5.0         S7_1.0.0          
## [21] otel_0.3.0         cli_3.6.6          withr_3.0.3        magrittr_2.0.5    
## [25] digest_0.6.39      grid_4.5.1         rstudioapi_0.19.0  lifecycle_1.0.5   
## [29] vctrs_0.7.3        evaluate_1.0.5     glue_1.8.1         farver_2.1.2      
## [33] rmarkdown_2.32     purrr_1.2.2        tools_4.5.1        pkgconfig_2.0.3   
## [37] htmltools_0.5.9