Dashboards in Flask… Which visualization library should I use?

I’m building a dashboard using Flask... any ideas of which library suits best? Bokeh? Plotly? Dash? Also any code example for dashboards in Flask are appreciated. Thanks!

*Update (3 months later)* \- So I went with Dash after reading all the comments (thanks!) and I have no regrets. For those who are starting with Dash, check out the Youtube channel [Charming Data](https://www.youtube.com/channel/UCqBFsuAz41sqWcFjZkqmJqQ), it has some great tutorials that really made the journey easier.

15 thoughts on “Dashboards in Flask… Which visualization library should I use?”

  1. If you don’t care about where the charts are constructed and rendered, check out Dash by plotly. Otherwise I like to do the standard flask managed plotly.js structure.

  2. Enjoy ! \^\^




  3. check my webapps and the code

    1) [https://leadingpace.herokuapp.com/login](https://leadingpace.herokuapp.com/login)

    use [[email protected]](mailto:[email protected]) and 123 for password

    code: [https://github.com/Constantinepapp/FitnessBot](https://github.com/Constantinepapp/FitnessBot)

    made with flask only and bootstrap for the layout. used bokeh and pygal for the graphs but i advice against pygal due to some bugs and not been maintained

    2) [https://leadingpace.netlify.app/webapp/dashboard.html](https://leadingpace.netlify.app/webapp/dashboard.html)

    use test for username and 123 for password

    code front end : [https://github.com/Constantinepapp/leadingpace](https://github.com/Constantinepapp/leadingpace)

    code back end : [https://github.com/Constantinepapp/leadingpace-api](https://github.com/Constantinepapp/leadingpace-api)

    used flask for the backend to create an api and javascript for the front end, chart js for the graphs. It was a far more pleasant experience than making the same app with only flask. i strongly advice to learn javascript if you want to make webapps in the long run, also chart js far better than bokeh or any other python plotting library.

  4. Dash, which is based on Plotly. You can do all your debugging using Plotly and then use Dash when it’s time to integrate all the Apps.

  5. I also have a dashboard made in flask which is used for AI/ML visualization so performance on large datasets as well as design is a top priority. The library that I would recommend is plotly as it provides interactive plots and the .Scattergl function which handles large datasets pretty well ( it becomes a little slow for plots that have more than 1M points). You can also stylize the plots using the plotly JavaScript library. Another option would be matplotlib as it has an excellent performance on very large datasets, but the style isn’t as good as Plotly’s.

  6. Are you plotting a large amount of data? If so, did you solve how to move around the data? I’m working with a large amount of data pulled from HDFS and want to let the user filter for visuals quickly. Rather than pulling from HDFS multiple times, I was thinking of storing everything in a dataframe and have an endpoint that can do work on that. I’m wondering if this is a good approach and where that large dataframe should be kept. I’m leaning toward a server-side filtering, but can’t land on an approach. Store it in SQLite? Write a temporary CSV and store the file name in a session variable?


Leave a Comment