The following document analyzes the consequences of natural disasters on US population in terms of fatality, and on US economy in terms of the most expensive disasters. This analysis can be used to allocate funds accordingly. More specifially, it answers the following two questions:
Across the United States, which types of events (as indicated in the EVTYPE variable) are most harmful with respect to population health?
Across the United States, which types of events have the greatest economic consequences?
The data is downloaded from the coursera website (https://class.coursera.org/repdata-014/human_grading/view/courses/973515/assessments/4/submissions) under the title “Data”. The data is moved to the working directory and unzipped outside R-studio.
#Assuming that the data is in the current working directory and is unzipped
data <- read.csv("repdata-data-StormData.csv")
After the data is loaded, it is a good idea to look at the data briefly to familiarize ourselves with the data, and know if there are any obvious pitfalls. This is only a very brief analysis.
str(data)
## 'data.frame': 902297 obs. of 37 variables:
## $ STATE__ : num 1 1 1 1 1 1 1 1 1 1 ...
## $ BGN_DATE : Factor w/ 16335 levels "1/1/1966 0:00:00",..: 6523 6523 4242 11116 2224 2224 2260 383 3980 3980 ...
## $ BGN_TIME : Factor w/ 3608 levels "00:00:00 AM",..: 272 287 2705 1683 2584 3186 242 1683 3186 3186 ...
## $ TIME_ZONE : Factor w/ 22 levels "ADT","AKS","AST",..: 7 7 7 7 7 7 7 7 7 7 ...
## $ COUNTY : num 97 3 57 89 43 77 9 123 125 57 ...
## $ COUNTYNAME: Factor w/ 29601 levels "","5NM E OF MACKINAC BRIDGE TO PRESQUE ISLE LT MI",..: 13513 1873 4598 10592 4372 10094 1973 23873 24418 4598 ...
## $ STATE : Factor w/ 72 levels "AK","AL","AM",..: 2 2 2 2 2 2 2 2 2 2 ...
## $ EVTYPE : Factor w/ 985 levels " HIGH SURF ADVISORY",..: 834 834 834 834 834 834 834 834 834 834 ...
## $ BGN_RANGE : num 0 0 0 0 0 0 0 0 0 0 ...
## $ BGN_AZI : Factor w/ 35 levels ""," N"," NW",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ BGN_LOCATI: Factor w/ 54429 levels "","- 1 N Albion",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ END_DATE : Factor w/ 6663 levels "","1/1/1993 0:00:00",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ END_TIME : Factor w/ 3647 levels ""," 0900CST",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ COUNTY_END: num 0 0 0 0 0 0 0 0 0 0 ...
## $ COUNTYENDN: logi NA NA NA NA NA NA ...
## $ END_RANGE : num 0 0 0 0 0 0 0 0 0 0 ...
## $ END_AZI : Factor w/ 24 levels "","E","ENE","ESE",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ END_LOCATI: Factor w/ 34506 levels "","- .5 NNW",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ LENGTH : num 14 2 0.1 0 0 1.5 1.5 0 3.3 2.3 ...
## $ WIDTH : num 100 150 123 100 150 177 33 33 100 100 ...
## $ F : int 3 2 2 2 2 2 2 1 3 3 ...
## $ MAG : num 0 0 0 0 0 0 0 0 0 0 ...
## $ FATALITIES: num 0 0 0 0 0 0 0 0 1 0 ...
## $ INJURIES : num 15 0 2 2 2 6 1 0 14 0 ...
## $ PROPDMG : num 25 2.5 25 2.5 2.5 2.5 2.5 2.5 25 25 ...
## $ PROPDMGEXP: Factor w/ 19 levels "","-","?","+",..: 17 17 17 17 17 17 17 17 17 17 ...
## $ CROPDMG : num 0 0 0 0 0 0 0 0 0 0 ...
## $ CROPDMGEXP: Factor w/ 9 levels "","?","0","2",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ WFO : Factor w/ 542 levels ""," CI","$AC",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ STATEOFFIC: Factor w/ 250 levels "","ALABAMA, Central",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ ZONENAMES : Factor w/ 25112 levels ""," "| __truncated__,..: 1 1 1 1 1 1 1 1 1 1 ...
## $ LATITUDE : num 3040 3042 3340 3458 3412 ...
## $ LONGITUDE : num 8812 8755 8742 8626 8642 ...
## $ LATITUDE_E: num 3051 0 0 0 0 ...
## $ LONGITUDE_: num 8806 0 0 0 0 ...
## $ REMARKS : Factor w/ 436774 levels "","-2 at Deer Park\n",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ REFNUM : num 1 2 3 4 5 6 7 8 9 10 ...
head(data, n=10)
## 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
## 7 1 11/16/1951 0:00:00 0100 CST 9 BLOUNT AL
## 8 1 1/22/1952 0:00:00 0900 CST 123 TALLAPOOSA AL
## 9 1 2/13/1952 0:00:00 2000 CST 125 TUSCALOOSA AL
## 10 1 2/13/1952 0:00:00 2000 CST 57 FAYETTE 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
## 7 TORNADO 0 0
## 8 TORNADO 0 0
## 9 TORNADO 0 0
## 10 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
## 7 NA 0 1.5 33 2 0 0
## 8 NA 0 0.0 33 1 0 0
## 9 NA 0 3.3 100 3 0 1
## 10 NA 0 2.3 100 3 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
## 7 1 2.5 K 0
## 8 0 2.5 K 0
## 9 14 25.0 K 0
## 10 0 25.0 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
## 7 3405 8631 0 0 7
## 8 3255 8558 0 0 8
## 9 3334 8740 3336 8738 9
## 10 3336 8738 3337 8737 10
tail(data, n=10)
## STATE__ BGN_DATE BGN_TIME TIME_ZONE COUNTY
## 902288 8 11/5/2011 0:00:00 03:00:00 AM MST 17
## 902289 48 11/28/2011 0:00:00 03:30:00 AM CST 250
## 902290 8 11/12/2011 0:00:00 09:00:00 PM MST 73
## 902291 28 11/28/2011 0:00:00 03:00:00 PM CST 3
## 902292 47 11/28/2011 0:00:00 03:00:00 PM CST 21
## 902293 56 11/30/2011 0:00:00 10:30:00 PM MST 7
## 902294 30 11/10/2011 0:00:00 02:48:00 PM MST 9
## 902295 2 11/8/2011 0:00:00 02:58:00 PM AKS 213
## 902296 2 11/9/2011 0:00:00 10:21:00 AM AKS 202
## 902297 1 11/28/2011 0:00:00 08:00:00 PM CST 6
## COUNTYNAME STATE EVTYPE BGN_RANGE
## 902288 COZ012 - 017 CO WINTER WEATHER 0
## 902289 TXZ248 - 250 TX FROST/FREEZE 0
## 902290 COZ062 - 073 - 075 - 087 CO HIGH WIND 0
## 902291 MSZ001 - 003 MS WINTER WEATHER 0
## 902292 TNZ001>004 - 019>021 - 048>055 - 088 TN WINTER WEATHER 0
## 902293 WYZ007 - 017 WY HIGH WIND 0
## 902294 MTZ009 - 010 MT HIGH WIND 0
## 902295 AKZ213 AK HIGH WIND 0
## 902296 AKZ202 AK BLIZZARD 0
## 902297 ALZ006 AL HEAVY SNOW 0
## BGN_AZI BGN_LOCATI END_DATE END_TIME COUNTY_END
## 902288 11/6/2011 0:00:00 06:00:00 AM 0
## 902289 11/28/2011 0:00:00 08:00:00 AM 0
## 902290 11/13/2011 0:00:00 08:00:00 AM 0
## 902291 11/29/2011 0:00:00 12:00:00 PM 0
## 902292 11/29/2011 0:00:00 12:00:00 PM 0
## 902293 11/30/2011 0:00:00 10:30:00 PM 0
## 902294 11/10/2011 0:00:00 02:48:00 PM 0
## 902295 11/9/2011 0:00:00 01:15:00 PM 0
## 902296 11/9/2011 0:00:00 05:00:00 PM 0
## 902297 11/29/2011 0:00:00 04:00:00 AM 0
## COUNTYENDN END_RANGE END_AZI END_LOCATI LENGTH WIDTH F MAG
## 902288 NA 0 0 0 NA 0
## 902289 NA 0 0 0 NA 0
## 902290 NA 0 0 0 NA 65
## 902291 NA 0 0 0 NA 0
## 902292 NA 0 0 0 NA 0
## 902293 NA 0 0 0 NA 66
## 902294 NA 0 0 0 NA 52
## 902295 NA 0 0 0 NA 81
## 902296 NA 0 0 0 NA 0
## 902297 NA 0 0 0 NA 0
## FATALITIES INJURIES PROPDMG PROPDMGEXP CROPDMG CROPDMGEXP WFO
## 902288 0 0 0 K 0 K GJT
## 902289 0 0 0 K 0 K BRO
## 902290 0 0 0 K 0 K PUB
## 902291 0 0 0 K 0 K MEG
## 902292 0 0 0 K 0 K MEG
## 902293 0 0 0 K 0 K RIW
## 902294 0 0 0 K 0 K TFX
## 902295 0 0 0 K 0 K AFG
## 902296 0 0 0 K 0 K AFG
## 902297 0 0 0 K 0 K HUN
## STATEOFFIC
## 902288 COLORADO, West
## 902289 TEXAS, South
## 902290 COLORADO, South Central and Southeast
## 902291 MISSISSIPPI, North
## 902292 TENNESSEE, West
## 902293 WYOMING, Central and West
## 902294 MONTANA, Central
## 902295 ALASKA, Northern
## 902296 ALASKA, Northern
## 902297 ALABAMA, North
## ZONENAMES
## 902288 WEST ELK AND SAWATCH MOUNTAINS - WEST ELK AND SAWATCH MOUNTAINS - UNCOMPAHGRE PLATEAU AND DALLAS
## 902289 ZAPATA - ZAPATA - BROOKS
## 902290 CENTRAL CHAFFEE COUNTY BELOW 9 - CENTRAL CHAFFEE COUNTY BELOW 9 - NORTHERN SANGRE DE CRISTO MOUN - SOUTHERN SANGRE DE CRISTO MOUN - WALSENBURG VICINITY / UPPER HU
## 902291 DE SOTO - DE SOTO - BENTON
## 902292 LAKE - LAKE - OBION - WEAKLEY - HENRY - DYER - GIBSON - CARROLL - LAUDERDALE - TIPTON - HAYWOOD - CROCKETT - MADISON - CHESTER - HENDERSON - DECATUR - SHELBY
## 902293 OWL CREEK & BRIDGER MOUNTAINS - OWL CREEK & BRIDGER MOUNTAINS - WIND RIVER BASIN
## 902294 NORTH ROCKY MOUNTAIN FRONT - NORTH ROCKY MOUNTAIN FRONT - EASTERN GLACIER
## 902295 ST LAWRENCE IS. BERING STRAIT - ST LAWRENCE IS. BERING STRAIT
## 902296 NORTHERN ARCTIC COAST - NORTHERN ARCTIC COAST
## 902297 MADISON - MADISON
## LATITUDE LONGITUDE LATITUDE_E LONGITUDE_
## 902288 0 0 0 0
## 902289 0 0 0 0
## 902290 0 0 0 0
## 902291 0 0 0 0
## 902292 0 0 0 0
## 902293 0 0 0 0
## 902294 0 0 0 0
## 902295 0 0 0 0
## 902296 0 0 0 0
## 902297 0 0 0 0
## REMARKS
## 902288 EPISODE NARRATIVE: A strong Pacific trough produced significant to heavy snowfall in the mountains and some lower elevation areas of western Colorado.EVENT NARRATIVE: Snowfall ranged from 5 to 12 inches above the 8000 foot level. Wind gusts of 25 to 45 mph produced areas of blowing and drifting snow.
## 902289 EPISODE NARRATIVE: A true blue norther drove pure Canadian high pressure directly into South Texas and northern Mexico, beginning on November 27th and continuing through early on the 29th before the high drifted into the southeast U.S. Extremely dry and relatively chilly air invaded Deep South Texas and the Rio Grande Valley; temperatures bottomed out in the mid 20s to lower 30s for all but the southeast corner of the Rio Grande Valley on the 28th.\n\nThe event was a rare dry freeze, as humidity through the coldest periods remained below 50 percent. Ambient temperatures varied greatly depending on the height of the sensor taking the measurements. At eye level, temperatures fell to or just below freezing in many areas, but remained a few degrees above freezing in others. Just above the ground, and in wind protected hollows, temperatures fell into the 20s; local hard freezes, defined as 2 or more hours with temperatures below 28 degrees, likely occurred. Agricultural damage was not known as of this writing.EVENT NARRATIVE: Temperatures fell below freezing in wind protected areas, including Falfurrias, between 3 and 4 AM and continued until 8 AM on the 28th. Minimum temperature at the Hollywood Hunting Camp, 3.5 miles west of Falfurrias, dipped to 26 degrees between 7 and 8 AM. Temperatures in non wind protected areas only fell into the mid 30s, including Brooks County Airport (2 miles southeast of Falfurrias).
## 902290 EPISODE NARRATIVE: A strong storm system centered over northern Colorado produced widespread damaging winds...in excess of 100 mph at times...over south central and southeast Colorado. There were widespread power outages and damage...especially over sections of Custer and Las Animas Counties. Custer County was under a state of emergency for a time. Numerous trees and power lines were blown down. In addition...sheds and barns were destroyed...a few cars were damaged or destroyed when large tree limbs came crashing down on them...a few homes also had tree damage...trailers were knocked over and some roofs were damaged and/or blown off. Higher reported wind gusts include 59 mph at the Pueblo Memorial Airport...60 mph near Walsenburg (Huerfano County)...61 mph near Falcon (northern El Paso County)...65 mph at Canon City (Fremont County)...67 mph around Florence (Fremont County)...69 mph near Wetmore (Pueblo County)...70 mph near Silver Cliff and Westcliffe (Custer County)...71 mph near Colorado City (Pueblo County)...76 mph south of the Royal Gorge (Fremont County)...86 mph south of the Air Force Academy (El Paso County)...89 mph near La Veta (Huerfano County)...90 mph west of Westcliffe (Custer County) and near Stonewall (Las Animas County)...91 mph southwest of Buena Vista (Chaffee County)...92 mph southwest of Swissvale in the Sangre de Cristo Mountains (Fremont County), and finally 109 mph at the summit of Pikes Peak. A rough estimate of damage was around $750,000.EVENT NARRATIVE:
## 902291 EPISODE NARRATIVE: A powerful upper level low pressure system brought snow to portions of Northeast Arkansas, the Missouri Bootheel, West Tennessee and extreme north Mississippi. Most areas picked up between 1 and 3 inches of with areas of Northeast Arkansas and the Missouri Bootheel receiving between 4 and 6 inches of snow.EVENT NARRATIVE: Between 1 and 2 inches of snow fell in Benton County.
## 902292 EPISODE NARRATIVE: A powerful upper level low pressure system brought snow to portions of Northeast Arkansas, the Missouri Bootheel, West Tennessee and extreme north Mississippi. Most areas picked up between 1 and 3 inches of with areas of Northeast Arkansas and the Missouri Bootheel receiving between 4 and 6 inches of snow.EVENT NARRATIVE: Around 1 inch of snow fell in Carroll County.
## 902293 EPISODE NARRATIVE: A strong cold front moved south through north central Wyoming bringing high wind to the Meeteetse area and along the south slopes of the western Owl Creek Range. Wind gusts to 76 mph were recorded at Madden Reservoir.EVENT NARRATIVE:
## 902294 EPISODE NARRATIVE: A strong westerly flow aloft produced gusty winds at the surface along the Rocky Mountain front and over the plains of Central Montana. Wind gusts in excess of 60 mph were reported.EVENT NARRATIVE: A wind gust to 60 mph was reported at East Glacier Park 1ENE (the Two Medicine DOT site).
## 902295 EPISODE NARRATIVE: A 960 mb low over the southern Aleutians at 0300AKST on the 8th intensified to 945 mb near the Gulf of Anadyr by 2100AKST on the 8th. The low crossed the Chukotsk Peninsula as a 956 mb low at 0900AKST on the 9th, and moved into the southern Chukchi Sea as a 958 mb low by 2100AKST on the 9th. The low then tracked to the northwest and weakened to 975 mb about 150 miles north of Wrangel Island by 1500AKST on the 10th. The storm was one of the strongest storms to impact the west coast of Alaska since November 1974. \n\nZone 201: Blizzard conditions were observed at Wainwright from approximately 1153AKST through 1611AKST on the 9th. The visibility was frequently reduced to one quarter mile in snow and blowing snow. There was a peak wind gust to 43kt (50 mph) at the Wainwright ASOS. During this event, there was also a peak wind gust to \n68 kt (78 mph) at the Cape Lisburne AWOS. \n\nZone 202: Blizzard conditions were observed at Barrow from approximately 1021AKST through 1700AKST on the 9th. The visibility was frequently reduced to one quarter mile or less in blowing snow. There was a peak wind gust to 46 kt (53 mph) at the Barrow ASOS. \n\nZone 207: Blizzard conditions were observed at Kivalina from approximately 0400AKST through 1230AKST on the 9th. The visibility was frequently reduced to one quarter of a mile in snow and blowing snow. There was a peak wind gust to 61 kt (70 mph) at the Kivalina ASOS. The doors to the village transportation shed were blown out to sea. Many homes lost portions of their tin roofing, and satellite dishes were ripped off of roofs. One home had its door blown off. At Point Hope, severe blizzard conditions were observed. There was a peak wind gust of 68 kt (78 mph) at the Point Hope AWOS before power was lost to the AWOS. It was estimated that the wind gusted as high as 85 mph in the village during the height of the storm during the morning and early afternoon hours on the 9th. Five power poles were knocked down in the storm EVENT NARRATIVE:
## 902296 EPISODE NARRATIVE: A 960 mb low over the southern Aleutians at 0300AKST on the 8th intensified to 945 mb near the Gulf of Anadyr by 2100AKST on the 8th. The low crossed the Chukotsk Peninsula as a 956 mb low at 0900AKST on the 9th, and moved into the southern Chukchi Sea as a 958 mb low by 2100AKST on the 9th. The low then tracked to the northwest and weakened to 975 mb about 150 miles north of Wrangel Island by 1500AKST on the 10th. The storm was one of the strongest storms to impact the west coast of Alaska since November 1974. \n\nZone 201: Blizzard conditions were observed at Wainwright from approximately 1153AKST through 1611AKST on the 9th. The visibility was frequently reduced to one quarter mile in snow and blowing snow. There was a peak wind gust to 43kt (50 mph) at the Wainwright ASOS. During this event, there was also a peak wind gust to \n68 kt (78 mph) at the Cape Lisburne AWOS. \n\nZone 202: Blizzard conditions were observed at Barrow from approximately 1021AKST through 1700AKST on the 9th. The visibility was frequently reduced to one quarter mile or less in blowing snow. There was a peak wind gust to 46 kt (53 mph) at the Barrow ASOS. \n\nZone 207: Blizzard conditions were observed at Kivalina from approximately 0400AKST through 1230AKST on the 9th. The visibility was frequently reduced to one quarter of a mile in snow and blowing snow. There was a peak wind gust to 61 kt (70 mph) at the Kivalina ASOS. The doors to the village transportation shed were blown out to sea. Many homes lost portions of their tin roofing, and satellite dishes were ripped off of roofs. One home had its door blown off. At Point Hope, severe blizzard conditions were observed. There was a peak wind gust of 68 kt (78 mph) at the Point Hope AWOS before power was lost to the AWOS. It was estimated that the wind gusted as high as 85 mph in the village during the height of the storm during the morning and early afternoon hours on the 9th. Five power poles were knocked down in the storm EVENT NARRATIVE:
## 902297 EPISODE NARRATIVE: An intense upper level low developed on the 28th at the base of a highly amplified upper trough across the Great Lakes and Mississippi Valley. The upper low closed off over the mid South and tracked northeast across the Tennessee Valley during the morning of the 29th. A warm conveyor belt of heavy rainfall developed in advance of the low which dumped from around 2 to over 5 inches of rain across the eastern two thirds of north Alabama and middle Tennessee. The highest rain amounts were recorded in Jackson and DeKalb Counties with 3 to 5 inches. The rain fell over 24 to 36 hour period, with rainfall remaining light to moderate during most its duration. The rainfall resulted in minor river flooding along the Little River, Big Wills Creek and Paint Rock. A landslide occurred on Highway 35 just north of Section in Jackson County. A driver was trapped in his vehicle, but was rescued unharmed. Trees, boulders and debris blocked 100 to 250 yards of Highway 35.\n\nThe rain mixed with and changed to snow across north Alabama during the afternoon and evening hours of the 28th, and lasted into the 29th. The heaviest bursts of snow occurred in northwest Alabama during the afternoon and evening hours, and in north central and northeast Alabama during the overnight and morning hours. Since ground temperatures were in the 50s, and air temperatures in valley areas only dropped into the mid 30s, most of the snowfall melted on impact with mostly trace amounts reported in valley locations. However, above 1500 foot elevation, snow accumulations of 1 to 2 inches were reported. The heaviest amount was 2.3 inches on Monte Sano Mountain, about 5 miles northeast of Huntsville.EVENT NARRATIVE: Snowfall accumulations of up to 2.3 inches were reported on the higher elevations of eastern Madison County. A snow accumulation of 1.5 inches was reported 2.7 miles south of Gurley, while 2.3 inches was reported 3 miles east of Huntsville atop Monte Sano Mountain.
## REFNUM
## 902288 902288
## 902289 902289
## 902290 902290
## 902291 902291
## 902292 902292
## 902293 902293
## 902294 902294
## 902295 902295
## 902296 902296
## 902297 902297
summary(data)
## STATE__ BGN_DATE BGN_TIME
## Min. : 1.0 5/25/2011 0:00:00: 1202 12:00:00 AM: 10163
## 1st Qu.:19.0 4/27/2011 0:00:00: 1193 06:00:00 PM: 7350
## Median :30.0 6/9/2011 0:00:00 : 1030 04:00:00 PM: 7261
## Mean :31.2 5/30/2004 0:00:00: 1016 05:00:00 PM: 6891
## 3rd Qu.:45.0 4/4/2011 0:00:00 : 1009 12:00:00 PM: 6703
## Max. :95.0 4/2/2006 0:00:00 : 981 03:00:00 PM: 6700
## (Other) :895866 (Other) :857229
## TIME_ZONE COUNTY COUNTYNAME STATE
## CST :547493 Min. : 0.0 JEFFERSON : 7840 TX : 83728
## EST :245558 1st Qu.: 31.0 WASHINGTON: 7603 KS : 53440
## MST : 68390 Median : 75.0 JACKSON : 6660 OK : 46802
## PST : 28302 Mean :100.6 FRANKLIN : 6256 MO : 35648
## AST : 6360 3rd Qu.:131.0 LINCOLN : 5937 IA : 31069
## HST : 2563 Max. :873.0 MADISON : 5632 NE : 30271
## (Other): 3631 (Other) :862369 (Other):621339
## EVTYPE BGN_RANGE BGN_AZI
## HAIL :288661 Min. : 0.000 :547332
## TSTM WIND :219940 1st Qu.: 0.000 N : 86752
## THUNDERSTORM WIND: 82563 Median : 0.000 W : 38446
## TORNADO : 60652 Mean : 1.484 S : 37558
## FLASH FLOOD : 54277 3rd Qu.: 1.000 E : 33178
## FLOOD : 25326 Max. :3749.000 NW : 24041
## (Other) :170878 (Other):134990
## BGN_LOCATI END_DATE END_TIME
## :287743 :243411 :238978
## COUNTYWIDE : 19680 4/27/2011 0:00:00: 1214 06:00:00 PM: 9802
## Countywide : 993 5/25/2011 0:00:00: 1196 05:00:00 PM: 8314
## SPRINGFIELD : 843 6/9/2011 0:00:00 : 1021 04:00:00 PM: 8104
## SOUTH PORTION: 810 4/4/2011 0:00:00 : 1007 12:00:00 PM: 7483
## NORTH PORTION: 784 5/30/2004 0:00:00: 998 11:59:00 PM: 7184
## (Other) :591444 (Other) :653450 (Other) :622432
## COUNTY_END COUNTYENDN END_RANGE END_AZI
## Min. :0 Mode:logical Min. : 0.0000 :724837
## 1st Qu.:0 NA's:902297 1st Qu.: 0.0000 N : 28082
## Median :0 Median : 0.0000 S : 22510
## Mean :0 Mean : 0.9862 W : 20119
## 3rd Qu.:0 3rd Qu.: 0.0000 E : 20047
## Max. :0 Max. :925.0000 NE : 14606
## (Other): 72096
## END_LOCATI LENGTH WIDTH
## :499225 Min. : 0.0000 Min. : 0.000
## COUNTYWIDE : 19731 1st Qu.: 0.0000 1st Qu.: 0.000
## SOUTH PORTION : 833 Median : 0.0000 Median : 0.000
## NORTH PORTION : 780 Mean : 0.2301 Mean : 7.503
## CENTRAL PORTION: 617 3rd Qu.: 0.0000 3rd Qu.: 0.000
## SPRINGFIELD : 575 Max. :2315.0000 Max. :4400.000
## (Other) :380536
## F MAG FATALITIES INJURIES
## Min. :0.0 Min. : 0.0 Min. : 0.0000 Min. : 0.0000
## 1st Qu.:0.0 1st Qu.: 0.0 1st Qu.: 0.0000 1st Qu.: 0.0000
## Median :1.0 Median : 50.0 Median : 0.0000 Median : 0.0000
## Mean :0.9 Mean : 46.9 Mean : 0.0168 Mean : 0.1557
## 3rd Qu.:1.0 3rd Qu.: 75.0 3rd Qu.: 0.0000 3rd Qu.: 0.0000
## Max. :5.0 Max. :22000.0 Max. :583.0000 Max. :1700.0000
## NA's :843563
## PROPDMG PROPDMGEXP CROPDMG CROPDMGEXP
## Min. : 0.00 :465934 Min. : 0.000 :618413
## 1st Qu.: 0.00 K :424665 1st Qu.: 0.000 K :281832
## Median : 0.00 M : 11330 Median : 0.000 M : 1994
## Mean : 12.06 0 : 216 Mean : 1.527 k : 21
## 3rd Qu.: 0.50 B : 40 3rd Qu.: 0.000 0 : 19
## Max. :5000.00 5 : 28 Max. :990.000 B : 9
## (Other): 84 (Other): 9
## WFO STATEOFFIC
## :142069 :248769
## OUN : 17393 TEXAS, North : 12193
## JAN : 13889 ARKANSAS, Central and North Central: 11738
## LWX : 13174 IOWA, Central : 11345
## PHI : 12551 KANSAS, Southwest : 11212
## TSA : 12483 GEORGIA, North and Central : 11120
## (Other):690738 (Other) :595920
## ZONENAMES
## :594029
## :205988
## GREATER RENO / CARSON CITY / M - GREATER RENO / CARSON CITY / M : 639
## GREATER LAKE TAHOE AREA - GREATER LAKE TAHOE AREA : 592
## JEFFERSON - JEFFERSON : 303
## MADISON - MADISON : 302
## (Other) :100444
## LATITUDE LONGITUDE LATITUDE_E LONGITUDE_
## Min. : 0 Min. :-14451 Min. : 0 Min. :-14455
## 1st Qu.:2802 1st Qu.: 7247 1st Qu.: 0 1st Qu.: 0
## Median :3540 Median : 8707 Median : 0 Median : 0
## Mean :2875 Mean : 6940 Mean :1452 Mean : 3509
## 3rd Qu.:4019 3rd Qu.: 9605 3rd Qu.:3549 3rd Qu.: 8735
## Max. :9706 Max. : 17124 Max. :9706 Max. :106220
## NA's :47 NA's :40
## REMARKS REFNUM
## :287433 Min. : 1
## : 24013 1st Qu.:225575
## Trees down.\n : 1110 Median :451149
## Several trees were blown down.\n : 569 Mean :451149
## Trees were downed.\n : 446 3rd Qu.:676723
## Large trees and power lines were blown down.\n: 432 Max. :902297
## (Other) :588294
summary(data$EVTYPE)
## HAIL TSTM WIND THUNDERSTORM WIND
## 288661 219940 82563
## TORNADO FLASH FLOOD FLOOD
## 60652 54277 25326
## THUNDERSTORM WINDS HIGH WIND LIGHTNING
## 20843 20212 15754
## HEAVY SNOW HEAVY RAIN WINTER STORM
## 15708 11723 11433
## WINTER WEATHER FUNNEL CLOUD MARINE TSTM WIND
## 7026 6839 6175
## MARINE THUNDERSTORM WIND WATERSPOUT STRONG WIND
## 5812 3796 3566
## URBAN/SML STREAM FLD WILDFIRE BLIZZARD
## 3392 2761 2719
## DROUGHT ICE STORM EXCESSIVE HEAT
## 2488 2006 1678
## HIGH WINDS WILD/FOREST FIRE FROST/FREEZE
## 1533 1457 1342
## DENSE FOG WINTER WEATHER/MIX TSTM WIND/HAIL
## 1293 1104 1028
## EXTREME COLD/WIND CHILL HEAT HIGH SURF
## 1002 767 725
## TROPICAL STORM FLASH FLOODING EXTREME COLD
## 690 682 655
## COASTAL FLOOD LAKE-EFFECT SNOW FLOOD/FLASH FLOOD
## 650 636 624
## LANDSLIDE SNOW COLD/WIND CHILL
## 600 587 539
## FOG RIP CURRENT MARINE HAIL
## 538 470 442
## DUST STORM AVALANCHE WIND
## 427 386 340
## RIP CURRENTS STORM SURGE FREEZING RAIN
## 304 261 250
## URBAN FLOOD HEAVY SURF/HIGH SURF EXTREME WINDCHILL
## 249 228 204
## STRONG WINDS DRY MICROBURST ASTRONOMICAL LOW TIDE
## 196 186 174
## HURRICANE RIVER FLOOD LIGHT SNOW
## 174 173 154
## STORM SURGE/TIDE RECORD WARMTH COASTAL FLOODING
## 148 146 143
## DUST DEVIL MARINE HIGH WIND UNSEASONABLY WARM
## 141 135 126
## FLOODING ASTRONOMICAL HIGH TIDE MODERATE SNOWFALL
## 120 103 101
## URBAN FLOODING WINTRY MIX HURRICANE/TYPHOON
## 98 90 88
## FUNNEL CLOUDS HEAVY SURF RECORD HEAT
## 87 84 81
## FREEZE HEAT WAVE COLD
## 74 74 72
## RECORD COLD ICE THUNDERSTORM WINDS HAIL
## 64 61 61
## TROPICAL DEPRESSION SLEET UNSEASONABLY DRY
## 60 59 56
## FROST GUSTY WINDS THUNDERSTORM WINDSS
## 53 53 51
## MARINE STRONG WIND OTHER SMALL HAIL
## 48 48 47
## FUNNEL FREEZING FOG THUNDERSTORM
## 46 45 45
## Temperature record TSTM WIND (G45) Coastal Flooding
## 43 39 38
## WATERSPOUTS MONTHLY PRECIPITATION WINDS
## 37 36 36
## (Other)
## 2940
I will convert EVTYPE to lower case. Of course, more sophesticated methods of clean up can be used, but here I will only convert everything to lower case and proceed with the analysis.
data$EVTYPE <- tolower(data$EVTYPE)
head(data, n=10)
## 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
## 7 1 11/16/1951 0:00:00 0100 CST 9 BLOUNT AL
## 8 1 1/22/1952 0:00:00 0900 CST 123 TALLAPOOSA AL
## 9 1 2/13/1952 0:00:00 2000 CST 125 TUSCALOOSA AL
## 10 1 2/13/1952 0:00:00 2000 CST 57 FAYETTE 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
## 7 tornado 0 0
## 8 tornado 0 0
## 9 tornado 0 0
## 10 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
## 7 NA 0 1.5 33 2 0 0
## 8 NA 0 0.0 33 1 0 0
## 9 NA 0 3.3 100 3 0 1
## 10 NA 0 2.3 100 3 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
## 7 1 2.5 K 0
## 8 0 2.5 K 0
## 9 14 25.0 K 0
## 10 0 25.0 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
## 7 3405 8631 0 0 7
## 8 3255 8558 0 0 8
## 9 3334 8740 3336 8738 9
## 10 3336 8738 3337 8737 10
tail(data, n=10)
## STATE__ BGN_DATE BGN_TIME TIME_ZONE COUNTY
## 902288 8 11/5/2011 0:00:00 03:00:00 AM MST 17
## 902289 48 11/28/2011 0:00:00 03:30:00 AM CST 250
## 902290 8 11/12/2011 0:00:00 09:00:00 PM MST 73
## 902291 28 11/28/2011 0:00:00 03:00:00 PM CST 3
## 902292 47 11/28/2011 0:00:00 03:00:00 PM CST 21
## 902293 56 11/30/2011 0:00:00 10:30:00 PM MST 7
## 902294 30 11/10/2011 0:00:00 02:48:00 PM MST 9
## 902295 2 11/8/2011 0:00:00 02:58:00 PM AKS 213
## 902296 2 11/9/2011 0:00:00 10:21:00 AM AKS 202
## 902297 1 11/28/2011 0:00:00 08:00:00 PM CST 6
## COUNTYNAME STATE EVTYPE BGN_RANGE
## 902288 COZ012 - 017 CO winter weather 0
## 902289 TXZ248 - 250 TX frost/freeze 0
## 902290 COZ062 - 073 - 075 - 087 CO high wind 0
## 902291 MSZ001 - 003 MS winter weather 0
## 902292 TNZ001>004 - 019>021 - 048>055 - 088 TN winter weather 0
## 902293 WYZ007 - 017 WY high wind 0
## 902294 MTZ009 - 010 MT high wind 0
## 902295 AKZ213 AK high wind 0
## 902296 AKZ202 AK blizzard 0
## 902297 ALZ006 AL heavy snow 0
## BGN_AZI BGN_LOCATI END_DATE END_TIME COUNTY_END
## 902288 11/6/2011 0:00:00 06:00:00 AM 0
## 902289 11/28/2011 0:00:00 08:00:00 AM 0
## 902290 11/13/2011 0:00:00 08:00:00 AM 0
## 902291 11/29/2011 0:00:00 12:00:00 PM 0
## 902292 11/29/2011 0:00:00 12:00:00 PM 0
## 902293 11/30/2011 0:00:00 10:30:00 PM 0
## 902294 11/10/2011 0:00:00 02:48:00 PM 0
## 902295 11/9/2011 0:00:00 01:15:00 PM 0
## 902296 11/9/2011 0:00:00 05:00:00 PM 0
## 902297 11/29/2011 0:00:00 04:00:00 AM 0
## COUNTYENDN END_RANGE END_AZI END_LOCATI LENGTH WIDTH F MAG
## 902288 NA 0 0 0 NA 0
## 902289 NA 0 0 0 NA 0
## 902290 NA 0 0 0 NA 65
## 902291 NA 0 0 0 NA 0
## 902292 NA 0 0 0 NA 0
## 902293 NA 0 0 0 NA 66
## 902294 NA 0 0 0 NA 52
## 902295 NA 0 0 0 NA 81
## 902296 NA 0 0 0 NA 0
## 902297 NA 0 0 0 NA 0
## FATALITIES INJURIES PROPDMG PROPDMGEXP CROPDMG CROPDMGEXP WFO
## 902288 0 0 0 K 0 K GJT
## 902289 0 0 0 K 0 K BRO
## 902290 0 0 0 K 0 K PUB
## 902291 0 0 0 K 0 K MEG
## 902292 0 0 0 K 0 K MEG
## 902293 0 0 0 K 0 K RIW
## 902294 0 0 0 K 0 K TFX
## 902295 0 0 0 K 0 K AFG
## 902296 0 0 0 K 0 K AFG
## 902297 0 0 0 K 0 K HUN
## STATEOFFIC
## 902288 COLORADO, West
## 902289 TEXAS, South
## 902290 COLORADO, South Central and Southeast
## 902291 MISSISSIPPI, North
## 902292 TENNESSEE, West
## 902293 WYOMING, Central and West
## 902294 MONTANA, Central
## 902295 ALASKA, Northern
## 902296 ALASKA, Northern
## 902297 ALABAMA, North
## ZONENAMES
## 902288 WEST ELK AND SAWATCH MOUNTAINS - WEST ELK AND SAWATCH MOUNTAINS - UNCOMPAHGRE PLATEAU AND DALLAS
## 902289 ZAPATA - ZAPATA - BROOKS
## 902290 CENTRAL CHAFFEE COUNTY BELOW 9 - CENTRAL CHAFFEE COUNTY BELOW 9 - NORTHERN SANGRE DE CRISTO MOUN - SOUTHERN SANGRE DE CRISTO MOUN - WALSENBURG VICINITY / UPPER HU
## 902291 DE SOTO - DE SOTO - BENTON
## 902292 LAKE - LAKE - OBION - WEAKLEY - HENRY - DYER - GIBSON - CARROLL - LAUDERDALE - TIPTON - HAYWOOD - CROCKETT - MADISON - CHESTER - HENDERSON - DECATUR - SHELBY
## 902293 OWL CREEK & BRIDGER MOUNTAINS - OWL CREEK & BRIDGER MOUNTAINS - WIND RIVER BASIN
## 902294 NORTH ROCKY MOUNTAIN FRONT - NORTH ROCKY MOUNTAIN FRONT - EASTERN GLACIER
## 902295 ST LAWRENCE IS. BERING STRAIT - ST LAWRENCE IS. BERING STRAIT
## 902296 NORTHERN ARCTIC COAST - NORTHERN ARCTIC COAST
## 902297 MADISON - MADISON
## LATITUDE LONGITUDE LATITUDE_E LONGITUDE_
## 902288 0 0 0 0
## 902289 0 0 0 0
## 902290 0 0 0 0
## 902291 0 0 0 0
## 902292 0 0 0 0
## 902293 0 0 0 0
## 902294 0 0 0 0
## 902295 0 0 0 0
## 902296 0 0 0 0
## 902297 0 0 0 0
## REMARKS
## 902288 EPISODE NARRATIVE: A strong Pacific trough produced significant to heavy snowfall in the mountains and some lower elevation areas of western Colorado.EVENT NARRATIVE: Snowfall ranged from 5 to 12 inches above the 8000 foot level. Wind gusts of 25 to 45 mph produced areas of blowing and drifting snow.
## 902289 EPISODE NARRATIVE: A true blue norther drove pure Canadian high pressure directly into South Texas and northern Mexico, beginning on November 27th and continuing through early on the 29th before the high drifted into the southeast U.S. Extremely dry and relatively chilly air invaded Deep South Texas and the Rio Grande Valley; temperatures bottomed out in the mid 20s to lower 30s for all but the southeast corner of the Rio Grande Valley on the 28th.\n\nThe event was a rare dry freeze, as humidity through the coldest periods remained below 50 percent. Ambient temperatures varied greatly depending on the height of the sensor taking the measurements. At eye level, temperatures fell to or just below freezing in many areas, but remained a few degrees above freezing in others. Just above the ground, and in wind protected hollows, temperatures fell into the 20s; local hard freezes, defined as 2 or more hours with temperatures below 28 degrees, likely occurred. Agricultural damage was not known as of this writing.EVENT NARRATIVE: Temperatures fell below freezing in wind protected areas, including Falfurrias, between 3 and 4 AM and continued until 8 AM on the 28th. Minimum temperature at the Hollywood Hunting Camp, 3.5 miles west of Falfurrias, dipped to 26 degrees between 7 and 8 AM. Temperatures in non wind protected areas only fell into the mid 30s, including Brooks County Airport (2 miles southeast of Falfurrias).
## 902290 EPISODE NARRATIVE: A strong storm system centered over northern Colorado produced widespread damaging winds...in excess of 100 mph at times...over south central and southeast Colorado. There were widespread power outages and damage...especially over sections of Custer and Las Animas Counties. Custer County was under a state of emergency for a time. Numerous trees and power lines were blown down. In addition...sheds and barns were destroyed...a few cars were damaged or destroyed when large tree limbs came crashing down on them...a few homes also had tree damage...trailers were knocked over and some roofs were damaged and/or blown off. Higher reported wind gusts include 59 mph at the Pueblo Memorial Airport...60 mph near Walsenburg (Huerfano County)...61 mph near Falcon (northern El Paso County)...65 mph at Canon City (Fremont County)...67 mph around Florence (Fremont County)...69 mph near Wetmore (Pueblo County)...70 mph near Silver Cliff and Westcliffe (Custer County)...71 mph near Colorado City (Pueblo County)...76 mph south of the Royal Gorge (Fremont County)...86 mph south of the Air Force Academy (El Paso County)...89 mph near La Veta (Huerfano County)...90 mph west of Westcliffe (Custer County) and near Stonewall (Las Animas County)...91 mph southwest of Buena Vista (Chaffee County)...92 mph southwest of Swissvale in the Sangre de Cristo Mountains (Fremont County), and finally 109 mph at the summit of Pikes Peak. A rough estimate of damage was around $750,000.EVENT NARRATIVE:
## 902291 EPISODE NARRATIVE: A powerful upper level low pressure system brought snow to portions of Northeast Arkansas, the Missouri Bootheel, West Tennessee and extreme north Mississippi. Most areas picked up between 1 and 3 inches of with areas of Northeast Arkansas and the Missouri Bootheel receiving between 4 and 6 inches of snow.EVENT NARRATIVE: Between 1 and 2 inches of snow fell in Benton County.
## 902292 EPISODE NARRATIVE: A powerful upper level low pressure system brought snow to portions of Northeast Arkansas, the Missouri Bootheel, West Tennessee and extreme north Mississippi. Most areas picked up between 1 and 3 inches of with areas of Northeast Arkansas and the Missouri Bootheel receiving between 4 and 6 inches of snow.EVENT NARRATIVE: Around 1 inch of snow fell in Carroll County.
## 902293 EPISODE NARRATIVE: A strong cold front moved south through north central Wyoming bringing high wind to the Meeteetse area and along the south slopes of the western Owl Creek Range. Wind gusts to 76 mph were recorded at Madden Reservoir.EVENT NARRATIVE:
## 902294 EPISODE NARRATIVE: A strong westerly flow aloft produced gusty winds at the surface along the Rocky Mountain front and over the plains of Central Montana. Wind gusts in excess of 60 mph were reported.EVENT NARRATIVE: A wind gust to 60 mph was reported at East Glacier Park 1ENE (the Two Medicine DOT site).
## 902295 EPISODE NARRATIVE: A 960 mb low over the southern Aleutians at 0300AKST on the 8th intensified to 945 mb near the Gulf of Anadyr by 2100AKST on the 8th. The low crossed the Chukotsk Peninsula as a 956 mb low at 0900AKST on the 9th, and moved into the southern Chukchi Sea as a 958 mb low by 2100AKST on the 9th. The low then tracked to the northwest and weakened to 975 mb about 150 miles north of Wrangel Island by 1500AKST on the 10th. The storm was one of the strongest storms to impact the west coast of Alaska since November 1974. \n\nZone 201: Blizzard conditions were observed at Wainwright from approximately 1153AKST through 1611AKST on the 9th. The visibility was frequently reduced to one quarter mile in snow and blowing snow. There was a peak wind gust to 43kt (50 mph) at the Wainwright ASOS. During this event, there was also a peak wind gust to \n68 kt (78 mph) at the Cape Lisburne AWOS. \n\nZone 202: Blizzard conditions were observed at Barrow from approximately 1021AKST through 1700AKST on the 9th. The visibility was frequently reduced to one quarter mile or less in blowing snow. There was a peak wind gust to 46 kt (53 mph) at the Barrow ASOS. \n\nZone 207: Blizzard conditions were observed at Kivalina from approximately 0400AKST through 1230AKST on the 9th. The visibility was frequently reduced to one quarter of a mile in snow and blowing snow. There was a peak wind gust to 61 kt (70 mph) at the Kivalina ASOS. The doors to the village transportation shed were blown out to sea. Many homes lost portions of their tin roofing, and satellite dishes were ripped off of roofs. One home had its door blown off. At Point Hope, severe blizzard conditions were observed. There was a peak wind gust of 68 kt (78 mph) at the Point Hope AWOS before power was lost to the AWOS. It was estimated that the wind gusted as high as 85 mph in the village during the height of the storm during the morning and early afternoon hours on the 9th. Five power poles were knocked down in the storm EVENT NARRATIVE:
## 902296 EPISODE NARRATIVE: A 960 mb low over the southern Aleutians at 0300AKST on the 8th intensified to 945 mb near the Gulf of Anadyr by 2100AKST on the 8th. The low crossed the Chukotsk Peninsula as a 956 mb low at 0900AKST on the 9th, and moved into the southern Chukchi Sea as a 958 mb low by 2100AKST on the 9th. The low then tracked to the northwest and weakened to 975 mb about 150 miles north of Wrangel Island by 1500AKST on the 10th. The storm was one of the strongest storms to impact the west coast of Alaska since November 1974. \n\nZone 201: Blizzard conditions were observed at Wainwright from approximately 1153AKST through 1611AKST on the 9th. The visibility was frequently reduced to one quarter mile in snow and blowing snow. There was a peak wind gust to 43kt (50 mph) at the Wainwright ASOS. During this event, there was also a peak wind gust to \n68 kt (78 mph) at the Cape Lisburne AWOS. \n\nZone 202: Blizzard conditions were observed at Barrow from approximately 1021AKST through 1700AKST on the 9th. The visibility was frequently reduced to one quarter mile or less in blowing snow. There was a peak wind gust to 46 kt (53 mph) at the Barrow ASOS. \n\nZone 207: Blizzard conditions were observed at Kivalina from approximately 0400AKST through 1230AKST on the 9th. The visibility was frequently reduced to one quarter of a mile in snow and blowing snow. There was a peak wind gust to 61 kt (70 mph) at the Kivalina ASOS. The doors to the village transportation shed were blown out to sea. Many homes lost portions of their tin roofing, and satellite dishes were ripped off of roofs. One home had its door blown off. At Point Hope, severe blizzard conditions were observed. There was a peak wind gust of 68 kt (78 mph) at the Point Hope AWOS before power was lost to the AWOS. It was estimated that the wind gusted as high as 85 mph in the village during the height of the storm during the morning and early afternoon hours on the 9th. Five power poles were knocked down in the storm EVENT NARRATIVE:
## 902297 EPISODE NARRATIVE: An intense upper level low developed on the 28th at the base of a highly amplified upper trough across the Great Lakes and Mississippi Valley. The upper low closed off over the mid South and tracked northeast across the Tennessee Valley during the morning of the 29th. A warm conveyor belt of heavy rainfall developed in advance of the low which dumped from around 2 to over 5 inches of rain across the eastern two thirds of north Alabama and middle Tennessee. The highest rain amounts were recorded in Jackson and DeKalb Counties with 3 to 5 inches. The rain fell over 24 to 36 hour period, with rainfall remaining light to moderate during most its duration. The rainfall resulted in minor river flooding along the Little River, Big Wills Creek and Paint Rock. A landslide occurred on Highway 35 just north of Section in Jackson County. A driver was trapped in his vehicle, but was rescued unharmed. Trees, boulders and debris blocked 100 to 250 yards of Highway 35.\n\nThe rain mixed with and changed to snow across north Alabama during the afternoon and evening hours of the 28th, and lasted into the 29th. The heaviest bursts of snow occurred in northwest Alabama during the afternoon and evening hours, and in north central and northeast Alabama during the overnight and morning hours. Since ground temperatures were in the 50s, and air temperatures in valley areas only dropped into the mid 30s, most of the snowfall melted on impact with mostly trace amounts reported in valley locations. However, above 1500 foot elevation, snow accumulations of 1 to 2 inches were reported. The heaviest amount was 2.3 inches on Monte Sano Mountain, about 5 miles northeast of Huntsville.EVENT NARRATIVE: Snowfall accumulations of up to 2.3 inches were reported on the higher elevations of eastern Madison County. A snow accumulation of 1.5 inches was reported 2.7 miles south of Gurley, while 2.3 inches was reported 3 miles east of Huntsville atop Monte Sano Mountain.
## REFNUM
## 902288 902288
## 902289 902289
## 902290 902290
## 902291 902291
## 902292 902292
## 902293 902293
## 902294 902294
## 902295 902295
## 902296 902296
## 902297 902297
I will do similar preprocessing for question 2.
str(data)
## 'data.frame': 902297 obs. of 37 variables:
## $ STATE__ : num 1 1 1 1 1 1 1 1 1 1 ...
## $ BGN_DATE : Factor w/ 16335 levels "1/1/1966 0:00:00",..: 6523 6523 4242 11116 2224 2224 2260 383 3980 3980 ...
## $ BGN_TIME : Factor w/ 3608 levels "00:00:00 AM",..: 272 287 2705 1683 2584 3186 242 1683 3186 3186 ...
## $ TIME_ZONE : Factor w/ 22 levels "ADT","AKS","AST",..: 7 7 7 7 7 7 7 7 7 7 ...
## $ COUNTY : num 97 3 57 89 43 77 9 123 125 57 ...
## $ COUNTYNAME: Factor w/ 29601 levels "","5NM E OF MACKINAC BRIDGE TO PRESQUE ISLE LT MI",..: 13513 1873 4598 10592 4372 10094 1973 23873 24418 4598 ...
## $ STATE : Factor w/ 72 levels "AK","AL","AM",..: 2 2 2 2 2 2 2 2 2 2 ...
## $ EVTYPE : chr "tornado" "tornado" "tornado" "tornado" ...
## $ BGN_RANGE : num 0 0 0 0 0 0 0 0 0 0 ...
## $ BGN_AZI : Factor w/ 35 levels ""," N"," NW",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ BGN_LOCATI: Factor w/ 54429 levels "","- 1 N Albion",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ END_DATE : Factor w/ 6663 levels "","1/1/1993 0:00:00",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ END_TIME : Factor w/ 3647 levels ""," 0900CST",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ COUNTY_END: num 0 0 0 0 0 0 0 0 0 0 ...
## $ COUNTYENDN: logi NA NA NA NA NA NA ...
## $ END_RANGE : num 0 0 0 0 0 0 0 0 0 0 ...
## $ END_AZI : Factor w/ 24 levels "","E","ENE","ESE",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ END_LOCATI: Factor w/ 34506 levels "","- .5 NNW",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ LENGTH : num 14 2 0.1 0 0 1.5 1.5 0 3.3 2.3 ...
## $ WIDTH : num 100 150 123 100 150 177 33 33 100 100 ...
## $ F : int 3 2 2 2 2 2 2 1 3 3 ...
## $ MAG : num 0 0 0 0 0 0 0 0 0 0 ...
## $ FATALITIES: num 0 0 0 0 0 0 0 0 1 0 ...
## $ INJURIES : num 15 0 2 2 2 6 1 0 14 0 ...
## $ PROPDMG : num 25 2.5 25 2.5 2.5 2.5 2.5 2.5 25 25 ...
## $ PROPDMGEXP: Factor w/ 19 levels "","-","?","+",..: 17 17 17 17 17 17 17 17 17 17 ...
## $ CROPDMG : num 0 0 0 0 0 0 0 0 0 0 ...
## $ CROPDMGEXP: Factor w/ 9 levels "","?","0","2",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ WFO : Factor w/ 542 levels ""," CI","$AC",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ STATEOFFIC: Factor w/ 250 levels "","ALABAMA, Central",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ ZONENAMES : Factor w/ 25112 levels ""," "| __truncated__,..: 1 1 1 1 1 1 1 1 1 1 ...
## $ LATITUDE : num 3040 3042 3340 3458 3412 ...
## $ LONGITUDE : num 8812 8755 8742 8626 8642 ...
## $ LATITUDE_E: num 3051 0 0 0 0 ...
## $ LONGITUDE_: num 8806 0 0 0 0 ...
## $ REMARKS : Factor w/ 436774 levels "","-2 at Deer Park\n",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ REFNUM : num 1 2 3 4 5 6 7 8 9 10 ...
str(data$CROPDMGEXP)
## Factor w/ 9 levels "","?","0","2",..: 1 1 1 1 1 1 1 1 1 1 ...
unique(data$CROPDMGEXP)
## [1] M K m B ? 0 k 2
## Levels: ? 0 2 B k K m M
unique(data$PROPDMGEXP)
## [1] K M B m + 0 5 6 ? 4 2 3 h 7 H - 1 8
## Levels: - ? + 0 1 2 3 4 5 6 7 8 B h H K m M
str(data$PROPDMGEXP)
## Factor w/ 19 levels "","-","?","+",..: 17 17 17 17 17 17 17 17 17 17 ...
event.type <- data$EVTYPE
injure <- data$INJURIES
fatal <- data$FATALITIES
combined.harm <- injure + fatal
#subset a portion from the original data
sub.data <- data.frame(event.type, combined.harm)
sum.harm <- aggregate(combined.harm ~ event.type, sub.data, sum)
#indexing for the order
order <- order(sum.harm$combined.harm, decreasing = TRUE)
order.sum.harm <- sum.harm[order,]
colnames(order.sum.harm) <- c("Events",
"Total_Injuries_and_Fatalities")
high.20.harm <- head(order.sum.harm, 20)
#order the subset
order.harm.factor <- reorder(high.20.harm$Events,
-high.20.harm$Total_Injuries_and_Fatalities)
head(high.20.harm)
## Events Total_Injuries_and_Fatalities
## 758 tornado 96979
## 116 excessive heat 8428
## 779 tstm wind 7461
## 154 flood 7259
## 418 lightning 6046
## 243 heat 3037
To answer question 1, I will use the aggregate function. I will use the variables ‘fatalities’ and ‘injuries’ to answer this question. Once the aggregate function is run, the casualties will be ordered in a desc order and the top 6 will be showing to help the decision maker. I’m using “six” arbitarily.
library(ggplot2)
library(lattice)
event.type <- data$EVTYPE
injure <- data$INJURIES
fatal <- data$FATALITIES
combined.harm <- injure + fatal
#subset a portion from the original data
sub.data <- data.frame(event.type, combined.harm)
sum.harm <- aggregate(combined.harm ~ event.type, sub.data, sum)
#indexing for the order
order <- order(sum.harm$combined.harm, decreasing = TRUE)
order.sum.harm <- sum.harm[order,]
colnames(order.sum.harm) <- c("Events",
"Total_Injuries_and_Fatalities")
high.20.harm <- head(order.sum.harm, 20)
#order the subset
order.harm.factor <- reorder(high.20.harm$Events,
-high.20.harm$Total_Injuries_and_Fatalities)
head(high.20.harm)
## Events Total_Injuries_and_Fatalities
## 758 tornado 96979
## 116 excessive heat 8428
## 779 tstm wind 7461
## 154 flood 7259
## 418 lightning 6046
## 243 heat 3037
library(ggplot2)
library(lattice)
prop.damage <- data$PROPDMG
crop.damage <- data$CROPDMG
combined.damage <- prop.damage + crop.damage
#subset a portion from the original data
sub.data2 <- data.frame(event.type, combined.damage)
sum.damage <- aggregate(combined.damage ~ event.type, sub.data2,sum)
#indexing for the order
order2 <- order(sum.damage$combined.damage, decreasing = TRUE)
order.sum.damage <- sum.damage[order2,]
colnames(order.sum.damage) <- c("Events", "Total_Economy_Damage")
high.20.damage <- head(order.sum.damage, 20)
#order the subset
order.damage.factor <- reorder(high.20.damage$Events,
-high.20.damage$Total_Economy_Damage)
head(high.20.damage)
## Events Total_Economy_Damage
## 758 tornado 3312276.7
## 138 flash flood 1599325.1
## 779 tstm wind 1445198.2
## 212 hail 1268289.7
## 154 flood 1067976.4
## 685 thunderstorm wind 943635.6
plot1 <- qplot(order.harm.factor, high.20.harm$Total_Injuries_and_Fatalities,
data = high.20.harm, stat="identity", geom = "bar")
plot1 + labs(title = "Total Injuries and Fatalities versus Events",
x = "Event Types", y = "Number of Injuries/Fatalities") +
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust = 1))
plot2 <- qplot(order.damage.factor, high.20.damage$Total_Economy_Damage,
data = high.20.damage, stat="identity", geom = "bar")
plot2 + labs(title = "Total Economic Damage versus Events",
x = "Event Types", y = "Economic Damage in USD") +
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust = 1))
As seen from the graphs, TORNADO is the cause for the largest damage to human health and to the economy.