Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create an animation with Folium?

I am using Folium to create maps in Python.

I have a Pandas DataFrame where entries (latitude and longitude) are indexed by time. I would like to plot those entries one hour at a time (from 00:00 to 01:00 ...... from 23:00 to 00:00) in order to see the evolution of the of the locations on the map.

Is there a way to create an animation or video for such a purpose in Folium.

like image 641
ryuzakinho Avatar asked Nov 22 '17 17:11

ryuzakinho


1 Answers

You can use the TimestampedGeoJson plugin for this. See an example here:

https://nbviewer.jupyter.org/github/python-visualization/folium/blob/main/examples/Plugins.ipynb#Timestamped-GeoJSON

like image 134
Conengmo Avatar answered Oct 16 '22 04:10

Conengmo