Tracking the 2013 Hurricane Season

October 21, 2013
By

(This article was first published on Statistical Research » R, and kindly contributed to R-bloggers)

With it being the end of hurricane season it’s only appropriate to do a brief summary of the activity this year.   It’s been a surprisingly low-key season as far as hurricanes are concerned.  There have been only a few hurricanes and the barometric pressure of any hurricane this season has not even come close to hurricane Sandy (which broke the lowest barometric pressure record).

2013 Hurricane Season

A lot more analysis and visualization could be done with these data.  I will do some further statistical analysis and maybe some time series comparing past recorded hurricanes or maybe some other kriging approaches. Perhaps when I have some more spare time I’ll play with the data even more and look into the sustained wind speed and some of the other hurricane indices (e.g. the Power Dissipation Index).

The following graph shows a histogram of the barometric pressure and how it compares to hurricane Sandy.

2013 Barometric Pressure

In the mean time here is a short piece of code to produce the graphics for the 2013 hurricanes.   It produces a graph of the area around the Atlantic Basin and pulls the data down from Unisys.  It also highlights the East Coast states of the United States.  I have a text file that I put together that lists all the hurricanes by year back through 2007.

Example Code


library(maps)
library(maptools)
library(rgdal)
library(OpenStreetMap) ## for future use to produce aerial image maps
library(raster)

year = 2013
hurricanes = read.table(file=paste("http://statistical-research.com/wp-content/uploads/2013/10/hurricanes.txt",sep=""), sep=",", fill=TRUE, header=T)
hurricanes = as.vector( subset(hurricanes, hurricanes$YEAR==year, select=c("NAME")) )

hurr.dat = list()
max.lon = max.lat = min.lat = min.lon = NULL
b.press = NULL

for(i in 1:nrow(hurricanes)){
raw = read.table(file=paste("http://weather.unisys.com/hurricane/atlantic/",year,"/",hurricanes[i,],"/track.dat",sep=""), skip=2,fill=TRUE)
colnames(raw) = c("Latitude","Longitude","Time","WindSpeed","Pressure","Status")
raw$Pressure = as.character(raw$Pressure)
raw$Pressure[raw$Pressure=="-"] = NA
raw$Pressure = as.numeric(raw$Pressure)

hurr.dat[[i]] = cbind(raw$Latitude, raw$Longitude, raw$Pressure)
b.press = c(b.press, min(raw$Pressure, na.rm=T))

if(is.null(max.lat)){
max.lat = max(raw$Latitude)
} else if(max.lat < max(raw$Latitude)) {
max.lat = max(raw$Latitude)
}
if(is.null(min.lat)){
min.lat = min(raw$Latitude)
} else if (min.lat > min(raw$Latitude)){
min.lat = min(raw$Latitude)
}
if(is.null(max.lon)){
max.lon = max(raw$Longitude)
} else if (max.lon < max(raw$Longitude)){
max.lon = max(raw$Longitude)
}
if(is.null(min.lon)){
min.lon = min(raw$Longitude)
} else if (min.lon > min(raw$Longitude)){
min.lon = min(raw$Longitude)
}

}
xlim <- c(min.lon-5,max.lon+10)
ylim <- c(min.lat-5,max.lat+10)
state.list <- c('new york','new jersey','virginia','massachusetts','connecticut','delaware','pennsylvania','maryland','north carolina','south carolina','georgia','florida',
'new hampshire','maine','district of columbia','west virginia','vermont')
my.map <- map("state", region=state.list, interior = FALSE, xlim=xlim, ylim=ylim)
map("state", region=state.list, boundary = TRUE, col="gray", add = TRUE,xlim=xlim)
map("world", boundary = TRUE, col="gray", add = TRUE,xlim=xlim)

for(j in 1:nrow(hurricanes)){
lines(x=hurr.dat[[j]][,2],y=hurr.dat[[j]][,1],col=j,cex=0.75)
points(x=hurr.dat[[j]][,2],y=hurr.dat[[j]][,1],pch=15,cex=0.4, col=j)
text(hurr.dat[[j]][1,2],
hurr.dat[[j]][1,1],hurricanes[j,])
}

title("Path of 2013 Hurricane Season")

box()
hist(b.press, xlim=c(920,1020), main="Histogram of Barometric Pressure for 2013",
xlab="Barometric Pressure (mb)", ylab="Frequency")
abline(v=940, col='blue',lwd=3)
text(958,.5,"<&amp;lt;2012 Hurricane Sandy")

To leave a comment for the author, please follow the link and comment on his blog: Statistical Research » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.