In this study we will analyse the economic damages and the human casualities caused by the storms in the US over a period of fifteen years (from 1996 to 2011). The goal of this document is to show that there is some severe weather have a biggest impact on the Human and on the economy but also it will give an idea about the prioritisation possible of these events. For this study we didn’t localised the events and we made a global study covering all the US based on the information provided by the NOAA (National Oceanic and Atomospheric Administration).
The raw dataset is provided by the NOAA on the data storm website and it is available here as a bz2 file that needs to be uncompressed before being used. This file is big and we enabled the cache to improve the performances before downloading and uncompressing it. Nevertheless, even we the cache enabled this operation can a long amount of time and is also dependent of the performances of the system you are using to reproduce the study.
Once the cache is enabled we can download the file and read it in a data frame.
url <- ("http://d396qusza40orc.cloudfront.net/repdata%2Fdata%2FStormData.csv.bz2")
download.file(url, 'StormData.csv.bz2', mode='wb')
noaa.storm <- read.csv(bzfile('StormData.csv.bz2'))
Once the file is downloaded, uncompressed and that the data frame is created, we can start by having a look in it.
head(noaa.storm)
## STATE__ BGN_DATE BGN_TIME TIME_ZONE COUNTY COUNTYNAME STATE
## 1 1 4/18/1950 0:00:00 0130 CST 97 MOBILE AL
## 2 1 4/18/1950 0:00:00 0145 CST 3 BALDWIN AL
## 3 1 2/20/1951 0:00:00 1600 CST 57 FAYETTE AL
## 4 1 6/8/1951 0:00:00 0900 CST 89 MADISON AL
## 5 1 11/15/1951 0:00:00 1500 CST 43 CULLMAN AL
## 6 1 11/15/1951 0:00:00 2000 CST 77 LAUDERDALE AL
## EVTYPE BGN_RANGE BGN_AZI BGN_LOCATI END_DATE END_TIME COUNTY_END
## 1 TORNADO 0 0
## 2 TORNADO 0 0
## 3 TORNADO 0 0
## 4 TORNADO 0 0
## 5 TORNADO 0 0
## 6 TORNADO 0 0
## COUNTYENDN END_RANGE END_AZI END_LOCATI LENGTH WIDTH F MAG FATALITIES
## 1 NA 0 14.0 100 3 0 0
## 2 NA 0 2.0 150 2 0 0
## 3 NA 0 0.1 123 2 0 0
## 4 NA 0 0.0 100 2 0 0
## 5 NA 0 0.0 150 2 0 0
## 6 NA 0 1.5 177 2 0 0
## INJURIES PROPDMG PROPDMGEXP CROPDMG CROPDMGEXP WFO STATEOFFIC ZONENAMES
## 1 15 25.0 K 0
## 2 0 2.5 K 0
## 3 2 25.0 K 0
## 4 2 2.5 K 0
## 5 2 2.5 K 0
## 6 6 2.5 K 0
## LATITUDE LONGITUDE LATITUDE_E LONGITUDE_ REMARKS REFNUM
## 1 3040 8812 3051 8806 1
## 2 3042 8755 0 0 2
## 3 3340 8742 0 0 3
## 4 3458 8626 0 0 4
## 5 3412 8642 0 0 5
## 6 3450 8748 0 0 6
As shown, the file is huge (37 columns, 902297 observations and 409MB of memory).
We also noticed that there is a huge amount of columns that will not be used for this study.
Because the study will located on all the country, we can avoid using the locate and state columns. The remarks and refnum is not the purpose of this document and can be ignored. Finally the most important information for us are:
We can start to create a subsets for these columns.
subset.injuries <- subset(noaa.storm, select=23:24)
subset.prop <- subset(noaa.storm, select=25:26)
subset.crop <- subset(noaa.storm, select=27:28)
subset.date <- subset(noaa.storm, select=2)
subset.event <- subset(noaa.storm, select=8)
Once it is over we can recompile all these subset into a new dataset and rename the columns.
noaa.storm2 <- cbind(subset.date, subset.event, subset.injuries, subset.prop, subset.crop)
colnames(noaa.storm2) <- c("DATE", "EVENT", "FATALITIES", "INJURIES", "PROPDMG", "PROPDMGEXP", "CROPDMG", "CROPDMGEXP")
Now we have a dataset with a reduced number of columns.
head(noaa.storm2)
## DATE EVENT FATALITIES INJURIES PROPDMG PROPDMGEXP
## 1 4/18/1950 0:00:00 TORNADO 0 15 25.0 K
## 2 4/18/1950 0:00:00 TORNADO 0 0 2.5 K
## 3 2/20/1951 0:00:00 TORNADO 0 2 25.0 K
## 4 6/8/1951 0:00:00 TORNADO 0 2 2.5 K
## 5 11/15/1951 0:00:00 TORNADO 0 2 2.5 K
## 6 11/15/1951 0:00:00 TORNADO 0 6 2.5 K
## CROPDMG CROPDMGEXP
## 1 0
## 2 0
## 3 0
## 4 0
## 5 0
## 6 0
As noted on the NOAA Storm Event website, the data were recorded since 1950 but the recording of the 48 standard events (cf. Directive 10-1605) started in 1996, this means that everything recorded before could contain any type of event. For this reason we decided not to use the data between 1950 and 1996 and to filter the event with the 48 standard events. First we made the date filtering. To do that we used the lubridate library (This library is available only for R ver. 3.0.0 or above)
library(lubridate)
noaa.storm2 <- noaa.storm2[year(as.Date(noaa.storm2[,1], "%m/%d/%Y")) > year(as.Date("31/12/1995", "%d/%m/%Y")),]
head(noaa.storm2)
## DATE EVENT FATALITIES INJURIES PROPDMG
## 248768 1/6/1996 0:00:00 WINTER STORM 0 0 380
## 248769 1/11/1996 0:00:00 TORNADO 0 0 100
## 248770 1/11/1996 0:00:00 TSTM WIND 0 0 3
## 248771 1/11/1996 0:00:00 TSTM WIND 0 0 5
## 248772 1/11/1996 0:00:00 TSTM WIND 0 0 2
## 248773 1/18/1996 0:00:00 HAIL 0 0 0
## PROPDMGEXP CROPDMG CROPDMGEXP
## 248768 K 38 K
## 248769 K 0
## 248770 K 0
## 248771 K 0
## 248772 K 0
## 248773 0
Once this is over we can now filter by the event. The event are recorder either is lower case or in upper case. To keep the information coherent and to ease the filtering, we convert all the event in upper case.
noaa.storm2[,2] <- sapply(noaa.storm2[,2], toupper)
Based on the size of the dataset, it is very hard to verify if the toupper succeeded. We can use a regular expression (a.k.a. regex) to confirm.
grep("[a-z]", noaa.storm2[,2], value=T, perl=T)
## character(0)
We used another regexp to filter the data. Some names start with a whitespace so we trim the string.
noaa.storm2[,2] <- gsub("^\\s+", "", noaa.storm2[,2], perl=T)
A look in the event list (cf. pdf document above) will shoow that there is some events which can have two names (HURRICANE/TYPHOON for example) but they recorded as the same event, so it hads been decided to keep the first name in the list and to convert the second (TYPHOON will become HURRICANE in our example). And also some obvious accornyms were replaced by their full name (TSTM is THUNDERSTORM).
noaa.storm2[,2] <- gsub("^TSTM", "THUNDERSTORM", noaa.storm2[,2], perl=T)
noaa.storm2[,2] <- gsub("^TYPHOON", "HURRICANE", noaa.storm2[,2], perl=T)
noaa.storm2[,2] <- gsub("^TIDE", "STORM SURGE", noaa.storm2[,2], perl=T)
noaa.storm2[,2] <- gsub("^FREEZE", "FROST", noaa.storm2[,2], perl=T)
After checking the event in noaa.storm2, we noticed there was events names that were close to the standard name but there was trailing characters. We will remove the trailing characters of the standard events.
To do that we will change directly the character at the end of the name.
noaa.storm2[,2] <- gsub("^BLIZZARD.+", "BLIZZARD", noaa.storm2[,2], perl=T)
noaa.storm2[,2] <- gsub("^COASTAL FLOOD.+", "COASTAL FLOOD", noaa.storm2[,2], perl=T)
noaa.storm2[,2] <- gsub("^COLD.+", "COLD", noaa.storm2[,2], perl=T)
noaa.storm2[,2] <- gsub("^EXCESSIVE HEAT.+", "EXCESSIVE HEAT", noaa.storm2[,2], perl=T)
noaa.storm2[,2] <- gsub("^EXTREME COLD.+", "EXTREME COLD", noaa.storm2[,2], perl=T)
noaa.storm2[,2] <- gsub("^FLASH FLOOD.+", "FLASH FLOOD", noaa.storm2[,2], perl=T)
noaa.storm2[,2] <- gsub("^FLOOD.+", "FLOOD", noaa.storm2[,2], perl=T)
noaa.storm2[,2] <- gsub("^FROST.+", "FROST", noaa.storm2[,2], perl=T)
noaa.storm2[,2] <- gsub("^FUNNEL CLOUD.+", "FUNNEL CLOUD", noaa.storm2[,2], perl=T)
noaa.storm2[,2] <- gsub("^HAIL.+", "HAIL", noaa.storm2[,2], perl=T)
noaa.storm2[,2] <- gsub("^HEAT.+", "HEAT", noaa.storm2[,2], perl=T)
noaa.storm2[,2] <- gsub("^HEAVY RAIN.+", "HEAVY RAIN", noaa.storm2[,2], perl=T)
noaa.storm2[,2] <- gsub("^HEAVY SNOW.+", "HEAVY SNOW", noaa.storm2[,2], perl=T)
noaa.storm2[,2] <- gsub("^HIGH SURF.+", "HIGH SURF", noaa.storm2[,2], perl=T)
noaa.storm2[,2] <- gsub("^HIGH WIND.+", "HIGH WIND", noaa.storm2[,2], perl=T)
noaa.storm2[,2] <- gsub("^HURRICANE.+", "HURRICANE", noaa.storm2[,2], perl=T)
noaa.storm2[,2] <- gsub("^RIP CURRENT.+", "RIP CURRENT", noaa.storm2[,2], perl=T)
noaa.storm2[,2] <- gsub("^SLEET.+", "SLEET", noaa.storm2[,2], perl=T)
noaa.storm2[,2] <- gsub("^STORM SURGE.+", "STORM SURGE", noaa.storm2[,2], perl=T)
noaa.storm2[,2] <- gsub("^STRONG WIND.+", "STRONG WIND", noaa.storm2[,2], perl=T)
noaa.storm2[,2] <- gsub("^VOLCANIC ASH.+", "VOLCANIC ASH", noaa.storm2[,2], perl=T)
noaa.storm2[,2] <- gsub("^WATERSPOUT.+", "WATERSPOUT", noaa.storm2[,2], perl=T)
noaa.storm2[,2] <- gsub("^WINTER WEATHER.+", "WINTER WEATHER", noaa.storm2[,2], perl=T)
noaa.storm2[,2] <- gsub("^TORNADO.+", "TORNADO", noaa.storm2[,2], perl=T)
noaa.storm2[,2] <- gsub("^THUNDERSTORM WIND.+", "THUNDERSTORM WIND", noaa.storm2[,2], perl=T)
And finally we created two character vectors, one with the standard event names and one with the other names.
event.std <- c("ASTRONOMICAL LOW TIDE", "AVALANCHE",
"BLIZZARD", "COASTAL FLOOD",
"COLD", "DEBRIS",
"DENSE FOG", "DENSE SMOKE",
"DROUGHT", "DUST DEVIL",
"DUST STORM", "EXCESSIVE HEAT",
"EXTREME COLD", "FLASH FLOOD",
"FLOOD", "FROST",
"FUNNEL", "FREEZING FOG",
"HAIL", "HEAT",
"HEAVY RAIN", "HEAVY SNOW",
"HIGH SURF", "HIGH WIND",
"HURRICANE", "ICE STORM",
"LAKE EFFECT SNOW",
"LAKESHORE FLOOD",
"LIGHTNING", "MARINE HAIL",
"MARINE HIGH WIND", "MARINE STRONG WIND",
"MARINE THUNDERSTORM WIND", "RIP CURRENT",
"SEICHE", "SLEET",
"STORM SURGE", "STRONG WIND",
"THUNDERSTORM WIND", "TORNADO",
"TROPICAL DEPRESSION",
"TROPICAL STORM",
"TSUNAMI", "VOLCANIC ASH",
"WATERSPOUT", "WILDFIRE",
"WINTER STORM",
"WINTER WEATHER")
We use this vector to filter one more time noaa.storm2 and to remove all the non-standard names.
noaa.storm2 <- noaa.storm2[noaa.storm2[,2] %in% event.std,]
This operation has a few impact on the dataset because the size of the new noaa.storm2 is 96% of the previous size.
The next step is to clean the PROPDMGEXP and CROPDMGEXP columns.
The NOAA recommend to give the damages with a number that represent the estimate property damage given in dollars. This value is split in two parts, the value itslef (PROPDMG or CROPDMG) and a multiplicator of the value of PROPDMG and CROPDMG.
* K = 1000 (10^3) * M = 1000000 (10^6) * B = 1000000000 (10^9)
Before 1992 these value for this data were different and was recorded as a number between 0-9 with:
* 0 = Data not provided * [1-9] = A range of estimate property or crop damage in dollars (ex: 1 = $50000 to $500000)
We decided not to use this values if we find them in the dataset. Actually this way of noted stopped in 1992 and even if we can find some tracks until 1995 we should not have to worry too much about this problem.
To verify we used two regex and we store the return values in a list
prop.NC <- grep("[0-9,h,H,+,-,?]", noaa.storm2$PROPDMGEXP, perl=T)
crop.NC <- grep("[0-9,h,H,+,-,?]", noaa.storm2$CROPDMGEXP, perl=T)
head(prop.NC)
## [1] 617034
head(crop.NC)
## integer(0)
And we verified that thers is no empty values in the column and if there is we will store them in an list.
prop.NA <- grep("^$", noaa.storm2[,6], perl=T)
crop.NA <- grep("^$", noaa.storm2[,8], perl=T)
head(prop.NA)
## [1] 6 11 14 28 29 32
head(crop.NA)
## [1] 2 3 4 5 6 7
There is a lot of empty EXP in both crop and prop. We decided not to ignore them but to set their value to 0.
This will not change the final value the operations are only addition and multiplication and it has also the advantage to keep the event. After all we can’t estimate the amount of money but the event occurred nevertheless. Note also that we don’t need to remove the row 617034 because it is already set to 0.
noaa.storm2[,6] <- sub("^$", 0, noaa.storm2[,6], perl=T)
noaa.storm2[,8] <- sub("^$", 0, noaa.storm2[,8], perl=T)
There is not so much to do on these columns. The data are filled correctly and ther is no alphabetic character.
grep("[a-z,A-Z]", noaa.storm2[,4])
## integer(0)
grep("[a-z,A-Z]", noaa.storm2[,3])
## integer(0)
In conlusion we cleaned the dataset and now we have a dataset of 630847 observations (69% of the original size) with all the data correctly completed and accurrate.
The study of the data will done in two phases, first we will work on the Human casualities and show if or what event has a bigger impact on injuries and fatalities. And second we will do the same operation for the damage to the prop and crop.
The results will be finally summarized in a graph.
The results will be displayed in a table. The casualities data were first extracted and summed from the main dataset created above (i.e. noaa.storm2). We will then sum the casualities per events.
noaa.casualities <- data.frame(noaa.storm2$INJURIES, noaa.storm2$FATALITIES)
temp.casualities <- as.data.frame(apply(noaa.casualities, 1, sum))
temp.casualities <- cbind(noaa.storm2$EVENT, temp.casualities)
casualities.per.event <- as.data.frame(tapply(as.numeric(temp.casualities[,2]), temp.casualities[,1], sum))
Once this is done, we repeat the operation for the injuries and for the fatalities.
noaa.injuries <- data.frame(noaa.storm2$EVENT, noaa.storm2$INJURIES)
injuries.per.event <- as.data.frame(tapply(as.numeric(noaa.injuries[,2]), noaa.injuries[,1], sum))
noaa.fatalities <- data.frame(noaa.storm2$EVENT, noaa.storm2$FATALITIES)
fatalities.per.event <- as.data.frame(tapply(as.numeric(noaa.fatalities[,2]), noaa.fatalities[,1], sum))
Now we can create a new data frame with all the information.
noaa.casualities <- cbind(injuries.per.event, fatalities.per.event, casualities.per.event)
colnames(noaa.casualities) <- c("INJURIES", "FATALITIES", "TOTAL" )
The resuslts can now be presented.
library(xtable)
casualities.table <- xtable(noaa.casualities, caption=c("Fatalities And Injury"))
ltable = print(casualities.table, file="",
latex.environment="center")
% latex table generated in R 3.1.1 by xtable 1.7-4 package % Sun May 24 23:54:11 2015
ltable = sub("\\begin{center}\n", "\\centering\n", ltable, fixed=TRUE)
ltable = sub("\\end{center}\n", "\n", ltable, fixed=TRUE)
ltable = sub("\\begin{tabular}",
"\\rowcolors{2}{gray!25}{white}\n\\begin{tabular}",
ltable, fixed=TRUE)
print(casualities.table, type="html")
INJURIES | FATALITIES | TOTAL | |
---|---|---|---|
ASTRONOMICAL LOW TIDE | 0.00 | 0.00 | 0.00 |
AVALANCHE | 156.00 | 223.00 | 379.00 |
BLIZZARD | 385.00 | 70.00 | 455.00 |
COASTAL FLOOD | 7.00 | 6.00 | 13.00 |
COLD | 24.00 | 131.00 | 155.00 |
DENSE FOG | 143.00 | 9.00 | 152.00 |
DENSE SMOKE | 0.00 | 0.00 | 0.00 |
DROUGHT | 4.00 | 0.00 | 4.00 |
DUST DEVIL | 39.00 | 2.00 | 41.00 |
DUST STORM | 376.00 | 11.00 | 387.00 |
EXCESSIVE HEAT | 6391.00 | 1797.00 | 8188.00 |
EXTREME COLD | 103.00 | 240.00 | 343.00 |
FLASH FLOOD | 1674.00 | 887.00 | 2561.00 |
FLOOD | 6758.00 | 414.00 | 7172.00 |
FREEZING FOG | 0.00 | 0.00 | 0.00 |
FROST | 3.00 | 1.00 | 4.00 |
HAIL | 713.00 | 7.00 | 720.00 |
HEAT | 1292.00 | 237.00 | 1529.00 |
HEAVY RAIN | 230.00 | 94.00 | 324.00 |
HEAVY SNOW | 700.00 | 107.00 | 807.00 |
HIGH SURF | 150.00 | 90.00 | 240.00 |
HIGH WIND | 1083.00 | 235.00 | 1318.00 |
HURRICANE | 1328.00 | 125.00 | 1453.00 |
ICE STORM | 318.00 | 82.00 | 400.00 |
LAKE EFFECT SNOW | 0.00 | 0.00 | 0.00 |
LAKESHORE FLOOD | 0.00 | 0.00 | 0.00 |
LIGHTNING | 4141.00 | 651.00 | 4792.00 |
MARINE HAIL | 0.00 | 0.00 | 0.00 |
MARINE HIGH WIND | 1.00 | 1.00 | 2.00 |
MARINE STRONG WIND | 22.00 | 14.00 | 36.00 |
MARINE THUNDERSTORM WIND | 26.00 | 10.00 | 36.00 |
RIP CURRENT | 503.00 | 542.00 | 1045.00 |
SEICHE | 0.00 | 0.00 | 0.00 |
SLEET | 0.00 | 0.00 | 0.00 |
STORM SURGE | 42.00 | 13.00 | 55.00 |
STRONG WIND | 299.00 | 110.00 | 409.00 |
THUNDERSTORM WIND | 5128.00 | 378.00 | 5506.00 |
TORNADO | 20667.00 | 1511.00 | 22178.00 |
TROPICAL DEPRESSION | 0.00 | 0.00 | 0.00 |
TROPICAL STORM | 338.00 | 57.00 | 395.00 |
TSUNAMI | 129.00 | 33.00 | 162.00 |
VOLCANIC ASH | 0.00 | 0.00 | 0.00 |
WATERSPOUT | 2.00 | 2.00 | 4.00 |
WILDFIRE | 911.00 | 75.00 | 986.00 |
WINTER STORM | 1292.00 | 191.00 | 1483.00 |
WINTER WEATHER | 483.00 | 61.00 | 544.00 |
and we can summarize the result in a bar plot drawn in decreasing order.
noaa.decreasing <- sort(noaa.casualities[,3], decreasing=T)
barplot(noaa.decreasing, col=rainbow(48), xlab="Events Over A 15 Years Period (from more lethal to less lethal)", ylab="Number Of Casualities", xaxt="n")
legend("topright", legend=rownames(noaa.decreasing), fill=rainbow(48), ncol=4, cex=0.65)
#axis(1, srt=2, at=rownam, labels=rownames(noaa.decreasing))
As we see here, the tornaodoes are the most lethal event referenced in this dataset over a period of fifteen years from 1996 to 2011.
The economic impact of the severe weather is mesured in two parts, the damages done to properties and the damage done to the crop. For each damage, the result is given in an amount in dollars ($).
As said before, the amount is split among two columns in the data frame, (C/P)ROPDMG and (C/P)ROPDMGEXP. To get a complete picture of the values, we need first to concatenate these columns for each type of damage (crop or prop) and the value of the EXP column converted in numeric.
We will create a function that will dynamically change the value of EXP in crop and prop data frame.
change.exp <- function(x, type="") {
noaa.exp2 <- x
noaa.exp2[,2] <- gsub("K", 1000, noaa.exp2[,2], perl=T)
noaa.exp2[,2] <- gsub("M", 1000000, noaa.exp2[,2], perl=T)
noaa.exp2[,2] <- gsub("B", 1000000000, noaa.exp2[,2], perl=T)
return(noaa.exp2)
}
Once this is done, we apply this function to the data frames.
exp <- subset(noaa.storm2, select=5:6)
exp.prop <- as.matrix(change.exp(exp, "prop"))
exp <- subset(noaa.storm2, select=7:8)
exp.crop <- as.matrix(change.exp(exp, "crop"))
We multiply the value of DMG per the value of EXP for both data frame and we add the event to the two data frames.
exp.prop <- as.data.frame(apply(exp.prop, 1, function(x) as.numeric(x[1])*as.numeric(x[2])))
exp.crop <- as.data.frame(apply(exp.crop, 1, function(x) as.numeric(x[1])*as.numeric(x[2])))
exp.prop <- cbind (noaa.storm2$EVENT, exp.prop)
colnames(exp.prop) <- c("EVENT", "PROPDMG")
exp.crop <- cbind(noaa.storm2$EVENT, exp.crop)
colnames(exp.crop) <- c("EVENT", "CROPDMG")
once we have he data frames set, we sum the columns per event and we build the dataset for the total.
propdmg.per.event <- as.data.frame(tapply(as.numeric(exp.prop[,2]), exp.prop[,1], sum))
cropdmg.per.event <- as.data.frame(tapply(as.numeric(exp.crop[,2]), exp.crop[,1], sum))
dmg.total.temp <- cbind(propdmg.per.event, cropdmg.per.event)
And finally we will build the total data frame with all the columns and names.
dmg.total.per.event <- as.data.frame(apply(dmg.total.temp, 1, sum))
dmg.total <- cbind(propdmg.per.event, cropdmg.per.event, dmg.total.per.event)
dmg.total <- dmg.total[order(-dmg.total[,3]),,drop=F]
finally we divided the result by 1000 to have a scale in M$.
dmg.exp.total <- apply(dmg.total, 1, function (x) x[3]/1000000)
And we release the results in a table.
colnames(dmg.total) <- c("PROPERTIES", "CROP", "TOTAL")
dmg.table <- xtable(dmg.total, caption=c("Properties And Crop Damages In Dollars"))
ltable = print(dmg.table, file="",
latex.environment="center")
% latex table generated in R 3.1.1 by xtable 1.7-4 package % Sun May 24 23:54:23 2015
ltable = sub("\\begin{center}\n", "\\centering\n", ltable, fixed=TRUE)
ltable = sub("\\end{center}\n", "\n", ltable, fixed=TRUE)
ltable = sub("\\begin{tabular}",
"\\rowcolors{2}{gray!25}{white}\n\\begin{tabular}",
ltable, fixed=TRUE)
print(dmg.table, type="html")
PROPERTIES | CROP | TOTAL | |
---|---|---|---|
FLOOD | 143944843550.00 | 4974778400.00 | 148919621950.00 |
HURRICANE | 81718889010.00 | 5350107800.00 | 87068996810.00 |
STORM SURGE | 47834724000.00 | 855000.00 | 47835579000.00 |
TORNADO | 24616945710.00 | 283425010.00 | 24900370720.00 |
HAIL | 14595143420.00 | 2476029450.00 | 17071172870.00 |
FLASH FLOOD | 15222258910.00 | 1334901700.00 | 16557160610.00 |
DROUGHT | 1046101000.00 | 13367566000.00 | 14413667000.00 |
THUNDERSTORM WIND | 7913555880.00 | 1016942600.00 | 8930498480.00 |
TROPICAL STORM | 7642475550.00 | 677711000.00 | 8320186550.00 |
HIGH WIND | 5248378360.00 | 633561300.00 | 5881939660.00 |
WILDFIRE | 4758667000.00 | 295472800.00 | 5054139800.00 |
ICE STORM | 3642248810.00 | 15660000.00 | 3657908810.00 |
WINTER STORM | 1532743250.00 | 11944000.00 | 1544687250.00 |
EXTREME COLD | 28408400.00 | 1309023000.00 | 1337431400.00 |
HEAVY RAIN | 598364440.00 | 729669800.00 | 1328034240.00 |
FROST | 10695000.00 | 1250911000.00 | 1261606000.00 |
LIGHTNING | 743077080.00 | 6898440.00 | 749975520.00 |
HEAVY SNOW | 634427540.00 | 71122100.00 | 705549640.00 |
BLIZZARD | 525658950.00 | 7060000.00 | 532718950.00 |
EXCESSIVE HEAT | 7723700.00 | 492402000.00 | 500125700.00 |
COASTAL FLOOD | 375239560.00 | 0.00 | 375239560.00 |
STRONG WIND | 176994240.00 | 64953500.00 | 241947740.00 |
TSUNAMI | 144062000.00 | 20000.00 | 144082000.00 |
HIGH SURF | 84104500.00 | 0.00 | 84104500.00 |
WINTER WEATHER | 27298000.00 | 15000000.00 | 42298000.00 |
DUST STORM | 5474000.00 | 3100000.00 | 8574000.00 |
LAKESHORE FLOOD | 7540000.00 | 0.00 | 7540000.00 |
DENSE FOG | 7319000.00 | 0.00 | 7319000.00 |
WATERSPOUT | 5730200.00 | 0.00 | 5730200.00 |
AVALANCHE | 3711800.00 | 0.00 | 3711800.00 |
COLD | 2544000.00 | 600000.00 | 3144000.00 |
FREEZING FOG | 2182000.00 | 0.00 | 2182000.00 |
TROPICAL DEPRESSION | 1737000.00 | 0.00 | 1737000.00 |
HEAT | 1520000.00 | 176500.00 | 1696500.00 |
MARINE HIGH WIND | 1297010.00 | 0.00 | 1297010.00 |
SEICHE | 980000.00 | 0.00 | 980000.00 |
DUST DEVIL | 663630.00 | 0.00 | 663630.00 |
VOLCANIC ASH | 500000.00 | 0.00 | 500000.00 |
MARINE THUNDERSTORM WIND | 436400.00 | 50000.00 | 486400.00 |
MARINE STRONG WIND | 418330.00 | 0.00 | 418330.00 |
ASTRONOMICAL LOW TIDE | 320000.00 | 0.00 | 320000.00 |
RIP CURRENT | 163000.00 | 0.00 | 163000.00 |
DENSE SMOKE | 100000.00 | 0.00 | 100000.00 |
LAKE EFFECT SNOW | 67000.00 | 0.00 | 67000.00 |
MARINE HAIL | 4000.00 | 0.00 | 4000.00 |
SLEET | 0.00 | 0.00 | 0.00 |
and we draw the same kind of bar plot than the previous one.
legend.dmg <- as.data.frame(dmg.exp.total)
barplot(dmg.exp.total, col=rainbow(48), xlab="Economic Impact Over A 15 Years Period (from more expensive to less)", ylab="Damage Amount in Million of dollars", cex.names=0.5, xaxt="n")
legend("topright", legend=rownames(legend.dmg), fill=rainbow(48), ncol=4, cex=0.65)