Synopsis

This report looks at the impact of severe weather events on population health and the economic consequences of such events. Data from the National Weather Service is used to assess these issues over time. Fatalities were used as a measurement of impact on population health and property damage was used as a measurement for economic consquences. Based on the analysis presented here, it appears that high surf advisories result in the greatest level of population health impact and economic consequence.

Data Processing

The data set was first downloaded and then read into the r environment using the read.csv and bzfile functions.

Data were then grouped by event and the mean number of fatalities for each event was calculated to determine impact on population health.

Following this, data were again grouped by even and the mean level of property damaged was calculated for each event to determine economic impact.

#read in the data

library(dplyr)
## 
## Attaching package: 'dplyr'
## 
## The following object is masked from 'package:stats':
## 
##     filter
## 
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
setwd("C:/Users/SSW/Desktop")
DF <- read.csv(bzfile("repdata-data-StormData.csv.bz2"))

#Data grouped by event and mean fatalities calculated

popDamage<- DF%>%
    group_by(EVTYPE) %>%
    summarise(meanFatalities = mean(FATALITIES))

meanFatal<-sort(popDamage$meanFatalities, decreasing=TRUE)
popDamage<-cbind(popDamage, meanFatal)
popDamage<-select(popDamage, -meanFatalities)

econDamage<- DF%>%
    group_by(EVTYPE) %>%
    summarise(meanPropDam = mean(PROPDMG))

meanProp<-sort(econDamage$meanPropDam, decreasing=TRUE)
econDamage<-cbind(econDamage, meanProp)
econDamage<-select(econDamage, -meanPropDam)

Results

Below are two tables that show the top five weather events for number of fatalities and level of property damage.

popTable<-popDamage[1:5,]
print(popTable)
##                  EVTYPE meanFatal
## 1    HIGH SURF ADVISORY 25.000000
## 2         COASTAL FLOOD 14.000000
## 3           FLASH FLOOD  8.000000
## 4             LIGHTNING  5.666667
## 5             TSTM WIND  4.363636

The above table shows that on average high surf advisories resulted in the highest number of fatalities.

econTable<-econDamage[1:5,]
print(econTable)
##                  EVTYPE meanProp
## 1    HIGH SURF ADVISORY      766
## 2         COASTAL FLOOD      600
## 3           FLASH FLOOD      600
## 4             LIGHTNING      570
## 5             TSTM WIND      500

The above table shows that on average high surf advisories resulted in the highest level of property damage.