Received AIS positions

AIS station vessel positions

Since several months, I have been logging all AIS ship positions in the Clyde Estuary. This is the plot from more than two million positions. Overland plots are from SAR aircrafts. (Search and Rescue Aircrafts) that transmit positions on both AIS and ADS-B frequencies.

To get a similar graph use the ggmap and ggplot2 libraries in R. I would also recommend using Rstudio with R.

lonlat <- read.csv("C:/Users/xxx/lonlat.csv",header=FALSE)
View(lonlat)
# loading the required packages
library(ggplot2)
library(ggmap)
# creating a sample data.frame with your lat/lon points
lon <- c(-38.31,-35.5)
lat <- c(40.96, 37.5)
df <- as.data.frame(cbind(lon,lat))
# getting the map
mapgilbert <- get_map(location = c(lon = mean(df$lon), lat = mean(df$lat)), zoom = 4, maptype = "satellite", scale = 2)
ggmap(mapgilbert) + geom_point(data = df, aes(x = lon, y = lat, fill = "red", alpha = 0.8), size = 1, shape = 21) + guides(fill=FALSE, alpha=FALSE, size=FALSE)

Received AIS positions
Received AIS positions

 

Animated plot

Clyde-Estuary animated coverage
Clyde-Estuary animated coverage

An interesting paper regarding ship pattern and RSSI detection.
A novel anomaly detection approach to identify intentional AIS on-off switching
http://www.sciencedirect.com/science/article/pii/S0957417417300933

With
ggmap(mapgilbert, extent = "device") + geom_density2d(data = df, aes(x = lon, y = lat), size = 0.3) + stat_density2d(data = df, aes(x = lon, y = lat, fill = ..level.., alpha = ..level..), size = 0.01, bins = 256, geom = "polygon") + scale_fill_gradient(low = "green", high = "red", guide = FALSE) + scale_alpha(range = c(0, 0.9), guide = FALSE)

we get an automatic ferry route detection, which show the highest densities.

Automatic ferry route detection
Density Plot: Automatic ferry route detection