The goal of this article is to demonstrate how to visualise animated traces in an interactive map with R.
You can set-up a basic animated map with mapdeck as follows:
library(mapdeck)
library(sf)
mapdeck(
location = c(145, -37.8)
, zoom = 10
, style = mapdeck_style("dark")
, token = Sys.getenv("MAPBOX")
) %>%
add_trips(
data = sf
, animation_speed = 2000
, trail_length = 1000
, stroke_colour = "#FFFFFF"
)