“Impact on human life and economy by severe weather events”

Synopsis

The main purpose of this report is to try to find out which are the most harmful weather events in human life and economy. In order to achieve our goals we will explore 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 when and where they occur, as well as estimates of any fatalities, injuries, and property damage.

Data Processing

We download the data for this assignment from this link in our working directory. The data is in .csv format, compressed with the bz2 algorithm. We unzip the data in the working folder.

file <- "./repdata-data-StormData.csv"


if (!file.exists(file)){
  unzip("repdata-data-StormData.csv.bz2", unzip = "internal") 
}

We read the data into R.

data <- read.table("./repdata-data-StormData.csv",header = TRUE, sep=",",stringsAsFactors = FALSE)

We have to answer two major questions, the one is:

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

and the other:

Across the United States, which types of events have the greatest economic consequences?

We will discover which weather event has the greater impact on population health exploring the variables FATALITIES and INJURIES in which is kept record about deaths and injuries related to severe weather events in the USA from 1950 until 2011.

Accordingly we will discover which are the most harmful weather events for economy exploring variables PROPDMG (Property Damages) and CROPDMG (Crop Damages).

We aggregate the data per variable and EVTYPE (Event Type) in order to be able to visualize the results easily.

fatalities <- aggregate(FATALITIES ~ EVTYPE, data=data, FUN=sum)
fatalities <- fatalities[order(-fatalities$FATALITIES),][1:10,]

injuries <- aggregate(INJURIES ~ EVTYPE, data=data, FUN=sum)
injuries <- injuries[order(-injuries$INJURIES),][1:10,]

propdmg <- aggregate(PROPDMG ~ EVTYPE, data=data, FUN=sum)
propdmg <- propdmg[order(-propdmg$PROPDMG),][1:10,]

cropdmg <- aggregate(CROPDMG ~ EVTYPE, data=data, FUN=sum)
cropdmg <- cropdmg[order(-cropdmg$CROPDMG),][1:10,]

Results

In order to answer our first question we will create a barplot showing which are the top ten most harmful weather events for people’s health.

par(mfrow = c(1, 2), mar = c(12, 3, 3, 2), mgp = c(3, 1, 0), cex=0.6)
barplot(fatalities$FATALITIES,las = 3, names.arg = fatalities$EVTYPE,col="red", main = "Top 10 Fatalities By Weather Events")
barplot(injuries$INJURIES, las=3, names.arg = injuries$EVTYPE,col="red", main = "Top 10 Injuries By Weather Events")

As we can see the most harmfull weather event regarding human life is the Tornado, both for fatalities and injuries. As we can see the harmful weather events are simmilar both for ftalities and injuries but there are differences in the ranking.

Next, in order to answer our second question, we will create a barplot showing which are the top ten most harmful weather events for economy.

par(mfrow = c(1, 2), mar = c(12, 2, 3, 2), mgp = c(3, 1, 0), cex=0.6)
barplot(propdmg$PROPDMG,las = 3, names.arg = propdmg$EVTYPE,col="red", main = "Top 10 Property Damaging Weather Events")
barplot(cropdmg$CROPDMG, las=3, names.arg = cropdmg$EVTYPE,col="red", main = "Top 10 Crop Damaging Weather Events",axes=FALSE)
axis(side = 2, at = seq(0, 600000, by = 50000)) 

Reading our plot we can see that the most harmful weather event for property damages is again the Tornado and for crop damages is the Hail. Again we can detect similarities between the top ten harmfull weather events for property and crop damages not as many as in the first plot.