For Python coders: Use a Dash dashboard to spice up your presentations

Tanja Pfaffel
5 min readJan 17, 2020

--

A dashboard built with Dash visualizing quality data from car manufacturing plants.

Dash is a Python library that enables coders to create an interactive web GUI around data visualization code. The resulting dashboards can be perfectly used to spice up your presentations.

As a Data Scientist, presenting the results of your analysis in a clear in concise manner is crucial. If the presentation is dull and boring, nobody will listen to you, and your findings will not be appreciated. On the other hand, if you put too much (complicated) stuff on the agenda, nobody will understand what you are trying to say. In either case, your work will not be seen as engaging, no matter how good the results might be.

PowerPoint, and slides in general, are common tools for supporting presentations. However, everyone has seen by now at least a thousand PowerPoint presentations. There are good presentations, that’s for sure. However, when I am confronted with a PowerPoint I often don’t feel excited or particularly interested. And these feelings are invaluable if you want to leave a lasting impression on your audience.

Especially for presenting charts and graphs, PowerPoint is often used. One can simply put the graph on a slide and explain it to the audience, easy. Unfortunately, through this method you only see a static picture of a data set. There is no possibility to interact with your audience, if they have questions on the graph. Furthermore, a chart (should) only contain one key message. For the next key message, a new graph has to be used, and a new slide will be opened. After this one, another slide… and another slide… until the audience gets tired. On the other hand, if the graph contains too many messages to convey, it gets too complicated.

So, is there another tool we can use for presenting graphs, which overcomes these disadvantages? In fact, there is! There are dashboards.

On a dashboard, one can combine interactive graphs and charts in a — for presentations -surprising way. Dashboards can give a good overview of the data by combining different graphs and graph styles on one lucid page. With interactive charts, questions of the audience can be answered in a simple and simultaneously impressive way.

There are many software providers, which specialized on building dashboards such as Tableau and Qlikview. However, you have to pay for the usage of these tools, and for only a few presentations, it makes no sense to buy the software. Therefore, we search for a way to build dashboards by our own.

If you have some previous knowledge in using Python or even already coded your own graphs with Python, Dash could be the ideal Python library for you. Dash is an Open Source Python library for creating interactive web applications. It allows building web GUIs around data visualization code, all of it in Python. It is based on Plotly, a library for plotting interactive charts and graphs. Users can choose values in selection boxes; afterwards the application code changes dynamically according to the selected values.

You can see an example for a Dash dashboard in the following image. I built something similar for a customer presentation and decided to create a general showcase out of it. This is the result! In the upper-left part, you can see some selection possibilities: checkboxes, dropdowns and a range slider. The graphs below and beside show data based on the selected values. If you have already worked with R shiny, it is the same concept.

If you want to try it by yourself, click here.

The graphs are coded with Plotly, which makes them interactive. One can zoom in or out and move the axis. Hover boxes appear in the graph when touching data points with your cursor. They contain additional information about the data point. Just decide which information you want to show.

The best thing is that you do not need to be an app development specialist to build such an application. The web application runs on Flask, a Python web framework. You can run a Flask app with only seven lines of code. The Dash part happens inside the Flask app. You define the layout of your app including the selection boxes and the places of your charts. In the next step, you define the updating function, which lets your graphs change with the selected values. It is a simple Python function. To connect the updating function with the app, we define the input and output values in a callback function. That is all. Nice! For a deeper dive, have a look at the Dash User Guide. Dash provides very good documentation and easy to understand introduction tutorials, with which you can learn how to code with Dash quickly.

A disadvantage I want to mention here is that I have experienced Dash to get a bit slow if a lot of data has to be processed, or if too many graphs are displayed on the web page. Interactive clicks on the graphs take a small delay. So, if you are working with a really big data set or want to show more than — let us say — 5 graphs, maybe another tool is more suitable for you.

Back to presentation mode. Imagine you start your presentation, in the background PowerPoint is running. You are outlining what you have worked on. In the beginning, your audience is awake and you have their full attention.. Then, after 10 minutes, attention starts to decrease. That is the point where you can proclaim: “For showing my results, I built a little dashboard.” And you change to your local dashboard. You can click and zoom in and go into detail where detail is needed. The audience thinks “Wow, I have never seen this before in a presentation, nice!” and you gain their attention back again. You can present the outcomes of your work in an interactive and exciting way.

I am working in a consultancy, and we often have to present the results of our data analysis and prototyping work to customers. Thereby, we use Dash for showing graphs as it enables us to show interactive graphs on a clearly arranged web page. We discovered that using different tools loosens up the presentation. At the same time, it is a nice possibility to show that our skills are broadly diversified. In short, it left a good impression every time we worked with Dash.

If you want the web app to be available online, you have to deploy it, for example, on AWS or another platform provider. This requires some more effort and time, though it is not complicated. The necessary steps are explained in many good tutorials.

In summary, Dash is a great tool to spice up your presentations. If you have knowledge in Python, it is easy to learn. It enables showing interactive graphs with which you can interact with your audience. All graphs are arranged on a single webpage, and so you do not need many slides to show your results. Using other tools than PowerPoint in presentations shows your skills and simultaneously loosens up the presentation. For a smaller data set and not too many graphs to show you should definitely consider using a Dash dashboard.

--

--

Tanja Pfaffel
0 Followers

I am working as Data Scientist at msg systems in Munich. I love hiking and getting my hands dirty on data.