Gapminders

View a running version of this notebook. | Download this project.


The Panel library from PyViz lets you make widget-controlled apps and dashboards from a wide variety of plotting libraries and data types. Here let's set up four different plotting libraries controlled by a couple of widgets, for Hans Rosling's gapminder example.

In [1]:
import param
import numpy as np 
import pandas as pd
import panel as pn
import holoviews as hv

import altair as alt
import plotly.graph_objs as go
import matplotlib.pyplot as plt

pn.extension('vega', 'plotly')

import hvplot.pandas  # noqa: adds hvplot to pandas objects as a side effect

# Disable default plotly theme
import plotly.io as pio
pio.templates.default = None