Building a Scattermapbox with cumulative frames


I’m very new to plotly, and have trying to create a Scattermapbox figure that plots markers and lines for GPS (location) data. I’m trying to generate plots like the ones in the moveVis R library. An example can be seen here. There are several goals with this kind of animation:

  1. The current frame must contain the latest chunk of data, as well as all the data from all previous frames,
  2. The latest chunk of data in the current frame takes colors from a variable, and markers of decreasing size and opacity,
  3. Old data in the current frame uses only a white line.

It’s easy enough for me to use to plot the full data set, and use the animation_frame, and animation_group arguments to animate chunks of data, but this it’s far from achieving the goals above. Any pointers to any examples addressing even remotely similar goals are much appreciated.