In this notebook we use the new Sunburst plot by plotly to illustrate how the World population is splitted among regions and countries. The data set illustrated here originates from the World Bank. This notebook is also a quick demo for the world_bank_data Python package.

In [1]:
import pandas as pd
import plotly
import plotly.offline as offline
import world_bank_data as wb

def version_to_int_list(version):
    return [int(s) for s in version.split('.')]

assert version_to_int_list(plotly.__version__) >= version_to_int_list('3.8.0'), 'Sunburst plots require Plotly >= 3.8.0'

pd.set_option('display.max_rows', 12)