From the course: Python Data Visualization: Create Impactful Visuals, Animations, and Dashboards by Pearson

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Demo

Demo

In this demo, we're going to explore how we can use IPyWidgets as a way to add a level of interactivity to your virtualizations. Essentially, the idea is that you create widgets that allow you to manipulate your visualization in real-time and show different aspects and different facets of your data as a way of exploring the data interactively. So we start by importing everything. This case, of course, we have to import the IPyWidgets module as well. My IPyWidgets version is 8.1.5, and we're going to start by loading the Gapminder data from the data directory, creating an array of colors and continents, and writing a function to essentially plot out the different continents. This will generate our Gapminder figure whenever we call this function plotContinents. So this is the figure we already had from the matplotlib demo. So I won't spend too much time going into the details on how this specific figure works. What we're going to do now is we're going to make this a little bit…

Contents