This document performs an analysis on the data from the USA's National Weather Service. The raw data is available on csv format and its documentation is available on pdf.
The two main questions that this document seeks to answer are:
library(ggplot2)
library(scales)
library(grid)
library(reshape2)
library(RCurl)
## Loading required package: bitops
library(gridExtra)
options(scipen = 100, digits = 4)
df <- read.csv("repdata-data-StormData.csv")
For question 1 we need a metric for population health. The two candidate variables for this are injuries and fatalities. For the purpose of this analysis these variables are combined into a health variable which indicates the number of persons which were either injured of fataly wounded.
Only the top 5 events are shown since there are too many events to show on the graph.
For question 2 we use property damage and crop damage. First we need a function to translate the exponents into integers. Then we multiply the exponents by the values and get the estimated property and crop damage. Then we add these two and this is the metric we will use for economic consequence.
## Error: replacement has 0 rows, data has 902297