PatrikHlobil / Pandas-Bokeh

Bokeh Plotting Backend for Pandas and GeoPandas

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to update data + is the datasource from plot_bokeh acessible?

ghomem opened this issue · comments

Hi,

I am using plot_bokeh to render a plot based on a GeoDataFrame counties as rows, to which an 'incidence' column has been added:

https://coviz.io/#section3

and it works great.

This incidence column is updated as a function of a slider change.

I have a difficulty concerning the method of updating the plot everytime the slider is changed: because the datasource is not accessible I didn't find a way to update the plot other than generating a new one and inserting it into the layout. This works, but it is rather CPU consuming and causes a ~5 seconds lag.

Any suggestion?

This should do it:

ghomem/coviz@70036c6

but in reality, even though it seems that I am updating the data_source, it does not make the plot change. Does not seem to be much faster either.

This actually works:

https://github.com/ghomem/coviz/pull/3/files

but it ain't faster than what I originally had. Any ideas? Thanks in advance :-)

Found a way to make it work very fast:

ghomem/coviz#4

However the tooltips are not updating (they keep the old values).