[R-sig-Geo] Space-time movement Trajectory on a hovmoller plot

Navinder Singh Navinder.Singh at slu.se
Mon Oct 27 16:15:09 CET 2014


Sorry Frede,
Since Oscar was the one writing the rasterVis package, i thought i could specifically include him as well.
Also, i had not yet given a try with the code, so i couldn’t post it. Ill now give a try to your suggestion.
Thanks again.


Navinder J Singh
Associate Professor
Department of Wildlife, Fish, and Environmental Studies
Faculty of Forest Sciences
Swedish University of Agricultural Sciences
SE-901 83 Umea, Sweden
O: +46 (0)90 786 8538;
M: +46 (0)70 676 0103
email: navinder.singh at slu.se<mailto:navinder.singh at slu.se>
Web: navinderjsingh.weebly.com<http://navinderjsingh.weebly.com/>

www.slu.se/viltfiskmiljo/navinder_singh<http://www.slu.se/viltfiskmiljo/navinder_singh>
http://slu-se.academia.edu/NSingh




On 27 Oct 2014, at 15:08, Frede Aakmann Tøgersen <frtog at vestas.com<mailto:frtog at vestas.com>> wrote:

library(rasterVis)
library(latticeExtra)
library(zoo)

url <- "ftp://ftp.wiley.com/public/sci_tech_med/spatio_temporal_data/"
sst.dat = read.table(paste(url, "SST011970_032003.dat", sep=''), header = FALSE)
sst.ll = read.table(paste(url, "SSTlonlat.dat", sep=''), header = FALSE)

spSST <- SpatialPointsDataFrame(sst.ll, sst.dat)
gridded(spSST) <- TRUE
proj4string(spSST) = "+proj=longlat +datum=WGS84"
SST <- brick(spSST)

idx <- seq(as.Date('1970-01-01'), as.Date('2003-03-01'), by='month')
idx <- as.yearmon(idx)
SST <- setZ(SST, idx)
names(SST) <- as.character(idx)

### dummy points
somepoints <- data.frame(Time = as.yearmon(seq(as.Date("1980-01-01"),as.Date("1990-01-01"),by="6 month")),
                        Latitude = -10:10)

hovmoller(SST, panel=panel.levelplot.raster,
         xscale.components=xscale.raster.subticks,
         interpolate=TRUE, par.settings=RdBuTheme) +
             xyplot(Time ~ Latitude, data = somepoints, pch = 19, col = "black", cex = 1)



	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list