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.
lonlat <- read.csv("C:/Users/xxx/lonlat.csv",header=FALSE)
# loading the required packages
# 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)
An interesting paper regarding ship pattern and RSSI detection.
A novel anomaly detection approach to identify intentional AIS on-off switching
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.