A data visualization curriculum of interactive notebooks, using Vega-Lite and Altair. This book contains a series of Python-based Jupyter notebooks. The notebooks are also available as marimo notebooks, and a corresponding set of JavaScript notebooks are available online on Observable.
Getting Started¶
The visualization curriculum can be used either online or on your local computer. You can view and interact with the plots directly in this Jupyter Book. If you want to modify the code, you have a few different options:
To read JavaScript notebooks online using Observable, navigate to the “Observable” page above and click the corresponding notebook.
To read Python notebooks online using Colab, click the corresponding section in this book, hover over the little rocket ship at the top of the page, and select “Colab” from the menu.
To read Python notebooks locally, follow the instructions below.
Local Installation¶
Install Altair and a notebook environment. The most recent versions of these notebooks use Altair version 6.
Download the notebooks from the releases page. Typically you will want to use the most recent release.
If you are using Jupyter, open the
.ipynbnotebooks in your local notebook environment. For example, if you have JupyterLab installed (v1.0 or higher is required), runjupyter labwithin the directory containing the notebooks. With uv, you can runuv run jupyter lab(it automatically installs the dependencies).If you are using marimo, open the
.pynotebooks in themarimodirectory using eithermarimo run marimo/notebook.py(to use the virtual environment you set up) oruv run marimo run marimo/notebook.py(to automatically install the dependencies in the notebook header).
Depending on your programming environment (and whether or not you have a live internet connection), you may want to specify a particular renderer for Altair.
Credits¶
Developed at the University of Washington by Jeffrey Heer, Dominik Moritz, Jake VanderPlas, and Brock Craft. Thanks to the UW Interactive Data Lab and Arvind Satyanarayan for their valuable input and feedback! Thanks also to the students of UW CSE512 Spring 2019, the first group to use these notebooks within an integrated course curriculum.