Disaster is a serious problem lead to life insecurity and economic loss, but with proper strategic management we can prevent its consequences. National Weather Service is the organization which provide us the data about disaster in United State. This article analyse data about disaster event from the year 1950 to Nov 2011 to provide data about which type of events are the most dangerous and where they often occured? To help us make some plan for minimize loss in the future.

Data processing

        This article use National Weather Service database, which can download from link below and then import dataset in to Rstudio

Link to dataset

Download and read dataset into Rstudio

download.file("https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2FStormData.csv.bz2","Strom_Data.csv")
Strom_data <- read.csv("Strom_Data.csv")

This article use these following libraries for analysis.

library(tidyverse)
library(dplyr)
library(ggplot2)

Result

1.Impact of events on population health.

health_outcome <- Strom_data %>% 
      group_by(EVTYPE)%>%
            summarise(sum = sum(c(INJURIES,FATALITIES), na.rm = TRUE))%>%
                  arrange(desc(sum))%>%
                           rename("Types of events"=EVTYPE)%>%
                               rename("Number of people died or injured (persons)"=sum)
library(DT)   
datatable(health_outcome)

Table 1 : Numbers of persons who’s died or injured by types of events between the year 1950 to Nov 2011.
Tornado is the most harmful event type cause almost 97,000 persons died or injured, which more than the second around 11 folds.

2.Impact of events on economic consequences.

options(scipen = 999) 
options(digits=0)
prop_outcome <- Strom_data %>%
                select(EVTYPE,PROPDMG,PROPDMGEXP)%>%
                        mutate(multiply = case_when(PROPDMGEXP == c("h","H")~100,
                                                     PROPDMGEXP == c("k","K")~1000,
                                                     PROPDMGEXP == c("m","M")~1000000,
                                                     PROPDMGEXP == c("b","B")~1000000000,
                                                     TRUE ~ 1)) %>%
                        group_by(EVTYPE)%>%
                            summarise(PROP_cost = PROPDMG*multiply)%>%
                                arrange(desc(PROP_cost))%>%
                                    top_n(10)
                                
crop_outcome <- Strom_data %>%
                select(EVTYPE,CROPDMG,CROPDMGEXP)%>%
                        mutate(multiply = case_when(CROPDMGEXP == c("h","H")~100,
                                                     CROPDMGEXP == c("k","K")~1000,
                                                     CROPDMGEXP == c("m","M")~1000000,
                                                     CROPDMGEXP == c("b","B")~1000000000,
                                                     TRUE ~ 1)) %>%
                        group_by(EVTYPE)%>%
                            summarise(CROP_cost = CROPDMG*multiply)%>%
                                arrange(desc(CROP_cost))%>%
                                    top_n(10)
economic_cost <- prop_outcome%>%
                    group_by(EVTYPE)%>%
                      full_join(crop_outcome)%>%
                        summarise(econ_cost = sum(c(PROP_cost,CROP_cost),na.rm = TRUE))%>%
                            arrange(desc(econ_cost))%>%
                                top_n(5)
economic_cost$econ_cost <- economic_cost$econ_cost/1000000000
ggplot(economic_cost, aes(x=econ_cost, y=EVTYPE))+
           geom_bar(stat = "identity", fill = rgb(1,0,0,0.5))+
           labs(y="Types of events",x="Economic loss (Billion US Dollar)")+
           labs(title = "Top 5 events caused economic loss")

Figure 1 : Top 5 events caused economic loss in billion US dollar between the year 1950 to Nov 2011.

Storm surge is the most economic harmful, which lead to more than 8,000 billion USD. loss. ### 3.Where is the most suffer from tonadoes and storm surge?

TORNADO <- Strom_data %>%
            select(EVTYPE,STATE)%>%
                filter(EVTYPE == "TORNADO")%>%
                    group_by(STATE)%>%
                        summarise(count= n())%>% 
                            top_n(5)

STORM_SURGE <- Strom_data %>%
            select(EVTYPE,STATE)%>%
                filter(EVTYPE == "STORM SURGE")%>%
                    group_by(STATE)%>%
                        summarise(count= n())%>%
                            top_n(5)
par(mfrow= c(1,2),mar =c(4,4,3,3))
barplot(TORNADO$count~TORNADO$STATE, col= rgb(0,.5,.5,.5),main= "Top 5 states with tornadoes",
        xlab = "State", ylab = "Tonadoes", ylim = c(0,9000))
barplot(STORM_SURGE$count~STORM_SURGE$STATE, col= rgb(.5,0,.5,.5),main= "Top 5 states with storm surges",
        xlab = "State", ylab = "Storm surges", ylim = c(0,80))

Figure 2 : Top 5 states which the most suffer from tonadoes and storm surges between the year 1950 to Nov 2011.

Summary

        Tonado is the most harmful event according to health impact, while storm surge is the most harmful in economic loss aspect. Texus is the most state suffer from tornadoes ,while Florida is the most state which suffer from storm surges.