Sunday 13:30–14:05 in Auditorium

Building customer-visible data science dashboards with Altair / Vega / Vue

Uwe L. Korn

Audience level:


There are several tools to build ML dashboards and visulisations. Their focus is often on making it as simple as possible for a (Python) data scientist. Shipp ing them as part of our product means that other roles like frontend developers get involved. Aspects that ease development for one role, create pains for oth ers. We want to show how balance this using Altair, Vega and Vue.


Visualising the impact of machine learning models and parts of their resoning is an important component in building a successful data product. Often we use these visualisations to understand the effects and shortcoming of our own models to ourselves and our colleagues. The impact of the output of the machine learning task is often not bound to the team that develops these models but extends to either other departments of the same company or external customers. They need to understand the effects without knowing the internals of the model and without being able to run the model themselves. This might either be due to them not being so techsavy to run the tools or being external in such a sense that the model code itself is a (trade) secret to them.

There are several projects that provide data scientists with a simple tooling to easily create these kind of dashboards. They take care that you can work in the same environment in which they also develop their machine learning models and do their data analysis. One important aspect is that you as a data scientist will not have to leave your comfort zone and deal with other technologies such as JavaScript for frontend rendering. In the end, this leads to very fast development cycles of these dashboards.

These frameworks are really nice to build dashboards for internal use or for presentations in the proof of concept/value phases of new projects to external customers. But when you are building a data product that will be part of the daily business of your customers, you want to provide them with a uniform interface to all your services. These will extend beyond the simple visualisation of the machine learning models. Thus often a dedicated frontend team will be responsible for its development. The majority of this team will work with JavaScript to make build a cohesive interface. In this case, the positive aspect that the dashboard framework takes care of all frontend code turns into a negative one as it often places limitations on what can be done in the frontend.

To bridge the gap between the JavaScript-savy frontend developers and the Python-savy data scientist, we show in this talk on how you can build machine learning dashboards in a way that suits both. To do this, we have three main ingredients: Altair, a declarative (Python) plotting library that generates Vega specifications which in turn are a very flexible and portable way to encode visualizations as JSON. These visualization are then embedded in the remaining UI using the progressive JavaScript framework Vue.js. This combination provides a very powerful toolset for various types of visualization and interaction while enabling the teams of data scientists and frontend developer to work very effectively together without anyone forcing its infrastructure on the other.

Subscribe to Receive PyData Updates