TORNADO is the most harmful event for population health and FLOOD caused the most economical damage in the US in past 60 years

Synopsis

Storms and other severe weather events can cause both public health and economic problems for communities and municipalities. We analyzed 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 from year 1950 to November 2011.

To analyze the most harmful events with respect to population health we considered the fatalities and injuries. Tornado is the most harmful event with respect to population health.

To analyze the events have greatest economic consequences we considered property damage and crop damage. Flood has the greatest economics consequences.

Data Processing

Read the zipfile and maping PROPDMGEXP and CROPDMGEXP values to corresponding numeric values for the further calculation. Subset the data frame using values EVTYPE,PROPDMG, PROPDMGEXP, CROPDMG and CROPDMGEXP.

data <- read.csv(bzfile("repdata-data-StormData.csv.bz2"))

library(plyr)
data$PROPDMGEXP <- as.numeric(mapvalues(as.character(data$PROPDMGEXP), from = c("", 
    "-", "?", "+", "0", "1", "2", "3", "4", "5", "6", "7", "8", "B", "h", "H", 
    "K", "m", "M"), to = c(0, 0, 0, 0, 1, 10, 100, 1000, 10000, 1e+05, 1e+06, 
    1e+07, 1e+08, 1e+09, 100, 100, 1000, 1e+06, 1e+06)))
data$CROPDMGEXP <- as.numeric(mapvalues(as.character(data$CROPDMGEXP), from = c("", 
    "?", "0", "2", "B", "k", "K", "m", "M"), to = c(0, 0, 1, 100, 1e+09, 1000, 
    1000, 1e+06, 1e+06)))

ecoData <- data[, c(8, 25:28)]
ecoData$propertyDam <- (ecoData$PROPDMG * ecoData$PROPDMGEXP)/1e+09
ecoData$cropDam <- (ecoData$CROPDMG * ecoData$CROPDMGEXP)/1e+09

Results

What is the most harmful severe weather event with respect to population health?

Created two data frames using aggregate function. Fatal is total fatalities for every event type and Inj is for total injuries for every event type.Then merged these two data frames according the event type. Used to highest 10 fatalities+injuries sum for plotting.

Fatal <- aggregate(data$FATALITIES, by = list(data$EVTYPE), sum)
colnames(Fatal) <- c("EVTYPE", "Fatalities")

Inj <- aggregate(data$INJURIES, by = list(data$EVTYPE), sum)
colnames(Inj) <- c("EVTYPE", "Injuries")

mergedData <- merge(Fatal, Inj, by = "EVTYPE")
orderedData <- mergedData[order((mergedData$Fatalities + mergedData$Injuries), 
    decreasing = TRUE)[1:10], ]

par(mar = c(10.1, 7.1, 4.1, 4.1))
barplot(t(orderedData[, (2 - 3)]), main = "10 Most Harmful Events with Respect to Population Health", 
    names.arg = orderedData[, "EVTYPE"], col = heat.colors(2), las = 2)
title(ylab = "FATALITIES and INJURIES", mgp = c(4, 1, 0))
legend("topright", names(orderedData[, (2 - 3)]), cex = 0.8, fill = heat.colors(2))

plot of chunk most harmful to health

Which severe event has the greatest economic consequences?

Created two data frames using aggregate function. pd is for total property damage for every event type and cd is for total crop damage for every event type.Then merged these two data frames according the event type. Used to highest 10 crop damage+property damage for plotting.


pd <- aggregate(ecoData$propertyDam, by = list(ecoData$EVTYPE), sum)
colnames(pd) <- c("EVTYPE", "Property Damage")
cd <- aggregate(ecoData$cropDam, by = list(ecoData$EVTYPE), sum)
colnames(cd) <- c("EVTYPE", "Crop Damage")

mergedData <- merge(pd, cd, by = "EVTYPE")
orderedData <- mergedData[order((mergedData[, 2] + mergedData[, 3]), decreasing = TRUE)[1:10], 
    ]

par(mar = c(12.1, 5.1, 4.1, 2.1))
barplot(t(orderedData[, (2 - 3)]), main = "10 Most Harmful Events with Respect to Economy", 
    ylab = "TOTAL DAMAGE COST (Billion Dollar)", names.arg = orderedData[, "EVTYPE"], 
    col = heat.colors(2), las = 2)

legend("topright", names(orderedData[, (2 - 3)]), cex = 0.8, fill = heat.colors(2))

plot of chunk economic consequences

Conclusion

Based on the analyses above between weather events tornadoes caused to the most death and injuries and flood caused the most economic damage in past 60 years.