Synopsis

This analysis examines the health and economic consequences of severe weather events recorded in the U.S. National Oceanic and Atmospheric Administration Storm Database. Population-health impact is evaluated using the total numbers of fatalities and injuries associated with each event type. Economic impact is evaluated using inflation-unadjusted property and crop damage values after converting the magnitude codes into dollar amounts. The results identify the weather-event categories associated with the greatest recorded human and economic harm. These findings may help public officials understand which severe weather hazards have historically produced the largest consequences.

Data Processing

The analysis begins with the original compressed CSV file supplied for the assignment. R can read the bzip2-compressed file directly, so no external preprocessing or manual decompression is required.

library(dplyr)
library(ggplot2)
library(scales)

storm <- read.csv(
  bzfile("repdata_data_StormData.csv.bz2"),
  stringsAsFactors = FALSE
)

dim(storm)
## [1] 902297     37

Only the variables required for the health and economic analyses are retained. Event names are converted to uppercase and unnecessary spaces are removed so that capitalization differences do not create separate categories.

storm_analysis <- storm %>%
  select(
    EVTYPE,
    FATALITIES,
    INJURIES,
    PROPDMG,
    PROPDMGEXP,
    CROPDMG,
    CROPDMGEXP
  ) %>%
  mutate(
    EVTYPE = toupper(trimws(EVTYPE)),
    PROPDMGEXP = toupper(trimws(PROPDMGEXP)),
    CROPDMGEXP = toupper(trimws(CROPDMGEXP))
  )

head(storm_analysis)
##    EVTYPE FATALITIES INJURIES PROPDMG PROPDMGEXP CROPDMG CROPDMGEXP
## 1 TORNADO          0       15    25.0          K       0           
## 2 TORNADO          0        0     2.5          K       0           
## 3 TORNADO          0        2    25.0          K       0           
## 4 TORNADO          0        2     2.5          K       0           
## 5 TORNADO          0        2     2.5          K       0           
## 6 TORNADO          0        6     2.5          K       0

Converting damage values to dollars

The property- and crop-damage variables contain a numeric value and a separate magnitude code. The codes H, K, M, and B represent hundreds, thousands, millions, and billions of dollars. Numeric exponent codes are interpreted as powers of ten. Blank, unknown, and symbol codes are conservatively assigned a multiplier of one.

damage_multiplier <- function(x) {
  x <- toupper(trimws(as.character(x)))
  multiplier <- rep(1, length(x))

  multiplier[x == "H"] <- 10^2
  multiplier[x == "K"] <- 10^3
  multiplier[x == "M"] <- 10^6
  multiplier[x == "B"] <- 10^9

  numeric_code <- grepl("^[0-9]$", x)
  multiplier[numeric_code] <- 10^as.numeric(x[numeric_code])

  multiplier
}

storm_analysis <- storm_analysis %>%
  mutate(
    PROP_MULTIPLIER = damage_multiplier(PROPDMGEXP),
    CROP_MULTIPLIER = damage_multiplier(CROPDMGEXP),
    PROPERTY_DAMAGE = PROPDMG * PROP_MULTIPLIER,
    CROP_DAMAGE = CROPDMG * CROP_MULTIPLIER,
    ECONOMIC_DAMAGE = PROPERTY_DAMAGE + CROP_DAMAGE
  )

head(storm_analysis)
##    EVTYPE FATALITIES INJURIES PROPDMG PROPDMGEXP CROPDMG CROPDMGEXP
## 1 TORNADO          0       15    25.0          K       0           
## 2 TORNADO          0        0     2.5          K       0           
## 3 TORNADO          0        2    25.0          K       0           
## 4 TORNADO          0        2     2.5          K       0           
## 5 TORNADO          0        2     2.5          K       0           
## 6 TORNADO          0        6     2.5          K       0           
##   PROP_MULTIPLIER CROP_MULTIPLIER PROPERTY_DAMAGE CROP_DAMAGE ECONOMIC_DAMAGE
## 1            1000               1           25000           0           25000
## 2            1000               1            2500           0            2500
## 3            1000               1           25000           0           25000
## 4            1000               1            2500           0            2500
## 5            1000               1            2500           0            2500
## 6            1000               1            2500           0            2500

Results

Weather events most harmful to population health

Population-health impact is measured as the combined number of recorded fatalities and injuries. The totals are calculated for each event type, and the ten event types with the greatest combined impact are shown.

health_summary <- storm_analysis %>%
  group_by(EVTYPE) %>%
  summarise(
    Fatalities = sum(FATALITIES, na.rm = TRUE),
    Injuries = sum(INJURIES, na.rm = TRUE),
    Total_Health_Impact = Fatalities + Injuries,
    .groups = "drop"
  ) %>%
  arrange(desc(Total_Health_Impact))

top_health <- head(health_summary, 10)

top_health
## # A tibble: 10 × 4
##    EVTYPE            Fatalities Injuries Total_Health_Impact
##    <chr>                  <dbl>    <dbl>               <dbl>
##  1 TORNADO                 5633    91346               96979
##  2 EXCESSIVE HEAT          1903     6525                8428
##  3 TSTM WIND                504     6957                7461
##  4 FLOOD                    470     6789                7259
##  5 LIGHTNING                816     5230                6046
##  6 HEAT                     937     2100                3037
##  7 FLASH FLOOD              978     1777                2755
##  8 ICE STORM                 89     1975                2064
##  9 THUNDERSTORM WIND        133     1488                1621
## 10 WINTER STORM             206     1321                1527
ggplot(
  top_health,
  aes(
    x = reorder(EVTYPE, Total_Health_Impact),
    y = Total_Health_Impact
  )
) +
  geom_col(fill = "firebrick") +
  coord_flip() +
  scale_y_continuous(labels = comma) +
  labs(
    title = "Weather Events with the Greatest Health Impact",
    x = "Event type",
    y = "Total fatalities and injuries"
  ) +
  theme_minimal()
Figure 1. The ten weather-event types associated with the greatest combined number of fatalities and injuries.

Figure 1. The ten weather-event types associated with the greatest combined number of fatalities and injuries.

The event type associated with the greatest combined health impact is TORNADO, with 96,979 recorded fatalities and injuries. Overall, tornadoes produced the largest combined health burden in the database. Excessive heat, thunderstorm wind, floods, and lightning also produced substantial population-health consequences.

Weather events with the greatest economic consequences

Economic impact is measured as the sum of inflation-unadjusted property and crop damage. The total economic damage is calculated for every event type.

economic_summary <- storm_analysis %>%
  group_by(EVTYPE) %>%
  summarise(
    Property_Damage = sum(PROPERTY_DAMAGE, na.rm = TRUE),
    Crop_Damage = sum(CROP_DAMAGE, na.rm = TRUE),
    Total_Economic_Damage =
      Property_Damage + Crop_Damage,
    .groups = "drop"
  ) %>%
  arrange(desc(Total_Economic_Damage))

top_economic <- head(economic_summary, 10)

top_economic
## # A tibble: 10 × 4
##    EVTYPE            Property_Damage Crop_Damage Total_Economic_Damage
##    <chr>                       <dbl>       <dbl>                 <dbl>
##  1 FLOOD               144657709807   5661968450         150319678257 
##  2 HURRICANE/TYPHOON    69305840000   2607872800          71913712800 
##  3 TORNADO              56947380676.   414953270          57362333946.
##  4 STORM SURGE          43323536000         5000          43323541000 
##  5 HAIL                 15735267513.  3025954473          18761221986.
##  6 FLASH FLOOD          16822723978.  1421317100          18244041078.
##  7 DROUGHT               1046106000  13972566000          15018672000 
##  8 HURRICANE            11868319010   2741910000          14610229010 
##  9 RIVER FLOOD           5118945500   5029459000          10148404500 
## 10 ICE STORM             3944927860   5022113500           8967041360
ggplot(
  top_economic,
  aes(
    x = reorder(EVTYPE, Total_Economic_Damage),
    y = Total_Economic_Damage / 10^9
  )
) +
  geom_col(fill = "steelblue") +
  coord_flip() +
  scale_y_continuous(labels = comma) +
  labs(
    title = "Weather Events with the Greatest Economic Impact",
    x = "Event type",
    y = "Total economic damage (billions of dollars)"
  ) +
  theme_minimal()
Figure 2. The ten weather-event types associated with the greatest combined property and crop damage.

Figure 2. The ten weather-event types associated with the greatest combined property and crop damage.

The event type associated with the greatest economic impact is FLOOD, with approximately $150.32 billion in combined property and crop damage. Floods produced the greatest overall economic loss, followed by other destructive events such as hurricanes, tornadoes, and storm surges.

Conclusion

The NOAA Storm Database indicates that the event types producing the largest population-health burden are not necessarily identical to those producing the greatest economic losses. Tornadoes caused the greatest combined number of fatalities and injuries, while floods caused the greatest combined property and crop damage. These results demonstrate the importance of considering both human-health and economic outcomes when evaluating severe-weather hazards.