A data visualization curriculum of interactive notebooks, using Vega-Lite and Altair. This repository contains a series of Python-based Jupyter notebooks, a corresponding set of JavaScript notebooks are available online on Observable.
-
Introduction to Vega-Lite / Altair
Jupyter Notebook | Open in Colab | Open in Observable -
Data Types, Graphical Marks, and Visual Encoding Channels
Jupyter Notebook | Open in Colab | Open in Observable -
Data Transformation
Jupyter Notebook | Open in Colab | Open in Observable -
Scales, Axes, and Legends
Jupyter Notebook | Open in Colab | Open in Observable -
Multi-View Composition
Jupyter Notebook | Open in Colab | Open in Observable -
Interaction
Jupyter Notebook | Open in Colab | Open in Observable -
Cartographic Visualization
Jupyter Notebook | Open in Colab | Open in Observable
- Altair Debugging Guide
Jupyter Notebook | Open in Colab
The visualization curriculum can be used either online or on your local computer.
- To read JavaScript notebooks online using Observable, click the "Observable" links above.
- To read Python notebooks online using Colab, click the "Colab" links above.
- To read Python notebooks locally, follow the instructions below.
- Install Altair and a notebook environment. The notebooks are written for Altair v3.2 or later.
- Copy the curriculum repository to your local filesystem using
git clone https://github.com/uwdata/visualization-curriculum.git
. - Open the notebooks in your local notebook environment. For example, if you have JupyterLab installed (v1.0 or higher is required), run
jupyter lab
within the directory containing the notebooks.
Depending on your programming environment, you may need to specify a particular renderer for Altair.
- If you are using JupyterLab, Google Colab, or nteract you should not need to do anything — the correct renderer will be enabled by default.
- If you are using Jupyter Notebook, you need to enable the notebook renderer by invoking the following code:
alt.renderers.enable('notebook')
.
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!