Skip to content

altair-viz/altair_widgets

Repository files navigation

Altair Widgets

Note: Altair-widgets is experimental and not well supported. Use with care.

Altair Widgets are a tool to easily allow to interact with Altair charts in the Jupyter notebook.

This tool allows interactive exploration:

This library depends on Altair which relies on Vega-Lite for rendering charts. On Vega's homepage they list some other interactive toolkits. One of these is Voyager which has an online app that can be used with any CSV data.

Install

With conda:

$ conda install -c conda-forge ipywidgets
$ conda install -c conda-forge altair
$ pip install altair_widgets

With pip:

$ pip install altair_widgets
$ jupyter nbextension enable --py --sys-prefix widgetsnbextension
$ jupyter nbextension enable --py --sys-prefix vega

Google Colab

These commands allow widgets to work on Google CoLab:

jupyter nbextension enable --py --sys-prefix widgetsnbextension
jupyter nbextension enable --py --sys-prefix vega
pip install altair_saver
pip install jupyter pandas vega
pip install --upgrade notebook
jupyter nbextension install --sys-prefix --py vega
apt-get update
apt-get -qq install chromium-chromedriver

Here are the issues tracking ipywidgets support on Google Colab: