This analysis explores the U.S. National Oceanic and Atmospheric Administration’s (NOAA) storm database to identify which severe weather events have the greatest impact on public health and the economy. The data, covering the years 1950 to 2011, was processed to calculate total fatalities, injuries, property damage, and crop damage per event type. The results indicate that tornadoes are the most harmful events with respect to population health, causing the highest number of fatalities and injuries. Floods have the greatest economic consequences, leading to the most significant combined property and crop damage.
First, we load the necessary libraries and the raw data file. We use cache=TRUE for this chunk because loading the large dataset takes time.
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(ggplot2)
# Load the raw data directly from the bz2 file
storm_data <- read.csv("stormdata.csv.bz2")