Lightweight Python module for generating interactive Pareto charts from DataFrames

I’d like to share a Python module I just released for easily generating interactive Pareto charts from data frames. The result allows you to select columns for the chart from a dropdown list—great for comparing variable distributions.
gapminder

Basically, this module only uses Plotly.js and templates (not Plotly Python), but it might still be useful for Python users.

Below is the complete code to generate the attached chart.

import interpareto as ipar
from vega_datasets import data 
df = data.gapminder_health_income()
df.set_index('country', inplace=True)
ipar.render(df, 'Gapminder.html', title='Pareto of Global Income vs Population – Gapminder 2013')

I needed to generate interactive Pareto charts on shared hosting—where installing Plotly wasn’t an option—so that’s how this module came to be.

Source, demo:

It’s also available on PyPI

2 Likes