I am trying to plot a path from a dataframe of lat lon coordinates. The data can be found here. This is the code I am using for plotting the path:
library(sf)
library(mapdeck)
library(tidyverse)
df1 <- df %>% st_as_sf(coords = c("lon", "lat")) %>%
group_by(imoNumber) %>%summarise(m=mean(imoNumber, na.rm = TRUE)) %>% st_cast("LINESTRING")
mapdeck(token = key, style = mapdeck_style("outdoors")) %>%
add_path(data = df1)
This plots the data like this:
Is there some way of adding arrow heads to show the direction of the path? Something akin to polyline decorator in leaflet? Desired result is something like this: