Title

Effect of Storm & Weather Events on Life and Property

Synopsis

Storms and other severe weather events can cause both public health and economic problems for communities and municipalities. This project involves exploring the U.S. National Oceanic and Atmospheric Administration’s (NOAA) storm database. This database tracks characteristics of major storms and weather events in the United States, including when and where they occur, as well as estimates of any fatalities, injuries, and property damage.

This analysis shows by aggregating the data by the type of weather events: -Tornados are the most harmfull events on population health (including injury and fatalities). -Floods are responsible for the most economic damage (including crop & property damage).

Data Processing

download.file("https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2FStormData.csv.bz2",
destfile = "stormData.csv.bz2", method = "curl")
storm<-read.csv(bzfile("stormData.csv.bz2"), sep=",", header=T)

Data Feature Extraction

library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
stormfin<-select(storm,c("EVTYPE","FATALITIES","INJURIES","PROPDMG","PROPDMGEXP","CROPDMG","CROPDMGEXP"))

stormfin$PROPDMGNUM = 0
stormfin[stormfin$PROPDMGEXP == "H", ]$PROPDMGNUM = stormfin[stormfin$PROPDMGEXP == "H", ]$PROPDMG * 10^2
stormfin[stormfin$PROPDMGEXP == "K", ]$PROPDMGNUM = stormfin[stormfin$PROPDMGEXP == "K", ]$PROPDMG * 10^3
stormfin[stormfin$PROPDMGEXP == "M", ]$PROPDMGNUM = stormfin[stormfin$PROPDMGEXP == "M", ]$PROPDMG * 10^6
stormfin[stormfin$PROPDMGEXP == "B", ]$PROPDMGNUM = stormfin[stormfin$PROPDMGEXP == "B", ]$PROPDMG * 10^9

stormfin$CROPDMGNUM = 0
stormfin[stormfin$CROPDMGEXP == "H", ]$CROPDMGNUM = stormfin[stormfin$CROPDMGEXP == "H", ]$CROPDMG * 10^2
stormfin[stormfin$CROPDMGEXP == "K", ]$CROPDMGNUM = stormfin[stormfin$CROPDMGEXP == "K", ]$CROPDMG * 10^3
stormfin[stormfin$CROPDMGEXP == "M", ]$CROPDMGNUM = stormfin[stormfin$CROPDMGEXP == "M", ]$CROPDMG * 10^6
stormfin[stormfin$CROPDMGEXP == "B", ]$CROPDMGNUM = stormfin[stormfin$CROPDMGEXP == "B", ]$CROPDMG * 10^9

stormfin<-select(stormfin,-c("PROPDMGEXP","CROPDMGEXP"))

stormfinl<-aggregate(.~EVTYPE,stormfin,sum)
stormfinl$LIFE<-stormfinl$FATALITIES+stormfinl$INJURIES
stormfinl$ECON<-stormfinl$PROPDMGNUM+stormfinl$CROPDMGNUM

Only the relevant features of the dataset: event type, fatality, injuries, crop damage & property damage ( numerical & exp values) have been used for the analysis. The analysis involved giving an answer about the effect of various weather event types on life & economic loss. ## Results

lifestat<-select(stormfinl,c("EVTYPE","LIFE"))
lifestat<-lifestat[order(-lifestat$LIFE),][1:10,]
ecostat<-select(stormfinl,c("EVTYPE","ECON"))
ecostat<-ecostat[order(-ecostat$ECON),][1:10,]

library(ggplot2)
ggplot(lifestat,aes(x=EVTYPE,y=LIFE))+geom_bar(stat="identity",fill="blue")+xlab("Event Type")+ylab("LIFE VALUE DMG")

This plot is about the number of lives lost, plotted against the top 10 types of weather event that cause them.

ggplot(ecostat,aes(x=EVTYPE,y=ECON))+geom_bar(stat="identity",fill="black")+xlab("Event Type")+ylab("PROP VALUE DMG")

This plot is about the net economic loss, plotted against the top 10 types of weather event that cause them.

The first plot indicates that storm has the highest combined effect of fatalities+injuries on life. The second plot indicates that flood is responsible for maximum combined economic loss in terms of crop & property damage.