geosnap.visualize.animate_timeseries

geosnap.visualize.animate_timeseries(gdf, column=None, filename=None, title='', temporal_index='year', time_periods=None, scheme='quantiles', k=5, cmap=None, legend=True, alpha=0.6, categorical=False, dpi=200, fps=0.5, interval=500, repeat_delay=1000, title_fontsize=40, subtitle_fontsize=38, figsize=(20, 20), ctxmap='default', plot_kwargs=None, color_col=None)[source]

Create an animated gif from a long-form geodataframe timeseries.

Parameters:
columnstr

column to be graphed in a time series

filenamestr, required

output file name

titlestr, optional

desired title of figure

temporal_indexstr, required

column on the gdf that stores time periods

time_periods: list, optional

subset of time periods to include in the animation. If None, then all times will be used

schemestr, optional

matplotlib scheme to be used default is ‘quantiles’

kint, optional

number of bins to graph. k may be ignored or unnecessary for some schemes, like headtailbreaks, maxp, and maximum_breaks Default is 5.

legendbool, optional

whether to display a legend on the plot

categoricalbool, optional

whether the data should be plotted as categorical as opposed to continuous

alphafloat, optional

transparency parameter passed to matplotlib

dpiint, optional

dpi of the saved image if save_fig=True default is 500

figsizetuple, optional

the desired size of the matplotlib figure

ctxmapcontextily map provider, optional

contextily basemap. Set to False for no basemap.

figsizetuple, optional

output figure size passed to matplotlib.pyplot

fpsfloat, optional

frames per second, used to speed up or slow down animation

intervalint, optional

interval between frames in miliseconds, default 500

repeat_delayint, optional

time before animation repeats in miliseconds, default 1000

plot_kwargs: dict, optional

additional keyword arguments passed to geopandas.DataFrame.plot

color_col: str, optional

A column on the geodataframe holding hex coodes used to color each observation. I.e. to create a categorical color-mapping manually