Synopsis

This analysis uses NOAA Storm Database to explore which natural events has the greatest impact on human health in the form of deaths and injuries, and on economy in form of property and crop damages.The analysis summarises the events by type and takes the total of the relevant factors, and then produces a bar plot showing the six events with the greatest impact in the US.

Data Processing

The data is downloaded from the internet, and then read into a data frame.

library(tidyverse)
## Registered S3 methods overwritten by 'ggplot2':
##   method         from 
##   [.quosures     rlang
##   c.quosures     rlang
##   print.quosures rlang
## Registered S3 method overwritten by 'rvest':
##   method            from
##   read_xml.response xml2
## ── Attaching packages ──────────────────────────────────────────────────────────────── tidyverse 1.2.1 ──
## ✔ ggplot2 3.1.1       ✔ purrr   0.3.2  
## ✔ tibble  2.1.1       ✔ dplyr   0.8.0.1
## ✔ tidyr   0.8.3       ✔ stringr 1.4.0  
## ✔ readr   1.3.1       ✔ forcats 0.4.0
## ── Conflicts ─────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
download.file("https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2FStormData.csv.bz2", destfile = "./StormData.csv.bz2")
storm_data <- read.csv("StormData.csv.bz2")

This dataframe is then used to create the first of two new data frames. It takes the storm data, groups it by event type, and collapses it down to the sum of fatalities and injuries for each event, and sorts in descenting order. The top 6 is then extracted.

PopHealth <- storm_data %>% 
        group_by(Event = EVTYPE) %>%
        summarise(Fatalaties = sum(FATALITIES+INJURIES)) %>%
        arrange(desc(Fatalaties))

Top6_Pophealth <- head(PopHealth)

Much the same is the creation of the second data frame, but here instead it takes the sum of crop damage and property damage.

EconImpact <- storm_data %>% 
        group_by(Event = EVTYPE) %>%
        summarise(Damages = sum(CROPDMG+PROPDMG)) %>%
        arrange(desc(Damages))

Top6_EconImpact <- head(EconImpact)

Results

The above processed data can be used to answer the questions, which event has the greatest impact on humans and economy.

ggplot(Top6_Pophealth, aes(Event, Fatalaties, fill = Event))+
        geom_bar(stat="identity")+
        ggtitle("Top 6 most dangerous natural events")

As we can see in the above plot, Tornadoes have the greatest impact on population health in the total sum of fatalities and injuries, haveing a total injuries and deaths far exceeding the others.

ggplot(Top6_EconImpact, aes(Event, Damages, fill = Event))+
        geom_bar(stat="identity")+
        ggtitle("Top 6 most damaging natural events")

The same is true for the impact on the economy, tornadoes seem to far outdamage all other events.