Minkwhale – OBIS seamap

## ===========================================================================
## Mink Whale Sightings
## implemented by Karline Soetaert
## ===========================================================================
# Data from 
url <- "http://seamap.env.duke.edu/species/180524"

require(plot3D)
# terms of use:  citation of OBIS-SEAMAP
# Halpin, P.N., A.J. Read, E. Fujioka, B.D. Best, B. Donnelly, L.J. Hazen, C. Kot, K. Urian, E. LaBrecque, A. Dimatteo, J. Cleary, C. Good, L.B. Crowder, and K.D. Hyrenbach. 2009. OBIS-SEAMAP: The world data center for marine mammal, sea bird, and sea turtle distributions. Oceanography 22(2):104–115 

Mink <- read.csv("species_180524_points.csv") [, c("latitude", "longitude", "count")]

# project on a grid
nbins <- 200
xm    <- seq(-180, 180, length.out = nbins)
ym    <- seq(-90, 90, length.out = nbins)
xy    <- table(cut(Mink$longitude, xm), 
               cut(Mink$latitude, ym))
xy [xy == 0] <- NA

# image to display counts
xmid   <- 0.5*(xm[-1] + xm[-nbins])
ymid   <- 0.5*(ym[-1] + ym[-nbins])

par(oma = c(2, 0, 0, 0))

# First image creates space for a colorkey, but does not plot it
ImageOcean(col = ramp.col (c("lightblue", "darkblue")), shade = 0.1,
  contour = list(levels = 0), NAcol = "grey", colkey = list (plot = FALSE),
  main = "Minkwhale - OBIS seamap")

image2D(x = xmid, y = ymid, z = xy, log = "c", add = TRUE, 
  col = jet2.col(100), NAcol = "transparent", clab = "count")

Go back