The data about storm events between 1950 and Nov 2011 were obtained from the U.S. National Oceanic and Atmospheric Administration’s (NOAA) storm database. The data contained information about injuries and fatal cases as well as property and crop damage caused by meteorological events. The type of each event was also specified in the original data. In this research, event types were grouped into 48 categories specified by NOAA and total health or economical damage was estimated for each category. Results show that Tornado, Thunderstorm Wind, Excessive Heat, Flood, Lightning, Heat and Flash Flood were most harmful with respect to population health, while Flood, Hurricane (Typhoon), Tornado, Storm Surge/Tide, Hail, Flash Flood and Drought caused most damage in the economical context.
The data was a comma-separated values file and was read using read.csv command with default argument values, except for colClasses, which was used to skip some columns and therefore save RAM space. Values were stored in the Storm data frame.
choose=c(rep("NULL", 7),
"character",
rep("NULL", 14),
rep("numeric", 3), "character", "numeric", "character",
rep("NULL", 9))
Storm=read.csv("repdata_data_StormData.csv", colClasses=choose)
head(Storm)
## EVTYPE FATALITIES INJURIES PROPDMG PROPDMGEXP CROPDMG CROPDMGEXP
## 1 TORNADO 0 15 25.0 K 0
## 2 TORNADO 0 0 2.5 K 0
## 3 TORNADO 0 2 25.0 K 0
## 4 TORNADO 0 2 2.5 K 0
## 5 TORNADO 0 2 2.5 K 0
## 6 TORNADO 0 6 2.5 K 0
dim(Storm)
## [1] 902297 7
Columns PROPDMGEXP and CROPDMGEXP presumably contained the magnitude of the numbers specified in PROPDMG and CROPDMG, respectively. On the basis of this source: http://www.ncdc.noaa.gov/stormevents/pd01016005curr.pdf (page 12), the following decoding of the PROPDMGEXP and CROPDMGEXP values was used:
“”, “?”, “-” or “+” - ignored “h” or “H” - hundred “k” or “K” - thousand “m” or “M” - million “b” or “B” - billion
Values in PROPDMGEXP and CROPDMGEX were substituted with the respective digits and transformed to numbers:
decode = function(x){
x[x%in%c("", "?", "-", "+")] = 0
x[x%in%c("h", "H")] = 2
x[x%in%c("k", "K")] = 3
x[x%in%c("m", "M")] = 6
x[x%in%c("b", "B")] = 9
x=as.numeric(x)
x
}
Storm$PROPDMGEXP = decode(Storm$PROPDMGEXP)
Storm$CROPDMGEXP = decode(Storm$CROPDMGEXP)
head(Storm)
## EVTYPE FATALITIES INJURIES PROPDMG PROPDMGEXP CROPDMG CROPDMGEXP
## 1 TORNADO 0 15 25.0 3 0 0
## 2 TORNADO 0 0 2.5 3 0 0
## 3 TORNADO 0 2 25.0 3 0 0
## 4 TORNADO 0 2 2.5 3 0 0
## 5 TORNADO 0 2 2.5 3 0 0
## 6 TORNADO 0 6 2.5 3 0 0
New values were calculated by multiplying PROPDMG and CROPDMG by ten to the power of the calculated magnitude numbers in PROPDMGEXP and CROPDMGEX, respectively. The resulting vectors were bound with columns 1 to 3 of the initial data (Storm).
Storm=data.frame(Storm[,1:3],
PROP=Storm$PROPDMG*10^Storm$PROPDMGEXP,
CROP=Storm$CROPDMG*10^Storm$CROPDMGEXP
)
head(Storm)
## EVTYPE FATALITIES INJURIES PROP CROP
## 1 TORNADO 0 15 25000 0
## 2 TORNADO 0 0 2500 0
## 3 TORNADO 0 2 25000 0
## 4 TORNADO 0 2 2500 0
## 5 TORNADO 0 2 2500 0
## 6 TORNADO 0 6 2500 0
Event types were classified into 48 categories listed at http://www.ncdc.noaa.gov/stormevents/pd01016005curr.pdf (page 6). To this end, a set of regular expressions was generated for each event category (please note that for some categories there is more than one regular expression) and stored in the regs matrix:
regs=matrix(ncol = 2, byrow = T, data = c(
"Astronomical Low Tide", "^ *Astronomical.*Low.*Tide",
"Avalanche", "^ *Avalanche",
"Blizzard", "^ *Blizzard",
"Coastal Flood", "^ *Coastal.*Flood",
"Cold/Wind Chill", "^ *Cold",
"Cold/Wind Chill", "^ *Wind.*Chill",
"Debris Flow", "^ *Debris.*Flow",
"Dense Fog", "^ *Dense.*Fog",
"Dense Smoke", "^ *Dense.*Smoke",
"Drought", "^ *Drought",
"Dust Devil", "^ *Dust.*Devil",
"Dust Storm", "^ *Dust.*Storm",
"Excessive Heat", "^ *Excessive.*Heat",
"Extreme Cold/Wind Chill", "^ *Extreme.*Cold",
"Extreme Cold/Wind Chill", "^ *Extreme.*Wind.*Chill",
"Flash Flood", "^ *Flash.*Flood",
"Flood", "^ *Flood",
"Frost/Freeze", "^ *Frost",
"Frost/Freeze", "^ *Freeze",
"Funnel Cloud", "^ *Funnel.*Cloud",
"Freezing Fog", "^ *Freezing.*Fog",
"Hail", "^ *Hail",
"Heat", "^ *Heat",
"Heavy Rain", "^ *Heavy.*Rain",
"Heavy Snow", "^ *Heavy.*Snow",
"High Surf", "^ *High.*Surf",
"High Wind", "^ *High.*Wind",
"Hurricane (Typhoon)", "^ *Hurricane",
"Hurricane (Typhoon)", "^ *Typhoon",
"Ice Storm", "^ *Ice.*Storm",
"Lake-Effect Snow", "^ *Lake.*Effect.*Snow",
"Lakeshore Flood", "^ *Lakeshore.*Flood",
"Lightning", "^ *Lightning",
"Marine Hail", "^ *Marine.*Hail",
"Marine High Wind", "^ *Marine.*High.*Wind",
"Marine Strong Wind", "^ *Marine.*Strong.*Wind",
"Marine Thunderstorm Wind", "^ *Marine.*Thunderstorm.*Wind",
"Rip Current", "^ *Rip.*Current",
"Seiche", "^ *Seiche",
"Sleet", "^ *Sleet",
"Storm Surge/Tide", "^ *Storm.*Surge",
"Strong Wind", "^ *Strong.*Wind",
"Thunderstorm Wind", "^ *Thunderstorm",
"Thunderstorm Wind", "^ *TSTM",
"Tornado", "^ *Tornado",
"Tropical Depression", "^ *Tropical.*Depression",
"Tropical Storm", "^ *Tropical.*Storm",
"Tsunami", "^ *Tsunami",
"Volcanic Ash", "^ *Volcanic.*Ash",
"Waterspout", "^ *Waterspout",
"Wildfire", "^ *Wildfire",
"Winter Storm", "^ *Winter.*Storm",
"Winter Weather", "^ *Winter.*Weather"
))
regs
## [,1] [,2]
## [1,] "Astronomical Low Tide" "^ *Astronomical.*Low.*Tide"
## [2,] "Avalanche" "^ *Avalanche"
## [3,] "Blizzard" "^ *Blizzard"
## [4,] "Coastal Flood" "^ *Coastal.*Flood"
## [5,] "Cold/Wind Chill" "^ *Cold"
## [6,] "Cold/Wind Chill" "^ *Wind.*Chill"
## [7,] "Debris Flow" "^ *Debris.*Flow"
## [8,] "Dense Fog" "^ *Dense.*Fog"
## [9,] "Dense Smoke" "^ *Dense.*Smoke"
## [10,] "Drought" "^ *Drought"
## [11,] "Dust Devil" "^ *Dust.*Devil"
## [12,] "Dust Storm" "^ *Dust.*Storm"
## [13,] "Excessive Heat" "^ *Excessive.*Heat"
## [14,] "Extreme Cold/Wind Chill" "^ *Extreme.*Cold"
## [15,] "Extreme Cold/Wind Chill" "^ *Extreme.*Wind.*Chill"
## [16,] "Flash Flood" "^ *Flash.*Flood"
## [17,] "Flood" "^ *Flood"
## [18,] "Frost/Freeze" "^ *Frost"
## [19,] "Frost/Freeze" "^ *Freeze"
## [20,] "Funnel Cloud" "^ *Funnel.*Cloud"
## [21,] "Freezing Fog" "^ *Freezing.*Fog"
## [22,] "Hail" "^ *Hail"
## [23,] "Heat" "^ *Heat"
## [24,] "Heavy Rain" "^ *Heavy.*Rain"
## [25,] "Heavy Snow" "^ *Heavy.*Snow"
## [26,] "High Surf" "^ *High.*Surf"
## [27,] "High Wind" "^ *High.*Wind"
## [28,] "Hurricane (Typhoon)" "^ *Hurricane"
## [29,] "Hurricane (Typhoon)" "^ *Typhoon"
## [30,] "Ice Storm" "^ *Ice.*Storm"
## [31,] "Lake-Effect Snow" "^ *Lake.*Effect.*Snow"
## [32,] "Lakeshore Flood" "^ *Lakeshore.*Flood"
## [33,] "Lightning" "^ *Lightning"
## [34,] "Marine Hail" "^ *Marine.*Hail"
## [35,] "Marine High Wind" "^ *Marine.*High.*Wind"
## [36,] "Marine Strong Wind" "^ *Marine.*Strong.*Wind"
## [37,] "Marine Thunderstorm Wind" "^ *Marine.*Thunderstorm.*Wind"
## [38,] "Rip Current" "^ *Rip.*Current"
## [39,] "Seiche" "^ *Seiche"
## [40,] "Sleet" "^ *Sleet"
## [41,] "Storm Surge/Tide" "^ *Storm.*Surge"
## [42,] "Strong Wind" "^ *Strong.*Wind"
## [43,] "Thunderstorm Wind" "^ *Thunderstorm"
## [44,] "Thunderstorm Wind" "^ *TSTM"
## [45,] "Tornado" "^ *Tornado"
## [46,] "Tropical Depression" "^ *Tropical.*Depression"
## [47,] "Tropical Storm" "^ *Tropical.*Storm"
## [48,] "Tsunami" "^ *Tsunami"
## [49,] "Volcanic Ash" "^ *Volcanic.*Ash"
## [50,] "Waterspout" "^ *Waterspout"
## [51,] "Wildfire" "^ *Wildfire"
## [52,] "Winter Storm" "^ *Winter.*Storm"
## [53,] "Winter Weather" "^ *Winter.*Weather"
An NA vector named EVCAT was created with the length equal to the number of Storm rows:
EVCAT=rep(NA, nrow(Storm))
Next, the EVTYPE column of Storm was searched with subsequent regular expressions taken from the second column of the regs matrix. If the match was found, the corresponding element of EVCAT was replaced with the related category name taken from the first column of the regs matrix.
apply(regs, 1, function(x){
EVCAT[grep(x[2], Storm$EVTYPE, ignore.case = T)]<<-x[1]
invisible(NULL)
})
## NULL
The resulting EVCAT vector was bound to the Storm data frame:
Storm=data.frame(Storm, EVCAT)
head(Storm)
## EVTYPE FATALITIES INJURIES PROP CROP EVCAT
## 1 TORNADO 0 15 25000 0 NA
## 2 TORNADO 0 0 2500 0 NA
## 3 TORNADO 0 2 25000 0 NA
## 4 TORNADO 0 2 2500 0 NA
## 5 TORNADO 0 2 2500 0 NA
## 6 TORNADO 0 6 2500 0 NA
After applying the above procedure, some events remained uncategorised, their fraction being equal to:
paste(round(
sum(is.na(Storm$EVCAT))/nrow(Storm)*100
, 2), "%")
## [1] "100 %"
Total sums were calculated for each category. This was first done for columns 2 and 3 of the Storm data frame (that is FATALITIES and INJURIES). The results were stored in HEALTH:
HEALTH=aggregate(Storm[,2:3], list(EVCAT=Storm$EVCAT), sum)
head(HEALTH)
## EVCAT FATALITIES INJURIES
## 1 Astronomical Low Tide 0 0
## 2 Avalanche 224 170
## 3 Blizzard 101 805
## 4 Coastal Flood 6 7
## 5 Cold/Wind Chill 158 60
## 6 Dense Fog 18 342
The data was ordered by increasing sum of FATALITIES and INJURIES. The levels of EVCAT were also reordered to reflect the current order. This was done for later purpose, to obtain the desired order of categories when plotting with ggplot2.
HEALTH=HEALTH[order(HEALTH[,2]+HEALTH[,3]),]
HEALTH$EVCAT=ordered(HEALTH$EVCAT, levels=(unique(HEALTH$EVCAT)))
head(HEALTH)
## EVCAT FATALITIES INJURIES
## 1 Astronomical Low Tide 0 0
## 7 Dense Smoke 0 0
## 15 Freezing Fog 0 0
## 26 Lake-Effect Snow 0 0
## 27 Lakeshore Flood 0 0
## 29 Marine Hail 0 0
The same process was performed for columns 3 and 4 (FATALITIES and INJURIES) of Storm to create ECO.
ECO=aggregate(Storm[,4:5], list(EVCAT=Storm$EVCAT), sum)
ECO=ECO[order(ECO[,2]+ECO[,3]),]
ECO$EVCAT=ordered(ECO$EVCAT, levels=(unique(ECO$EVCAT)))
head(ECO)
## EVCAT PROP CROP
## 29 Marine Hail 4000 0
## 7 Dense Smoke 100000 0
## 33 Rip Current 163000 0
## 17 Funnel Cloud 194600 0
## 1 Astronomical Low Tide 320000 0
## 31 Marine Strong Wind 418330 0
Meaningful column names were added:
colnames(HEALTH)[2:3]=c("Fatalities", "Injuries")
colnames(ECO)[2:3]=c("Property damages", "Crop damages")
and the data was transformed to the long form:
library(reshape2)
HEALTH=melt(HEALTH)
## Using EVCAT as id variables
ECO=melt(ECO)
## Using EVCAT as id variables
HEALTH
## EVCAT variable value
## 1 Astronomical Low Tide Fatalities 0
## 2 Dense Smoke Fatalities 0
## 3 Freezing Fog Fatalities 0
## 4 Lake-Effect Snow Fatalities 0
## 5 Lakeshore Flood Fatalities 0
## 6 Marine Hail Fatalities 0
## 7 Seiche Fatalities 0
## 8 Tropical Depression Fatalities 0
## 9 Volcanic Ash Fatalities 0
## 10 Marine High Wind Fatalities 1
## 11 Sleet Fatalities 2
## 12 Funnel Cloud Fatalities 0
## 13 Frost/Freeze Fatalities 2
## 14 Drought Fatalities 2
## 15 Coastal Flood Fatalities 6
## 16 Marine Strong Wind Fatalities 14
## 17 Marine Thunderstorm Wind Fatalities 10
## 18 Dust Devil Fatalities 2
## 19 Storm Surge/Tide Fatalities 24
## 20 Waterspout Fatalities 6
## 21 Tsunami Fatalities 33
## 22 Cold/Wind Chill Fatalities 158
## 23 High Surf Fatalities 104
## 24 Heavy Rain Fatalities 98
## 25 Dense Fog Fatalities 18
## 26 Avalanche Fatalities 224
## 27 Strong Wind Fatalities 111
## 28 Tropical Storm Fatalities 66
## 29 Dust Storm Fatalities 22
## 30 Extreme Cold/Wind Chill Fatalities 304
## 31 Winter Weather Fatalities 61
## 32 Blizzard Fatalities 101
## 33 Wildfire Fatalities 75
## 34 Rip Current Fatalities 577
## 35 Heavy Snow Fatalities 129
## 36 Hail Fatalities 15
## 37 Hurricane (Typhoon) Fatalities 135
## 38 Winter Storm Fatalities 217
## 39 High Wind Fatalities 293
## 40 Ice Storm Fatalities 89
## 41 Flash Flood Fatalities 1018
## 42 Heat Fatalities 1118
## 43 Lightning Fatalities 817
## 44 Flood Fatalities 495
## 45 Excessive Heat Fatalities 1903
## 46 Thunderstorm Wind Fatalities 710
## 47 Tornado Fatalities 5658
## 48 Astronomical Low Tide Injuries 0
## 49 Dense Smoke Injuries 0
## 50 Freezing Fog Injuries 0
## 51 Lake-Effect Snow Injuries 0
## 52 Lakeshore Flood Injuries 0
## 53 Marine Hail Injuries 0
## 54 Seiche Injuries 0
## 55 Tropical Depression Injuries 0
## 56 Volcanic Ash Injuries 0
## 57 Marine High Wind Injuries 1
## 58 Sleet Injuries 0
## 59 Funnel Cloud Injuries 3
## 60 Frost/Freeze Injuries 3
## 61 Drought Injuries 4
## 62 Coastal Flood Injuries 7
## 63 Marine Strong Wind Injuries 22
## 64 Marine Thunderstorm Wind Injuries 26
## 65 Dust Devil Injuries 43
## 66 Storm Surge/Tide Injuries 43
## 67 Waterspout Injuries 72
## 68 Tsunami Injuries 129
## 69 Cold/Wind Chill Injuries 60
## 70 High Surf Injuries 156
## 71 Heavy Rain Injuries 255
## 72 Dense Fog Injuries 342
## 73 Avalanche Injuries 170
## 74 Strong Wind Injuries 301
## 75 Tropical Storm Injuries 383
## 76 Dust Storm Injuries 440
## 77 Extreme Cold/Wind Chill Injuries 260
## 78 Winter Weather Injuries 538
## 79 Blizzard Injuries 805
## 80 Wildfire Injuries 911
## 81 Rip Current Injuries 529
## 82 Heavy Snow Injuries 1034
## 83 Hail Injuries 1361
## 84 Hurricane (Typhoon) Injuries 1333
## 85 Winter Storm Injuries 1353
## 86 High Wind Injuries 1471
## 87 Ice Storm Injuries 1977
## 88 Flash Flood Injuries 1785
## 89 Heat Injuries 2494
## 90 Lightning Injuries 5232
## 91 Flood Injuries 6806
## 92 Excessive Heat Injuries 6525
## 93 Thunderstorm Wind Injuries 9508
## 94 Tornado Injuries 91364
ECO
## EVCAT variable value
## 1 Marine Hail Property damages 4000
## 2 Dense Smoke Property damages 100000
## 3 Rip Current Property damages 163000
## 4 Funnel Cloud Property damages 194600
## 5 Astronomical Low Tide Property damages 320000
## 6 Marine Strong Wind Property damages 418330
## 7 Marine Thunderstorm Wind Property damages 436400
## 8 Sleet Property damages 500000
## 9 Volcanic Ash Property damages 500000
## 10 Dust Devil Property damages 719130
## 11 Seiche Property damages 980000
## 12 Marine High Wind Property damages 1297010
## 13 Tropical Depression Property damages 1737000
## 14 Freezing Fog Property damages 2182000
## 15 Avalanche Property damages 3721800
## 16 Lakeshore Flood Property damages 7540000
## 17 Dust Storm Property damages 5599000
## 18 Dense Fog Property damages 9674000
## 19 Lake-Effect Snow Property damages 40182000
## 20 Winter Weather Property damages 27298000
## 21 Waterspout Property damages 60730200
## 22 Cold/Wind Chill Property damages 2544050
## 23 High Surf Property damages 90155000
## 24 Tsunami Property damages 144062000
## 25 Strong Wind Property damages 177674240
## 26 Heat Property damages 12457050
## 27 Coastal Flood Property damages 427566060
## 28 Excessive Heat Property damages 7753700
## 29 Blizzard Property damages 659713950
## 30 Lightning Property damages 935452430
## 31 Heavy Snow Property damages 954097150
## 32 Extreme Cold/Wind Chill Property damages 77190400
## 33 Frost/Freeze Property damages 11200000
## 34 Heavy Rain Property damages 3230498140
## 35 Wildfire Property damages 4865614000
## 36 High Wind Property damages 6003356043
## 37 Winter Storm Property damages 6748997251
## 38 Tropical Storm Property damages 7714390550
## 39 Ice Storm Property damages 3944927860
## 40 Thunderstorm Wind Property damages 9970811300
## 41 Drought Property damages 1046106000
## 42 Flash Flood Property damages 17414731089
## 43 Hail Property damages 15977470013
## 44 Storm Surge/Tide Property damages 47964724000
## 45 Tornado Property damages 58552151876
## 46 Hurricane (Typhoon) Property damages 85356410010
## 47 Flood Property damages 144958136816
## 48 Marine Hail Crop damages 0
## 49 Dense Smoke Crop damages 0
## 50 Rip Current Crop damages 0
## 51 Funnel Cloud Crop damages 0
## 52 Astronomical Low Tide Crop damages 0
## 53 Marine Strong Wind Crop damages 0
## 54 Marine Thunderstorm Wind Crop damages 50000
## 55 Sleet Crop damages 0
## 56 Volcanic Ash Crop damages 0
## 57 Dust Devil Crop damages 0
## 58 Seiche Crop damages 0
## 59 Marine High Wind Crop damages 0
## 60 Tropical Depression Crop damages 0
## 61 Freezing Fog Crop damages 0
## 62 Avalanche Crop damages 0
## 63 Lakeshore Flood Crop damages 0
## 64 Dust Storm Crop damages 3600000
## 65 Dense Fog Crop damages 0
## 66 Lake-Effect Snow Crop damages 0
## 67 Winter Weather Crop damages 15000000
## 68 Waterspout Crop damages 0
## 69 Cold/Wind Chill Crop damages 66600050
## 70 High Surf Crop damages 0
## 71 Tsunami Crop damages 20000
## 72 Strong Wind Crop damages 69953500
## 73 Heat Crop damages 407061500
## 74 Coastal Flood Crop damages 56000
## 75 Excessive Heat Crop damages 492402000
## 76 Blizzard Crop damages 112060000
## 77 Lightning Crop damages 12092090
## 78 Heavy Snow Crop damages 134673100
## 79 Extreme Cold/Wind Chill Crop damages 1330023000
## 80 Frost/Freeze Crop damages 1616911000
## 81 Heavy Rain Crop damages 795752800
## 82 Wildfire Crop damages 295972800
## 83 High Wind Crop damages 686301900
## 84 Winter Storm Crop damages 32444000
## 85 Tropical Storm Crop damages 694896000
## 86 Ice Storm Crop damages 5022113500
## 87 Thunderstorm Wind Crop damages 1225458988
## 88 Drought Crop damages 13972571780
## 89 Flash Flood Crop damages 1437163150
## 90 Hail Crop damages 3026094623
## 91 Storm Surge/Tide Crop damages 855000
## 92 Tornado Crop damages 417461470
## 93 Hurricane (Typhoon) Crop damages 5516117800
## 94 Flood Crop damages 5878707950
Please note that the obtained data represent the total (not mean) damage per category. That means that events causing less damage but happening more frequently can have the same of higher impact than the rare ones causing huge damage.
The total number of health damage instances by event category was shown in fig 1.
library(ggplot2)
results=function(x, ...){
qplot(EVCAT, value, data=x, fill=variable,
geom="bar", stat="identity", xlab=NULL, ...) +
theme(axis.text.x=element_text(angle=90))
}
results(HEALTH, ylab= "Number of instances")
Fig 1. Impact of meteorological events on population health by event category. The bars represent the total number of injuries or fatal cases recorded over the period of 1950 - Nov 2011. Injuries and fatal cases components are coded by colours, as indicated by the legend.
The categories significantly differ in terms of the health damage caused. The highest number of instanced was observed for Tornado. Tornado had also the highest number of fatal cases. Other events causing high injury were Thunderstorm Wind, Excessive Heat, Flood, Lightning, Heat and Flash Flood. Heat and Excessive Heat combined together were also the second fatal case cause after Tornado.
The total property and crop damage by event category was shown in fig 2.
results(ECO, ylab="Damage in US Dollars")
Fig 2. Economical impact of meteorological events by event category. The bars represent the total damage caused over the period of 1950 - Nov 2011, measured in US Dollars. This include property damage and crop damage, as indicated by colours (compare the legend).
Also the material damage caused varies along the categories. The highest impact was observed for Flood, Hurricane (Typhoon), Tornado and Storm Surge/Tide, and was stillsignificant for Hail and Flash Flood. The damage caused by Drought was a bit lower but it caused the highest damage in crops amongst all the categories.