Synopsis

This analysis investigates the effects of severe weather events across the United States using the NOAA Storm Database, focusing on two major areas: population health and economic consequences. Population health impacts are assessed using the total number of fatalities and injuries associated with each event type, while economic consequences are evaluated by calculating the property and crop damage in US dollars. Data preprocessing includes cleaning event names, handling missing values, and converting damage exponent codes into numerical multipliers. The results identify the weather events responsible for the greatest health and economic impacts. These findings provide an overview of the relative consequences of different severe weather events across the United States.

Data Preprocessing

1. Loading the data

The analysis uses the NOAA Storm Database, which contains information about severe weather events recorded across the United States.

The original compressed CSV file is loaded directly into R. Only the variables required to address the research questions are retained for further analysis.

Storm <- read.csv("repdata_data_StormData.csv")

Select the relevant variables:

storm_filter <- Storm[, c("EVTYPE", "FATALITIES",
                          "INJURIES", "PROPDMG",
                          "PROPDMGEXP", "CROPDMG",
                          "CROPDMGEXP")]

Examine the structure of the selected dataset:

str(storm_filter)
## 'data.frame':    902297 obs. of  7 variables:
##  $ 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  "" "" "" "" ...

The event type variable (EVTYPE) contains inconsistencies in capitalisation, spacing, abbreviations, and spelling. These inconsistencies may cause the same general weather event to be classified under different names. Therefore, the event names are standardised before aggregation.

storm_filter$EVTYPE <- toupper(trimws(storm_filter$EVTYPE))

storm_filter$EVTYPE<- gsub(
  "[[:punct:]]", " ",
  storm_filter$EVTYPE
)

storm_filter$EVTYPE <- gsub(
  "\\s+", " ",
  storm_filter$EVTYPE
)

storm_filter$EVTYPE <- trimws(
  storm_filter$EVTYPE
)

storm_filter$EVTYPE<- gsub(
  "\\bTSTM\\b",
  "THUNDERSTORM",
  storm_filter$EVTYPE
)

storm_filter$EVTYPE <- gsub(
  "\\bTHUNDERSTORMS\\b",
  "THUNDERSTORM",
  storm_filter$EVTYPE
)

# Thunderstorm wind variations
storm_filter$EVTYPE[
  grepl("^THUNDERSTORM WINDS?$",
        storm_filter$EVTYPE)
] <- "THUNDERSTORM WIND"

# Flash flood variations
storm_filter$EVTYPE[
  grepl("^FLASH FLOODING$",
        storm_filter$EVTYPE)
] <- "FLASH FLOOD"

# Tornado variations
storm_filter$EVTYPE[
  grepl("^TORNADOES$",
        storm_filter$EVTYPE)
] <- "TORNADO"

# Wildfire variations
storm_filter$EVTYPE[
  grepl("^WILD ?FOREST FIRE$",
        storm_filter$EVTYPE)
] <- "WILDFIRE"

2. Analysis of population health impacts

Population health impacts are assessed using two variables: fatalities and injuries.

Missing values are excluded from the summation using na.rm = TRUE. The total fatalities and injuries are calculated separately for each weather event type.

Calculate total fatalities by event type:

fatalities <- aggregate(
  FATALITIES ~ EVTYPE,
  data = storm_filter,
  FUN = sum,
  na.rm = TRUE
)

Calculate total injuries by event type:

injuries <- aggregate(
  INJURIES ~ EVTYPE,
  data = storm_filter,
  FUN = sum,
  na.rm = TRUE
)

Sort the results in descending order:

fatalities <- fatalities[
  order(-fatalities$FATALITIES), ]


injuries <- injuries[
  order(-injuries$INJURIES), ]

Select the top 10 event types:

top_fatalities <- head(fatalities, 10)
top_injuries <- head(injuries, 10)

Display the results:

top_fatalities
##                EVTYPE FATALITIES
## 716           TORNADO       5633
## 107    EXCESSIVE HEAT       1903
## 129       FLASH FLOOD        997
## 224              HEAT        937
## 388         LIGHTNING        817
## 643 THUNDERSTORM WIND        701
## 141             FLOOD        470
## 490       RIP CURRENT        368
## 294         HIGH WIND        248
## 11          AVALANCHE        224
top_injuries
##                EVTYPE INJURIES
## 716           TORNADO    91346
## 643 THUNDERSTORM WIND     9364
## 141             FLOOD     6789
## 107    EXCESSIVE HEAT     6525
## 388         LIGHTNING     5230
## 224              HEAT     2100
## 360         ICE STORM     1975
## 129       FLASH FLOOD     1785
## 800          WILDFIRE     1456
## 195              HAIL     1361

3. Economic damage calculation

Economic consequences are assessed using property damage (PROPDMG) and crop damage (CROPDMG).

The damage variables contain numerical values that must be multiplied by their corresponding exponent codes to obtain the actual monetary amounts.

The exponent codes are interpreted as follows:

  • H represents hundreds of dollars.
  • K represents thousands of dollars.
  • M represents millions of dollars.
  • B represents billions of dollars.
  • Numeric codes from 0 to 8 represent powers of ten. -Blank codes are assigned a multiplier of 1.

Unrecognised codes are treated as missing values rather than being assigned an unsupported multiplier.

get_multiplier <- function(x) {
  x <- toupper(trimws(as.character(x)))
  
  result <- rep(NA_real_, length(x))
  
  result[x == ""] <- 1
  result[x == "0"] <- 1
  result[x == "1"] <- 10
  result[x == "2"] <- 100
  result[x == "3"] <- 1000
  result[x == "4"] <- 10000
  result[x == "5"] <- 100000
  result[x == "6"] <- 1000000
  result[x == "7"] <- 10000000
  result[x == "8"] <- 100000000
  result[x %in% c("H")] <- 100
  result[x %in% c("K")] <- 1000
  result[x %in% c("M")] <- 1000000
  result[x %in% c("B")] <- 1000000000
  
  result
}

Assign multipliers:

storm_filter$PROP_MULT <- get_multiplier(storm_filter$PROPDMGEXP)
storm_filter$CROP_MULT <- get_multiplier(storm_filter$CROPDMGEXP)

unique(storm_filter$PROP_MULT)
##  [1] 1e+03 1e+06 1e+00 1e+09    NA 1e+05 1e+04 1e+02 1e+07 1e+01 1e+08

The unrecognised exponent codes are excluded from the corresponding damage calculation. Their values are not assumed to represent zero damage.

The property and crop damage amounts are then converted into US dollars.

storm_filter$PROPDMG <- storm_filter$PROPDMG*storm_filter$PROP_MULT
storm_filter$CROPDMG <- storm_filter$CROPDMG*storm_filter$CROP_MULT

The total economic damage is aggregated by event type. Missing damage values are excluded from the summations.

##Property
property <- aggregate(
  PROPDMG ~ EVTYPE,
  data = storm_filter,
  FUN = sum,
  na.rm = TRUE
)

#Crop
crops <- aggregate(
  CROPDMG ~ EVTYPE,
  data = storm_filter,
  FUN = sum,
  na.rm = TRUE
)

Sort the results in descending order:

property <- property[
  order(-property$PROPDMG), ]


crops <- crops[
  order(-crops$CROPDMG), ]

Select the top 10 event types:

top_property <- head(property, 10)
top_crops <- head(crops, 10)

Display the results:

top_property
##                EVTYPE      PROPDMG
## 140             FLOOD 144657709807
## 342 HURRICANE TYPHOON  69305840000
## 714           TORNADO  56947380617
## 555       STORM SURGE  43323536000
## 128       FLASH FLOOD  17130987583
## 193              HAIL  15735267513
## 333         HURRICANE  11868319010
## 641 THUNDERSTORM WIND   9921389376
## 798          WILDFIRE   7766943500
## 727    TROPICAL STORM   7703890550
top_crops
##                EVTYPE     CROPDMG
## 75            DROUGHT 13972566000
## 140             FLOOD  5661968450
## 493       RIVER FLOOD  5029459000
## 359         ICE STORM  5022113500
## 194              HAIL  3025954473
## 334         HURRICANE  2741910000
## 343 HURRICANE TYPHOON  2607872800
## 129       FLASH FLOOD  1436433150
## 116      EXTREME COLD  1312973000
## 642 THUNDERSTORM WIND  1159514188

Results

1. Population health impacts

The total fatalities and injuries are used to identify the weather events with the greatest impacts on population health.

The following figure presents the ten event types associated with the highest fatalities and injuries across the United States.

par(mfrow = c(1,2), mar = c(5,5,4,2))
barplot(top_fatalities$FATALITIES,
        main = "Top 10 Events by Fatalities",
        names.arg = top_fatalities$EVTYPE,
        horiz = TRUE,
        las = 1,
        cex.names = 0.8,
        xlab = "Total Fatalities")
barplot(top_injuries$INJURIES,
        main = "Top 10 Events by Injuries",
        names.arg = top_injuries$EVTYPE,
        horiz = TRUE,
        las = 1,
        cex.names = 0.8,
        xlab = "Total Fatalities",
        )

Based on the results, tornadoes are ranked first for both fatalities and injuries, showing that this event type has the largest consequences in population health. The event that contributes to second largest consequences to population health is considerably excessive heat, which is ranked second in fatalities and fourth and injuries.

2. Economic consequences

The economic consequences are evaluated using the combined property and crop damage values.

The following figure presents the ten event types with the greatest total economic damage.

par(mfrow = c(1,2), mar = c(5,5,4,2))
barplot(top_property$PROPDMG,
        main = "Top 10 Events by Property Damage",
        names.arg = top_property$EVTYPE,
        horiz = TRUE,
        las = 1,
        cex.names = 0.8,
        xlab = "Property Damage")
barplot(top_crops$CROPDMG,
        main = "Top 10 Events by Crop Damage",
        names.arg = top_crops$EVTYPE,
        horiz = TRUE,
        las = 1,
        cex.names = 0.8,
        xlab = "Crop Damage",
)

The results show that flood contributes to the largest economic damage, which it is ranked first in property damage and second in crop damage.

Property and crop damage may contribute differently to the total economic consequences depending on the event type. The aggregated results allow the most economically damaging event types to be identified and compared.

Discussion

This analysis examines the impacts of severe weather events across the United States from two perspectives: population health and economic consequences.

Fatalities and injuries provide separate measures of the human health burden associated with different weather events. Economic damage provides an additional measure of the financial consequences, including damage to property and agricultural production.

The results highlight that different types of severe weather events may have different patterns of impact. Events associated with high fatalities or injuries may not necessarily be the same events responsible for the greatest economic damage.

These findings provide an overview of the relative impacts of severe weather events and may help inform the understanding of the different challenges associated with severe weather preparedness.

Limitations

Several limitations should be considered when interpreting the results.

First, the event-type variable contains inconsistencies in the original database. Although common abbreviations and variations were standardised, some event descriptions may still represent the same general weather phenomenon under different categories.

Second, the analysis uses total fatalities, injuries and economic damage rather than rates adjusted for population size, event frequency or inflation.

Third, the economic damage calculations depend on the accuracy of the recorded damage values and exponent codes. Unrecognised exponent codes were excluded from the corresponding damage calculations.

Finally, the database covers multiple decades, during which reporting practices and data collection procedures may have changed.

Therefore, the results should be interpreted as an overall comparison of recorded impacts rather than a direct comparison of the severity of individual weather events.