Ideas for future tools development
Take this example and turn it into a tool for uploading field data or telemetry data Input data: “id” “lat” “lon” “obs_date”
#Example turtle_df <- read.csv(“seamap105_mod.csv”) summary(turtle_df) timestamp <- as.POSIXlt(strptime(as.character(turtle_df$obs_date), “%m/%d/%Y %H:%M:%S”), “GMT”) turtle_df1 <- data.frame(turtle_df, timestamp=timestamp) turtle_df1$lon <- ifelse(turtle_df1$lon < 0, turtle_df1$lon+360, turtle_df1$lon) turtle_sp <- turtle_df1[order(turtle_df1$timestamp),] coordinates(turtle_sp) <- c(“lon”, “lat”) proj4string(turtle_sp) <- CRS(“+proj=longlat +ellps=WGS84”) library(maptools) gshhs.c.b <- system.file(“share/gshhs_c.b”, package=”maptools”) gpclibPermit() require(gpclib) pac <- Rgshhs(gshhs.c.b, level=1, xlim=c(130,250), ylim=c(15,60), verbose=FALSE) plot(pac$SP, axes=TRUE, col=”grey85”, xaxs=”i”, yaxs=”i”) plot(turtle_sp, add=TRUE) m_rle <- rle(months(turtle_sp$timestamp)) clen <- cumsum(m_rle$lengths[-length(m_rle$lengths)])-1 crds <- coordinates(turtle_sp) text(crds[clen,], labels=m_rle$values[-1], pos=3, offset=1.5, srt=45)
map() # low resolution map of the world map(‘usa’) # national boundaries map(‘county’, ‘new jersey’) # county map of New Jersey map(‘state’, region = c(‘new york’, ‘new jersey’, ‘penn’)) # map of three states map(“state”, “.*dakota”, border = 0) # map of the dakotas map.axes() # show the effect of border = 0 if(require(mapproj)) map(‘state’, proj = ‘bonne’, param = 45) # Bonne equal-area projection of states
map(‘county’, ‘washington,san’, names = TRUE, plot = FALSE)
map(“state”, interior = FALSE) map(“state”, boundary = FALSE, lty = 2, add = TRUE)
data(ozone) map(“state”, xlim = range(ozone$x), ylim = range(ozone$y)) text(ozone$x, ozone$y, ozone$median) box()