Dashboards with Python

You have probably often heard that it is impossible to create a web panel using Python alone and that you need to perform data processing in a web frame (Django, Flask, Sanic…). Then create the visual part using JavaScript (commonly called the D3 library.js). Or you will be prompted to use the R language to solve the problem.

Fortunately, this is not the case, refer to the Dash library built on the plotly library

https://dash.plot.ly/

Dash allows you to create a dashboard using only Python, react is used to create an interface, and Python code is dynamically converted to React, so we get a full-featured dashboard initially associated with our code and data that is entirely in your hands

Dash is a young and fast-growing library, but it can help you right now if you need to visualize your data online

6 Likes

Any good tutorials for this library; I love it but don’t find any good tutorials to learn the nuances of this visualization tool. @moriturus7

1 Like

Since this is a fairly young library, unfortunately there are not so many tutorials

You should start with the official website
https://dash.plot.ly/getting-started

Just do not forget that Dash is created on top of the library Plotly, and therefore almost all the designs from plotly you can use

sentdex leads a good youtube channel with a blog, there are articles dedicated and Dash


https://pythonprogramming.net/data-visualization-application-dash-python-tutorial-introduction/

The community is quite active and there you can ask questions


And of course, to study other people’s projects

4 Likes

Hey, @moriturus7

This might be a dumb question, so sorry in advance, but do you know if it would be able to passt vega/vega-lite charts to plotly/dash?

I really like the altair library for plotting visualisations and I know it takes my python code and translates it into JavaScript to plot the charts - I guess dash does the same thing under the hood.

So, what I wanted to do is to create the charts with altair, so that I don’t have to learn the grammar of another visualisation library and pass the json structure of the chart (which you can get in altair by the method Chart.to_json()) to the plotly library.

Do you think this would be possible ?

I’m not sure how JavaScript works, so I don’t know if the D3 library that plotly/dash uses is compatible with the vega/vega-lite library. So that’s why I’m asking.

Thanks in advance.

1 Like