Building Interactive Data Visualizations in Python: An Introduction to Plotly

Discover the power of interactive visualizations for Data Analysis and Machine Learning

Federico Trotta

Towards Data Science

Image by Gerd Altmann on Pixabay

Data visualization is one of the most important tasks for Data Professionals. It helps us, in fact, understand the data and to ask more questions for further investigations.

But data visualization is not only a task we have to conclude in the Exploratory Data Analysis phase. We may also need to present the data, often to an audience to help it grab some conclusions.

In Python, we generally use matplotlib and seaborn as libraries to plot our graphs.

However, sometimes we may need some interactive visualizations. In some cases, for a better understanding of the data. In some other cases, just to better present our solutions.

In this article, we’ll talk about plotly which is a Python library for making interactive visualizations.

As we can read on their website:

Plotly’s Python graphing library makes interactive, publication-quality graphs. Examples of how to make line plots, scatter plots, area charts, bar charts, error bars, box plots, histograms, heatmaps, subplots, multiple-axes, polar charts, and bubble charts. is free and open source and you can view the source, report issues or contribute on GitHub.

So, Plotly is a free and open-source Python library for making interactive visualizations.

As we can see on their website, it gives us the possibility to create plots for different scopes: AI/ML, statistical, scientific, financial, and much more.

Since we’re interested in Machine Learning and Data Science, we’ll show some plots related to this field and how to create them in Python.

Finally, to install it, we have to type:

$ pip install plotly

One interesting and useful feature of Plotly we can use is the possibility of interactive bubble plots.

Source link

Leave a Comment