Synopsis

We investigate the most important types of extreme weather events with respect to economic and public health. The number of fatalities, injuries and the amount of property and crop damage was investigated. The findings indicate that tornadoes caused the highest amount of fatalities, heat waves caused the highest amount of injuries, coastal erosion the most property damage and dust storms, forest fires and high winds causing the highest amount of crop damage.

Data processing

First, we load in the data using read.csv.

df <- read.csv("repdata_data_StormData.csv")
print(names(df))
##  [1] "STATE__"    "BGN_DATE"   "BGN_TIME"   "TIME_ZONE"  "COUNTY"    
##  [6] "COUNTYNAME" "STATE"      "EVTYPE"     "BGN_RANGE"  "BGN_AZI"   
## [11] "BGN_LOCATI" "END_DATE"   "END_TIME"   "COUNTY_END" "COUNTYENDN"
## [16] "END_RANGE"  "END_AZI"    "END_LOCATI" "LENGTH"     "WIDTH"     
## [21] "F"          "MAG"        "FATALITIES" "INJURIES"   "PROPDMG"   
## [26] "PROPDMGEXP" "CROPDMG"    "CROPDMGEXP" "WFO"        "STATEOFFIC"
## [31] "ZONENAMES"  "LATITUDE"   "LONGITUDE"  "LATITUDE_E" "LONGITUDE_"
## [36] "REMARKS"    "REFNUM"

We will investigate the fields, FATALITIES and INJURIES and compare it across the types in EVTYPE to evaluate the impact on public health. Property damage (PROPDMG) and (CROPDMG). We will look at the distribution of effects per event using boxplots. We will look at the three worst medians for each case.

Results

par(cex.axis=0.4)

par(mfrow=c(2,2), mar=rep(2, 4))

median_values <- tapply(df$FATALITIES, df$EVTYPE, median) 
worst3 <- names(sort(median_values, decreasing = TRUE)[1:3]) 
worst_3_df <- df[df$EVTYPE %in% worst3, ] 
boxplot(FATALITIES ~ EVTYPE,data=worst_3_df ,xlab = "", main="Fatalities")

median_values <- tapply(df$INJURIES, df$EVTYPE, median) 
worst3 <- names(sort(median_values, decreasing = TRUE)[1:3]) 
worst_3_df <- df[df$EVTYPE %in% worst3, ] 
boxplot(INJURIES ~ EVTYPE,data=worst_3_df ,xlab = "", main="Injuries")

median_values <- tapply(df$PROPDMG, df$EVTYPE, median) 
worst3 <- names(sort(median_values, decreasing = TRUE)[1:3]) 
worst_3_df <- df[df$EVTYPE %in% worst3, ] 
boxplot(PROPDMG ~ EVTYPE,data=worst_3_df ,xlab = "", main="Property damage")

median_values <- tapply(df$CROPDMG, df$EVTYPE, median) 
worst3 <- names(sort(median_values, decreasing = TRUE)[1:3]) 
worst_3_df <- df[df$EVTYPE %in% worst3, ] 
boxplot(CROPDMG ~ EVTYPE,data=worst_3_df ,xlab = "", main="Crop damage")

Based on the results seen above, coastal erosion is the worst with respect to property damage. High winds and cold, forest fires and dust storms cause the worst amounts of crop damage. Tornadoes and hailstorms cause the most fatalities and heat waves cause the most injuries.