geosnap.visualize.plot_timeseries

geosnap.visualize.plot_timeseries(gdf, column, title='', temporal_index='year', time_subset=None, scheme='quantiles', k=5, pooled=True, cmap=None, legend=True, categorical=False, save_fig=None, dpi=200, legend_kwds='default', missing_kwds='default', figsize=None, ncols=None, nrows=None, ctxmap='default', alpha=0.7, web_mercator=True)[source]

Plot an attribute from a geodataframe arranged as a timeseries with consistent colorscaling.

Parameters:
dfpandas.DataFrame

pandas dataframe with

columnstr

column to be graphed in a time series

titlestr, optional

desired title of figure

temporal_indexstr, required

name of column on dataframe that holds unique time periods default is every year in dataframe.

schemestring,optional

matplotlib scheme to be used to create choropleth bins 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.

pooledbool, optional

whether the classification should be pooled across time periods or unique to each. E.g. with a ‘quantile’ scheme, pooled=True indicates that quantiles should be identified on the entire time series, whereas pooled=False indicates that they should be calculated independently for each time period

legendbool, optional

whether to display a legend on the plot

categoricalbool, optional

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

save_figstr, optional

path to save figure if desired.

dpiint, optional

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

legend_kwdsdictionary, optional

parameters for the legend

missing_kwdsdictionary, optional

parameters for the plotting missing data Default is 1 column on the bottom of the graph.

ncolsint, optional

number of columns in the figure if passing ncols, nrows must also be passed default is None

nrowsint, optional

number of rows in the figure if passing nrows, ncols must also be passed default is None

figsizetuple, optional

the desired size of the matplotlib figure

ctxmapcontextily map provider, optional

contextily basemap. Set to False for no basemap. Default is CartoDB.Positron

alphaint (optional)

Transparency parameter passed to matplotlib

web_mercatorbool, optional

whether to reproject the data into web mercator (epsg 3857)