Synopsis

This report analyzes the U.S. National Oceanic and Atmospheric Administration (NOAA) Storm Database to identify the weather events with the greatest impacts on population health and economic damage.

The raw storm data were loaded directly from the original CSV file.

Property and crop damage values were converted into actual monetary values according to their damage multipliers.

The total number of fatalities, injuries, and economic losses was summarized for each weather event type.

The results indicate that tornadoes caused the greatest impact on population health, while floods produced the largest economic losses.

These findings may help governments prioritize disaster preparedness and resource allocation.

Data Processing

The data were loaded directly from the original NOAA Storm Database. After loading the dataset, its structure was examined. The required packages, dplyr and ggplot2, were loaded.

data <- read.csv("repdata_data_StormData.csv.bz2")
str(data)
## '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 ...
library(dplyr)
library(ggplot2)

The variables PROPDMGEXP and CROPDMGEXP contain multipliers that represent the magnitude of property and crop damage. The values "K", "M", and "B" were converted into their corresponding multipliers (1,000; 1,000,000; and 1,000,000,000). All remaining values were treated as a multiplier of 1 because they accounted for only a very small proportion of the observations.

storm <- data %>%
    mutate(prop_multiplier = case_when(PROPDMGEXP == "K" ~ 1000,
                                       PROPDMGEXP == "M" ~ 1000000,
                                       PROPDMGEXP == "B" ~ 1000000000,
                                       TRUE ~ 1),
           property_damage = PROPDMG * prop_multiplier,
           crop_multiplier = case_when(CROPDMGEXP == "K" ~ 1000,
                                     CROPDMGEXP == "M" ~ 1000000,
                                     CROPDMGEXP == "B" ~ 1000000000,
                                     TRUE ~ 1),
           crop_damage = CROPDMG * crop_multiplier,
           economic_damage = property_damage + crop_damage
          )

The total number of fatalities and injuries was calculated for each event type. The total economic loss for each event type was also calculated.

fatalities <- storm %>%
    group_by(EVTYPE) %>%
    summarise(total_fatalities = sum(FATALITIES)) %>%
    arrange(desc(total_fatalities)) %>%
    slice_head(n = 10)

injuries <- storm %>%
    group_by(EVTYPE) %>%
    summarise(total_injuries = sum(INJURIES)) %>%
    arrange(desc(total_injuries)) %>%
    slice_head(n = 10)

economic <- storm %>%
    group_by(EVTYPE) %>%
    summarise(total_economic_damage = sum(economic_damage)) %>%
    arrange(desc(total_economic_damage)) %>%
    slice_head(n = 10)

Results

Population Health

The following figures present the ten weather event types associated with the largest numbers of fatalities and injuries.

Figure 1 shows the total number of fatalities caused by the ten most harmful weather events. Figure 2 shows the total number of injuries caused by the ten most harmful weather events.

ggplot(fatalities,
       aes(x = reorder(EVTYPE, total_fatalities),
           y = total_fatalities)) + geom_col() +
    coord_flip() +labs(
        title = "Top 10 Weather Events by Fatalities",
        x = "Event Type",
        y = "Total Fatalities"
    ) + theme_bw()

ggplot(injuries,
       aes(x = reorder(EVTYPE, total_injuries),
           y = total_injuries)) + geom_col() +
    coord_flip() +labs(
        title = "Top 10 Weather Events by Injuries",
        x = "Event Type",
        y = "Total Injuries"
    ) + theme_bw()

The results show that tornadoes caused the largest numbers of both fatalities and injuries among all weather events, indicating that tornadoes have the greatest impact on population health.

Economic Consequences

Figure 3 presents the ten weather event types associated with the greatest economic losses.

ggplot(economic,
       aes(x = reorder(EVTYPE, total_economic_damage),
           y = total_economic_damage)) + geom_col() +
    coord_flip() + labs(
        title = "Top 10 Weather Events by Economic Damage",
        x = "Event Type",
        y = "Economic Damage"
    ) + theme_bw()

The analysis shows that floods caused the greatest economic damage in the United States, followed by other severe weather events such as hurricanes and storm surges (depending on the final calculation). These events resulted in substantial losses to property and agriculture.