Interactive Dashboard from Jupyter with Voila
Last Updated :
23 Jul, 2025
Jupyter Notebook is used for data visualization, exploration and analysis. Voila is a Python package that allows you to convert Jupyter Notebooks into interactive web applications and we can create interactive web dashboards in it without modify any code. This means you can share your analysis with anyone even if they don't have any Python knowledge. In this article you’ll learn how to convert a Jupyter Notebook into interactive dashboard using Voila
Creating an Interactive Dashboard with Voila
Here is the step-by-step guide to creating an Interactive Dashboard from Jupyter Notebook with Voila:
Step1: Install Voila
Before you start. You need to install voila. You can do this directly from your Jupyter Notebook or from the command line using pip:
pip install voila
Step 2: Create file in Jupyter Notebook
Now open Jupyter Notebook and create a new file. This is where you’ll write the code that powers your dashboard. Start by importing the required libraries like numpy, pandas and plotly.
Python
import numpy as np
import pandas as pd
import plotly.express as px
import plotly.graph_objs as go
import plotly.figure_factory as ff
import warnings
warnings.filterwarnings("ignore")
from IPython.core.display import display, HTML
from IPython.display import display as ipy_display
Use HTML tags to add headings and descriptions to your dashboard. For example:
Python
display(HTML('<h1 style="text-align:center;">Visualization for Voila Dashboard</h1>'))
display(HTML('<p style="text-align:center;"><strong>This is a sample dashboard created with Jupyter Notebook & Voila.</strong></p>'))
Output:
Now that we've set up our notebook and added some basic headings let's load our dataset and take a look at the first few rows. We'll use the pandas
library, which makes it super easy to read data files and work with tables.
Python
reviews = pd.read_csv("/content/winequality-red.csv", index_col=0)
reviews.head()
Output:
Wine Quality DatasetStep 3: Visualize Data with Plotly
Use Plotly to create interactive visualizations. Here are examples of different types of plots:
Scatter Plot
We will create a scatter plot to visualize the relationship between the 'Alchol' and 'Wine Quality' columns of a DataFrame named 'reviews' using an interactive scatter plot.
Python
fig = px.scatter(reviews, x='alcohol', y='quality',
title='Alcohol Content vs. Wine Quality',
labels={'alcohol': 'Alcohol (%)', 'quality': 'Wine Quality'},
color='quality')
ipy_display(fig)
Output:
Scatter plot between wine Quality and Alcohol2D Histogram Contour Plot
It consists of a 2D histogram contour plot and a scatter plot showcasing a combination of 2D histogram contour plot and a scatter plot to visualize the distribution and relationship between the 'Alcohol' and 'pH' columns of a DataFrame named 'reviews'.
Python
fig = px.histogram(reviews, x='quality', nbins=10,
title='Distribution of Wine Quality Ratings',
labels={'quality': 'Wine Quality'})
ipy_display(fig)
Output:
2D plot between Alcohol and pHThe above plot is a 2D histogram contour showing that most alcohol vs pH data points are concentrated around 9.5–10 alcohol and 3.2–3.4 pH.
3D Surface Plot
It processes and filters data from a DataFrame named 'reviews', transforms it and generates an interactive 3D surface plot representing the relationship between 'points' and 'price'.
Python
df = reviews.assign(n=0).groupby(['citric acid', 'pH'])['n'].count().reset_index()
df = df[df['pH'] < 4.5]
z_data = df.pivot(index='pH', columns='citric acid', values='n').fillna(0).values.tolist()
fig = go.Figure(data=[go.Surface(z=z_data)])
fig.update_layout(title='3D Surface Plot of Citric Acid and pH')
ipy_display(fig)
Output:
3d surface plot of citric acid and pHThis plot shows a 3D surface of citric acid and pH indicate high variability in z-values at low citric acid and pH levels.
Step 4: Deploy on a Server
- Save your Jupyter Notebook containing your dashboard.
- Open terminal or command prompt and use the
cd
command to navigate to the directory where your Jupyter Notebook is saved. - Run the following command in the terminal
Voila Voila_Dashboard.ipynb
Then it will automatically launch on your local host in your browser.
Similar Reads
Python - Data visualization tutorial Data visualization is the process of converting complex data into graphical formats such as charts, graphs, and maps. It allows users to understand patterns, trends, and outliers in large datasets quickly and clearly. By transforming data into visual elements, data visualization helps in making data
5 min read
What is Data Visualization and Why is It Important? Data visualization uses charts, graphs and maps to present information clearly and simply. It turns complex data into visuals that are easy to understand.With large amounts of data in every industry, visualization helps spot patterns and trends quickly, leading to faster and smarter decisions.Common
4 min read
Data Visualization using Matplotlib in Python Matplotlib is a widely-used Python library used for creating static, animated and interactive data visualizations. It is built on the top of NumPy and it can easily handles large datasets for creating various types of plots such as line charts, bar charts, scatter plots, etc. Visualizing Data with P
11 min read
Data Visualization with Seaborn - Python Seaborn is a popular Python library for creating attractive statistical visualizations. Built on Matplotlib and integrated with Pandas, it simplifies complex plots like line charts, heatmaps and violin plots with minimal code.Creating Plots with SeabornSeaborn makes it easy to create clear and infor
9 min read
Data Visualization with Pandas Pandas is a powerful open-source data analysis and manipulation library for Python. The library is particularly well-suited for handling labeled data such as tables with rows and columns. Pandas allows to create various graphs directly from your data using built-in functions. This tutorial covers Pa
6 min read
Plotly for Data Visualization in Python Plotly is an open-source Python library designed to create interactive, visually appealing charts and graphs. It helps users to explore data through features like zooming, additional details and clicking for deeper insights. It handles the interactivity with JavaScript behind the scenes so that we c
12 min read
Data Visualization using Plotnine and ggplot2 in Python Plotnine is a Python data visualization library built on the principles of the Grammar of Graphics, the same philosophy that powers ggplot2 in R. It allows users to create complex plots by layering components such as data, aesthetics and geometric objects.Installing Plotnine in PythonThe plotnine is
6 min read
Introduction to Altair in Python Altair is a declarative statistical visualization library in Python, designed to make it easy to create clear and informative graphics with minimal code. Built on top of Vega-Lite, Altair focuses on simplicity, readability and efficiency, making it a favorite among data scientists and analysts.Why U
4 min read
Python - Data visualization using Bokeh Bokeh is a data visualization library in Python that provides high-performance interactive charts and plots. Bokeh output can be obtained in various mediums like notebook, html and server. It is possible to embed bokeh plots in Django and flask apps. Bokeh provides two visualization interfaces to us
4 min read
Pygal Introduction Python has become one of the most popular programming languages for data science because of its vast collection of libraries. In data science, data visualization plays a crucial role that helps us to make it easier to identify trends, patterns, and outliers in large data sets. Pygal is best suited f
5 min read