Plotly Vs Bokeh or other tools for data visualization using Streamlit

Viewed 47

I have been using Streamlit to build dashboard. Streamlit is excellent for some simple applications. The script will rerun each time the user makes a decision. Most of the time it is easy and very useful. There are times, however, I am hoping Streamlit could be more flexible.

Examples with data visualization packages.

  1. using matplotlib, the figure is not interactive. Each time I want to rescale the axis, the script will rerun which consumes resources.
  2. I am trying plotly which solves the rescale, or selection problems. Plotly has some built-in icons. If we magnify part of the figure or shift the axis, Plotly seems to update the figure automatically without Streamlit rerunning the script from the beginning.
  3. However, in 2) I am not able to update the data source or fine-tune the figure. For example, I want to do a quick data filter or change the symbol/colors of the data point. The step involves a simple Python script and I have to introduce a slider or drop-down options to control the figure selection. When the user make a choice in the slider or drop-down options, Streamlit will rerun the whole script before updating the figure. It seems that in Dash, the user can update the slider/drop-down without triggering a rerun of the whole script.

Questions: Anyone has solutions for 3)? Can Bokeh + controlling slider/drop down options be displayed in Streamlit, and could be manipulated without the script being rerun?

Again, I think the rerun in Stremlit is a great feature. Most of the time it works. However, there are times I wish the figure could talk to the server without script rerun.

0 Answers
Related