Synopsis

Severe weather events can have significant impacts on public health and the economy. This analysis explores the U.S. National Oceanic and Atmospheric Administration (NOAA) Storm Database to identify which types of weather events are most harmful to population health and which result in the greatest economic damage. The analysis begins with the original compressed dataset, performs the required data processing in R, summarizes the results, and presents visualizations that help identify the most impactful event types.

Data Processing

Load Required Packages

library(dplyr)
library(ggplot2)
library(knitr)

Load the Raw Storm Data

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

dim(storm)
## [1] 902297     37
str(storm)
## 'data.frame':    902297 obs. of  37 variables:
##  $ STATE__   : num  1 1 1 1 1 1 1 1 1 1 ...
##  $ 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" ...
##  $ BGN_TIME  : chr  "0130" "0145" "1600" "0900" ...
##  $ TIME_ZONE : chr  "CST" "CST" "CST" "CST" ...
##  $ COUNTY    : num  97 3 57 89 43 77 9 123 125 57 ...
##  $ COUNTYNAME: chr  "MOBILE" "BALDWIN" "FAYETTE" "MADISON" ...
##  $ STATE     : chr  "AL" "AL" "AL" "AL" ...
##  $ EVTYPE    : chr  "TORNADO" "TORNADO" "TORNADO" "TORNADO" ...
##  $ BGN_RANGE : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ BGN_AZI   : chr  "" "" "" "" ...
##  $ BGN_LOCATI: chr  "" "" "" "" ...
##  $ END_DATE  : chr  "" "" "" "" ...
##  $ END_TIME  : chr  "" "" "" "" ...
##  $ COUNTY_END: num  0 0 0 0 0 0 0 0 0 0 ...
##  $ COUNTYENDN: logi  NA NA NA NA NA NA ...
##  $ END_RANGE : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ END_AZI   : chr  "" "" "" "" ...
##  $ END_LOCATI: chr  "" "" "" "" ...
##  $ LENGTH    : num  14 2 0.1 0 0 1.5 1.5 0 3.3 2.3 ...
##  $ WIDTH     : num  100 150 123 100 150 177 33 33 100 100 ...
##  $ F         : int  3 2 2 2 2 2 2 1 3 3 ...
##  $ MAG       : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ 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  "" "" "" "" ...
##  $ WFO       : chr  "" "" "" "" ...
##  $ STATEOFFIC: chr  "" "" "" "" ...
##  $ ZONENAMES : chr  "" "" "" "" ...
##  $ LATITUDE  : num  3040 3042 3340 3458 3412 ...
##  $ LONGITUDE : num  8812 8755 8742 8626 8642 ...
##  $ LATITUDE_E: num  3051 0 0 0 0 ...
##  $ LONGITUDE_: num  8806 0 0 0 0 ...
##  $ REMARKS   : chr  "" "" "" "" ...
##  $ REFNUM    : num  1 2 3 4 5 6 7 8 9 10 ...
summary(storm)
## Warning in grep("^[ \t\r\n]*$", object, perl = TRUE): input string 192565 is
## invalid UTF-8
## Warning in grep("^[ \t\r\n]*$", object, perl = TRUE): input string 194345 is
## invalid UTF-8
## Warning in grep("^[ \t\r\n]*$", object, perl = TRUE): input string 199735 is
## invalid UTF-8
## Warning in grep("^[ \t\r\n]*$", object, perl = TRUE): input string 199745 is
## invalid UTF-8
## Warning in grep("^[ \t\r\n]*$", object, perl = TRUE): input string 200467 is
## invalid UTF-8
##     STATE__          BGN_DATE           BGN_TIME          TIME_ZONE     
##  Min.   : 1.0   Length   :902297   Length   :902297   Length   :902297  
##  1st Qu.:19.0   N.unique : 16335   N.unique :  3608   N.unique :    22  
##  Median :30.0   N.blank  :     0   N.blank  :     0   N.blank  :     0  
##  Mean   :31.2   Min.nchar:    16   Min.nchar:     3   Min.nchar:     3  
##  3rd Qu.:45.0   Max.nchar:    18   Max.nchar:    11   Max.nchar:     3  
##  Max.   :95.0                                                           
##                                                                         
##      COUNTY          COUNTYNAME           STATE              EVTYPE      
##  Min.   :  0.0   Length   :902297   Length   :902297   Length   :902297  
##  1st Qu.: 31.0   N.unique : 29601   N.unique :    72   N.unique :   985  
##  Median : 75.0   N.blank  :  1589   N.blank  :     0   N.blank  :     0  
##  Mean   :100.6   Min.nchar:     0   Min.nchar:     2   Min.nchar:     1  
##  3rd Qu.:131.0   Max.nchar:   200   Max.nchar:     2   Max.nchar:    30  
##  Max.   :873.0                                                           
##                                                                          
##    BGN_RANGE             BGN_AZI           BGN_LOCATI          END_DATE     
##  Min.   :   0.000   Length   :902297   Length   :902297   Length   :902297  
##  1st Qu.:   0.000   N.unique :    35   N.unique : 54429   N.unique :  6663  
##  Median :   0.000   N.blank  :547332   N.blank  :287743   N.blank  :243411  
##  Mean   :   1.484   Min.nchar:     0   Min.nchar:     0   Min.nchar:     0  
##  3rd Qu.:   1.000   Max.nchar:     3   Max.nchar:    21   Max.nchar:    18  
##  Max.   :3749.000                                                           
##                                                                             
##       END_TIME        COUNTY_END COUNTYENDN       END_RANGE       
##  Length   :902297   Min.   :0    Mode:logical   Min.   :  0.0000  
##  N.unique :  3647   1st Qu.:0    NAs :902297    1st Qu.:  0.0000  
##  N.blank  :238978   Median :0                   Median :  0.0000  
##  Min.nchar:     0   Mean   :0                   Mean   :  0.9862  
##  Max.nchar:    12   3rd Qu.:0                   3rd Qu.:  0.0000  
##                     Max.   :0                   Max.   :925.0000  
##                                                                   
##       END_AZI           END_LOCATI         LENGTH              WIDTH         
##  Length   :902297   Length   :902297   Min.   :   0.0000   Min.   :   0.000  
##  N.unique :    24   N.unique : 34506   1st Qu.:   0.0000   1st Qu.:   0.000  
##  N.blank  :724837   N.blank  :499225   Median :   0.0000   Median :   0.000  
##  Min.nchar:     0   Min.nchar:     0   Mean   :   0.2301   Mean   :   7.503  
##  Max.nchar:     3   Max.nchar:    21   3rd Qu.:   0.0000   3rd Qu.:   0.000  
##                                        Max.   :2315.0000   Max.   :4400.000  
##                                                                              
##        F               MAG            FATALITIES           INJURIES        
##  Min.   :0.000    Min.   :    0.0   Min.   :  0.00000   Min.   :   0.0000  
##  1st Qu.:0.000    1st Qu.:    0.0   1st Qu.:  0.00000   1st Qu.:   0.0000  
##  Median :1.000    Median :   50.0   Median :  0.00000   Median :   0.0000  
##  Mean   :0.915    Mean   :   46.9   Mean   :  0.01678   Mean   :   0.1557  
##  3rd Qu.:1.000    3rd Qu.:   75.0   3rd Qu.:  0.00000   3rd Qu.:   0.0000  
##  Max.   :5.000    Max.   :22000.0   Max.   :583.00000   Max.   :1700.0000  
##  NAs    :843563                                                            
##     PROPDMG            PROPDMGEXP        CROPDMG            CROPDMGEXP    
##  Min.   :   0.00   Length   :902297   Min.   :  0.000   Length   :902297  
##  1st Qu.:   0.00   N.unique :    19   1st Qu.:  0.000   N.unique :     9  
##  Median :   0.00   N.blank  :465934   Median :  0.000   N.blank  :618413  
##  Mean   :  12.06   Min.nchar:     0   Mean   :  1.527   Min.nchar:     0  
##  3rd Qu.:   0.50   Max.nchar:     1   3rd Qu.:  0.000   Max.nchar:     1  
##  Max.   :5000.00                      Max.   :990.000                     
##                                                                           
##         WFO             STATEOFFIC         ZONENAMES         LATITUDE   
##  Length   :902297   Length   :902297   Length   :902297   Min.   :   0  
##  N.unique :   542   N.unique :   250   N.unique : 25112   1st Qu.:2802  
##  N.blank  :142069   N.blank  :248769   N.blank  :800017   Median :3540  
##  Min.nchar:     0   Min.nchar:     0   Min.nchar:     0   Mean   :2875  
##  Max.nchar:     3   Max.nchar:    45   Max.nchar:  7226   3rd Qu.:4019  
##                                                           Max.   :9706  
##                                                           NAs    :47    
##    LONGITUDE        LATITUDE_E     LONGITUDE_          REMARKS      
##  Min.   :-14451   Min.   :   0   Min.   :-14455   Length   :902297  
##  1st Qu.:  7247   1st Qu.:   0   1st Qu.:     0   N.unique :436781  
##  Median :  8707   Median :   0   Median :     0   N.blank  :312091  
##  Mean   :  6940   Mean   :1452   Mean   :  3509   Min.nchar:    NA  
##  3rd Qu.:  9605   3rd Qu.:3549   3rd Qu.:  8735   Max.nchar:    NA  
##  Max.   : 17124   Max.   :9706   Max.   :106220                     
##                   NAs    :40                                        
##      REFNUM      
##  Min.   :     1  
##  1st Qu.:225575  
##  Median :451149  
##  Mean   :451149  
##  3rd Qu.:676723  
##  Max.   :902297  
## 

Results

Across the United States, Which Types of Events Are Most Harmful to Population Health?

Population health impact is measured using the total number of fatalities and injuries associated with each weather event type.

health <- storm %>%
  group_by(EVTYPE) %>%
  summarise(
    Fatalities = sum(FATALITIES, na.rm = TRUE),
    Injuries = sum(INJURIES, na.rm = TRUE),
    HealthImpact = Fatalities + Injuries
  ) %>%
  arrange(desc(HealthImpact))

head(health, 10)
## # A tibble: 10 × 4
##    EVTYPE            Fatalities Injuries HealthImpact
##    <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

Top 10 Most Harmful Weather Events

top_health <- head(health, 10)

ggplot(
  top_health,
  aes(
    x = reorder(EVTYPE, HealthImpact),
    y = HealthImpact
  )
) +
  geom_col(fill = "firebrick") +
  coord_flip() +
  labs(
    title = "Top 10 Weather Events Most Harmful to Population Health",
    x = "Event Type",
    y = "Fatalities + Injuries"
  ) +
  theme_minimal()

Interpretation

The plot shows the ten weather event types responsible for the greatest combined number of fatalities and injuries across the United States. These events represent the highest risk to public health and are important priorities for emergency preparedness and disaster management. ## Across the United States, Which Types of Events Have the Greatest Economic Consequences?

Economic damage is calculated by combining property damage and crop damage. The damage exponent values (K, M, B) are converted into their numeric multipliers before calculating the total damage.

storm$PROP_MULT <- 1
storm$PROP_MULT[storm$PROPDMGEXP %in% c("K","k")] <- 1e3
storm$PROP_MULT[storm$PROPDMGEXP %in% c("M","m")] <- 1e6
storm$PROP_MULT[storm$PROPDMGEXP %in% c("B","b")] <- 1e9

storm$CROP_MULT <- 1
storm$CROP_MULT[storm$CROPDMGEXP %in% c("K","k")] <- 1e3
storm$CROP_MULT[storm$CROPDMGEXP %in% c("M","m")] <- 1e6
storm$CROP_MULT[storm$CROPDMGEXP %in% c("B","b")] <- 1e9

storm$PropertyDamage <- storm$PROPDMG * storm$PROP_MULT
storm$CropDamage <- storm$CROPDMG * storm$CROP_MULT

storm$TotalDamage <- storm$PropertyDamage + storm$CropDamage

economic <- storm %>%
  group_by(EVTYPE) %>%
  summarise(
    TotalDamage = sum(TotalDamage, na.rm = TRUE)
  ) %>%
  arrange(desc(TotalDamage))

head(economic,10)
## # A tibble: 10 × 2
##    EVTYPE              TotalDamage
##    <chr>                     <dbl>
##  1 FLOOD             150319678257 
##  2 HURRICANE/TYPHOON  71913712800 
##  3 TORNADO            57352114049.
##  4 STORM SURGE        43323541000 
##  5 HAIL               18758221521.
##  6 FLASH FLOOD        17562129167.
##  7 DROUGHT            15018672000 
##  8 HURRICANE          14610229010 
##  9 RIVER FLOOD        10148404500 
## 10 ICE STORM           8967041360

Top 10 Weather Events Causing the Greatest Economic Damage

top_economic <- head(economic,10)

ggplot(
  top_economic,
  aes(
    x = reorder(EVTYPE, TotalDamage),
    y = TotalDamage
  )
) +
  geom_col(fill="steelblue") +
  coord_flip() +
  labs(
    title="Top 10 Weather Events by Economic Damage",
    x="Event Type",
    y="Total Damage (USD)"
  ) +
  theme_minimal()

Interpretation

The figure presents the weather event types responsible for the greatest economic losses across the United States based on the combined value of property and crop damage.

Conclusion

This analysis explored the NOAA Storm Database to identify the weather events with the greatest impact on public health and the economy in the United States. The findings indicate that a small number of event types account for the majority of fatalities, injuries, and economic losses. These results can help government agencies and emergency management organizations better understand the risks associated with severe weather and support future planning and preparedness efforts.