Harmful events and consequences to US Population Health and Economy

Synopsis:

This report explores the U.S. National Oceanic and Atmospheric Administration’s (NOAA) storm database, which tracks characteristics of major storms and weather events in the United States, including event occuring time and location, estimates of fatalities, injuries, and property damages.

The purpose of this report is to address the following questions: 1. Across the United States, which types of events (as indicated in the EVTYPE variable) are most harmful with respect to population health? 2. Across the United States, which types of events have the greatest economic consequences?

The conclusion summarizes 5 types of events for these two questions, respectively.

Data Processing

I read the csv file from my working directory

storm <- read.csv("storm.csv")

The below is a summary of the data,which has 902297 observations.

str(storm)
## 'data.frame':    902297 obs. of  37 variables:
##  $ STATE__   : num  1 1 1 1 1 1 1 1 1 1 ...
##  $ BGN_DATE  : Factor w/ 16335 levels "1/1/1966 0:00:00",..: 6523 6523 4242 11116 2224 2224 2260 383 3980 3980 ...
##  $ BGN_TIME  : Factor w/ 3608 levels "00:00:00 AM",..: 272 287 2705 1683 2584 3186 242 1683 3186 3186 ...
##  $ TIME_ZONE : Factor w/ 22 levels "ADT","AKS","AST",..: 7 7 7 7 7 7 7 7 7 7 ...
##  $ COUNTY    : num  97 3 57 89 43 77 9 123 125 57 ...
##  $ COUNTYNAME: Factor w/ 29601 levels "","5NM E OF MACKINAC BRIDGE TO PRESQUE ISLE LT MI",..: 13513 1873 4598 10592 4372 10094 1973 23873 24418 4598 ...
##  $ STATE     : Factor w/ 72 levels "AK","AL","AM",..: 2 2 2 2 2 2 2 2 2 2 ...
##  $ EVTYPE    : Factor w/ 985 levels "   HIGH SURF ADVISORY",..: 834 834 834 834 834 834 834 834 834 834 ...
##  $ BGN_RANGE : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ BGN_AZI   : Factor w/ 35 levels "","  N"," NW",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ BGN_LOCATI: Factor w/ 54429 levels "","- 1 N Albion",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ END_DATE  : Factor w/ 6663 levels "","1/1/1993 0:00:00",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ END_TIME  : Factor w/ 3647 levels ""," 0900CST",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ 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   : Factor w/ 24 levels "","E","ENE","ESE",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ END_LOCATI: Factor w/ 34506 levels "","- .5 NNW",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ 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: Factor w/ 19 levels "","-","?","+",..: 17 17 17 17 17 17 17 17 17 17 ...
##  $ CROPDMG   : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ CROPDMGEXP: Factor w/ 9 levels "","?","0","2",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ WFO       : Factor w/ 542 levels ""," CI","$AC",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ STATEOFFIC: Factor w/ 250 levels "","ALABAMA, Central",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ ZONENAMES : Factor w/ 25112 levels "","                                                                                                                               "| __truncated__,..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ 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   : Factor w/ 436774 levels "","-2 at Deer Park\n",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ REFNUM    : num  1 2 3 4 5 6 7 8 9 10 ...

Analysis:

This documents investigate two questions:

1.Across the United States, which types of events (as indicated in the ‘EVTYPE’ variable) are most harmful with respect to population health?

I investigate the events which has outstanding value in variable ‘FATALITIES’ and ‘INJURIES’

2.Across the United States, which types of events have the greatest economic consequences? I investigate the events which has outstanding value in variable ‘PROPDMG’ and ‘CROPDMG’

Results:

For question 1: List top 6 of Injuries given by Event.

storm_injuries <- aggregate(INJURIES ~ EVTYPE, data = storm, FUN = sum)
storm_injuries <- storm_injuries[order(storm_injuries$INJURIES, decreasing = TRUE), ]

# Top 6 most harmful causes of injuries
top_storm_injuries <- storm_injuries[1:6, ]
print(top_storm_injuries)
##             EVTYPE INJURIES
## 834        TORNADO    91346
## 856      TSTM WIND     6957
## 170          FLOOD     6789
## 130 EXCESSIVE HEAT     6525
## 464      LIGHTNING     5230
## 275           HEAT     2100

List top 6 Fatalies given by Event.

storm_fatalities <- aggregate(FATALITIES ~ EVTYPE, data = storm, FUN = sum)
storm_fatalities <- storm_fatalities[order(storm_fatalities$FATALITIES, decreasing = TRUE), ]

# Top 6 most harmful causes of fatalities
top_storm_fatalities <- storm_fatalities[1:6, ]
print(top_storm_fatalities)
##             EVTYPE FATALITIES
## 834        TORNADO       5633
## 130 EXCESSIVE HEAT       1903
## 153    FLASH FLOOD        978
## 275           HEAT        937
## 464      LIGHTNING        816
## 856      TSTM WIND        504

Chart “Top 6 Types of Events Causing Injuries Across the U.S”

library(ggplot2)
## Warning: package 'ggplot2' was built under R version 3.1.3
ggplot(top_storm_injuries[1:6, ], aes(EVTYPE, INJURIES)) + geom_bar(stat = "identity") +     ylab("Fatalities") + xlab("Event Type") + ggtitle("Top 6 Types of Events Causing Injuries Across the U.S")

Chart “Top Ten Types of Events Causing Death Across the U.S”

ggplot(top_storm_fatalities[1:6, ], aes(EVTYPE, FATALITIES)) + geom_bar(stat = "identity") + ylab("Injuries") + xlab("Event Type") + ggtitle("Top 6 Types of Events Causing Death Across the U.S")

For question 2: List top 6 of Injuries given by Event.

storm_PROPDMG <- aggregate(PROPDMG ~ EVTYPE, data = storm, FUN = sum)
storm_PROPDMG <- storm_PROPDMG[order(storm_PROPDMG$PROPDMG, decreasing = TRUE), ]

# Top 10 most harmful causes of PROPDMG
top_storm_PROPDMG <- storm_PROPDMG[1:6, ]
print(top_storm_PROPDMG)
##                EVTYPE   PROPDMG
## 834           TORNADO 3212258.2
## 153       FLASH FLOOD 1420124.6
## 856         TSTM WIND 1335965.6
## 170             FLOOD  899938.5
## 760 THUNDERSTORM WIND  876844.2
## 244              HAIL  688693.4

Chart “Top 6 Types of Events Causing PROPDMG Across the U.S”

library(ggplot2)
ggplot(top_storm_PROPDMG[1:6, ], aes(EVTYPE, PROPDMG)) + geom_bar(stat = "identity") +     ylab("PROPDMG") + xlab("Event Type") + ggtitle("Top 6 Types of Events Causing PROPDMG Across the U.S")