Using R to Compare Hurricane Sandy and Hurricane Irene

Having just lived through two back to back hurricanes (Irene in 2011 and Sandy in 2012) that passed through the New York metro area I was curious how the paths of the hurricanes differed.  I worked up a quick graph in R using data from Unisys.  The data also includes wind speed and barometric pressure.


sandy = read.table(file="", skip=3,fill=TRUE)
irene = read.table(file="",skip=3,fill=TRUE)
colnames(sandy) = c("Advisory","Latitude","Longitude","Time","WindSpeed","Pressure","Status")
colnames(irene) = c("Advisory","Latitude","Longitude","Time","WindSpeed","Pressure","Status")

sandy$WindSpeedColor <- 'blue'
sandy$WindSpeedColor[sandy$WindSpeed >= 75] <- 'red'

irene$WindSpeedColor <- 'blue'
irene$WindSpeedColor[sandy$WindSpeed >= 75] <- 'red'
xlim <- c(-88,-65)
ylim <- c(25,48)

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') <- map("state", region = state.list, interior = FALSE, xlim=xlim, ylim=ylim)
map("state", region = state.list, boundary = FALSE, col="gray", add = TRUE,xlim=xlim)

text(x=sandy$Longitude,y=sandy$Latitude,col='dark green',labels=sandy$Pressure,adj=c(-0.9),cex=0.5)

text(x=irene$Longitude,y=irene$Latitude,col='light green',labels=irene$Pressure,adj=c(-0.9),cex=0.5)

title("Path of Hurricane Sandy (2012) and Hurricane Irene (2011)\nwith Wind Speed and Barometric Pressure")
legend('topleft',c('Tropical Storm Wind Speeds','Hurricane Wind Speeds'),pch=15, col=c('blue','red'))




Leave a Reply

Your email address will not be published. Required fields are marked *

five + = 13

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

%d bloggers like this: