Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/run-marimo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: run-marimo

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
run:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
with:
python-version: '3.13'

- name: Install dependencies
run: |
uv sync
uv pip install marimo

- name: Run marimo notebooks
run: |
for f in marimo/0[1-7]_*.py; do
echo "Running $f"
uv run marimo export html --sandbox "$f" -o /dev/null
done

- name: Run debugging notebook (deliberately contains errors)
run: uv run marimo export html --sandbox marimo/08_debugging.py -o /dev/null || true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.ipynb_checkpoints
__marimo__
*~
34 changes: 22 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Data Visualization Curriculum

A data visualization curriculum of interactive notebooks, using [Vega-Lite](https://vega.github.io/vega-lite/) and [Altair](https://altair-viz.github.io/). This repository contains a series of **Python**-based Jupyter notebooks. The notebooks are online in a [Jupyter book](https://uwdata.github.io/visualization-curriculum/intro.html), runnable locally or online on [Colab](https://colab.research.google.com/github/uwdata/visualization-curriculum), [Nextjournal](https://github.nextjournal.com/uwdata/visualization-curriculum), or [Deepnote](https://deepnote.com/launch?url=https://github.com/uwdata/visualization-curriculum/blob/master/altair_introduction.ipynb). A corresponding set of **JavaScript** notebooks are available online on [Observable](https://observablehq.com/@uwdata/data-visualization-curriculum).
A data visualization curriculum of interactive notebooks, using [Vega-Lite](https://vega.github.io/vega-lite/) and [Altair](https://altair-viz.github.io/). This repository contains a series of **Python** notebooks using [Jupyter](https://jupyter.org/) and [marimo](https://marimo.io/). The notebooks are online in a [Jupyter book](https://uwdata.github.io/visualization-curriculum/intro.html), runnable locally or online on [Colab](https://colab.research.google.com/github/uwdata/visualization-curriculum), [Nextjournal](https://github.nextjournal.com/uwdata/visualization-curriculum), [Deepnote](https://deepnote.com/launch?url=https://github.com/uwdata/visualization-curriculum/blob/master/altair_introduction.ipynb), or [molab](https://marimo.io/for-learners#learn-altair). A corresponding set of **JavaScript** notebooks are available online on [Observable](https://observablehq.com/@uwdata/data-visualization-curriculum).

## Curriculum

Expand All @@ -13,7 +13,8 @@ A data visualization curriculum of interactive notebooks, using [Vega-Lite](http
[Colab](https://colab.research.google.com/github/uwdata/visualization-curriculum/blob/master/altair_introduction.ipynb) |
[Nextjournal](https://github.nextjournal.com/uwdata/visualization-curriculum/blob/master/altair_introduction.ipynb) |
[Observable](https://observablehq.com/@uwdata/introduction-to-vega-lite) |
[Deepnote](https://deepnote.com/launch?url=https://github.com/uwdata/visualization-curriculum/blob/master/altair_introduction.ipynb)
[Deepnote](https://deepnote.com/launch?url=https://github.com/uwdata/visualization-curriculum/blob/master/altair_introduction.ipynb) |
[Marimo](https://molab.marimo.io/github/uwdata/visualization-curriculum/blob/main/marimo/01_introduction.py)
</small>

2. Data Types, Graphical Marks, and Visual Encoding Channels<br/>
Expand All @@ -23,7 +24,8 @@ A data visualization curriculum of interactive notebooks, using [Vega-Lite](http
[Colab](https://colab.research.google.com/github/uwdata/visualization-curriculum/blob/master/altair_marks_encoding.ipynb) |
[Nextjournal](https://github.nextjournal.com/uwdata/visualization-curriculum/blob/master/altair_marks_encoding.ipynb) |
[Observable](https://observablehq.com/@uwdata/data-types-graphical-marks-and-visual-encoding-channels) |
[Deepnote](https://deepnote.com/launch?url=https://github.com/uwdata/visualization-curriculum/blob/master/altair_marks_encoding.ipynb)
[Deepnote](https://deepnote.com/launch?url=https://github.com/uwdata/visualization-curriculum/blob/master/altair_marks_encoding.ipynb) |
[Marimo](https://molab.marimo.io/github/uwdata/visualization-curriculum/blob/main/marimo/02_marks_encoding.py)
</small>

3. Data Transformation<br/>
Expand All @@ -33,7 +35,8 @@ A data visualization curriculum of interactive notebooks, using [Vega-Lite](http
[Colab](https://colab.research.google.com/github/uwdata/visualization-curriculum/blob/master/altair_data_transformation.ipynb) |
[Nextjournal](https://github.nextjournal.com/uwdata/visualization-curriculum/blob/master/altair_data_transformation.ipynb) |
[Observable](https://observablehq.com/@uwdata/data-transformation) |
[Deepnote](https://deepnote.com/launch?url=https://github.com/uwdata/visualization-curriculum/blob/master/altair_data_transformation.ipynb)
[Deepnote](https://deepnote.com/launch?url=https://github.com/uwdata/visualization-curriculum/blob/master/altair_data_transformation.ipynb) |
[Marimo](https://molab.marimo.io/github/uwdata/visualization-curriculum/blob/main/marimo/03_data_transformation.py)
</small>

4. Scales, Axes, and Legends<br/>
Expand All @@ -43,7 +46,8 @@ A data visualization curriculum of interactive notebooks, using [Vega-Lite](http
[Colab](https://colab.research.google.com/github/uwdata/visualization-curriculum/blob/master/altair_scales_axes_legends.ipynb) |
[Nextjournal](https://github.nextjournal.com/uwdata/visualization-curriculum/blob/master/altair_scales_axes_legends.ipynb) |
[Observable](https://observablehq.com/@uwdata/scales-axes-and-legends) |
[Deepnote](https://deepnote.com/launch?url=https://github.com/uwdata/visualization-curriculum/blob/master/altair_scales_axes_legends.ipynb)
[Deepnote](https://deepnote.com/launch?url=https://github.com/uwdata/visualization-curriculum/blob/master/altair_scales_axes_legends.ipynb) |
[Marimo](https://molab.marimo.io/github/uwdata/visualization-curriculum/blob/main/marimo/04_scales_axes_legends.py)
</small>

5. Multi-View Composition<br/>
Expand All @@ -53,7 +57,8 @@ A data visualization curriculum of interactive notebooks, using [Vega-Lite](http
[Colab](https://colab.research.google.com/github/uwdata/visualization-curriculum/blob/master/altair_view_composition.ipynb) |
[Nextjournal](https://github.nextjournal.com/uwdata/visualization-curriculum/blob/master/altair_view_composition.ipynb) |
[Observable](https://observablehq.com/@uwdata/multi-view-composition) |
[Deepnote](https://deepnote.com/launch?url=https://github.com/uwdata/visualization-curriculum/blob/master/altair_view_composition.ipynb)
[Deepnote](https://deepnote.com/launch?url=https://github.com/uwdata/visualization-curriculum/blob/master/altair_view_composition.ipynb) |
[Marimo](https://molab.marimo.io/github/uwdata/visualization-curriculum/blob/main/marimo/05_view_composition.py)
</small>

6. Interaction<br/>
Expand All @@ -63,7 +68,8 @@ A data visualization curriculum of interactive notebooks, using [Vega-Lite](http
[Colab](https://colab.research.google.com/github/uwdata/visualization-curriculum/blob/master/altair_interaction.ipynb) |
[Nextjournal](https://github.nextjournal.com/uwdata/visualization-curriculum/blob/master/altair_interaction.ipynb) |
[Observable](https://observablehq.com/@uwdata/interaction) |
[Deepnote](https://deepnote.com/launch?url=https://github.com/uwdata/visualization-curriculum/blob/master/altair_interaction.ipynb)
[Deepnote](https://deepnote.com/launch?url=https://github.com/uwdata/visualization-curriculum/blob/master/altair_interaction.ipynb) |
[Marimo](https://molab.marimo.io/github/uwdata/visualization-curriculum/blob/main/marimo/06_interaction.py)
</small>

7. Cartographic Visualization<br/>
Expand All @@ -73,7 +79,8 @@ A data visualization curriculum of interactive notebooks, using [Vega-Lite](http
[Colab](https://colab.research.google.com/github/uwdata/visualization-curriculum/blob/master/altair_cartographic.ipynb) |
[Nextjournal](https://github.nextjournal.com/uwdata/visualization-curriculum/blob/master/altair_cartographic.ipynb) |
[Observable](https://observablehq.com/@uwdata/cartographic-visualization) |
[Deepnote](https://deepnote.com/launch?url=https://github.com/uwdata/visualization-curriculum/blob/master/altair_cartographic.ipynb)
[Deepnote](https://deepnote.com/launch?url=https://github.com/uwdata/visualization-curriculum/blob/master/altair_cartographic.ipynb) |
[Marimo](https://molab.marimo.io/github/uwdata/visualization-curriculum/blob/main/marimo/07_cartographic.py)
</small>

### Support
Expand All @@ -84,7 +91,8 @@ A data visualization curriculum of interactive notebooks, using [Vega-Lite](http
[Jupyter](https://github.com/uwdata/visualization-curriculum/blob/master/altair_debugging.ipynb) |
[Colab](https://colab.research.google.com/github/uwdata/visualization-curriculum/blob/master/altair_debugging.ipynb) |
[Nextjournal](https://github.nextjournal.com/uwdata/visualization-curriculum/blob/master/altair_debugging.ipynb) |
[Deepnote](https://deepnote.com/launch?url=https://github.com/uwdata/visualization-curriculum/blob/master/altair_debugging.ipynb)
[Deepnote](https://deepnote.com/launch?url=https://github.com/uwdata/visualization-curriculum/blob/master/altair_debugging.ipynb) |
[Marimo](https://molab.marimo.io/github/uwdata/visualization-curriculum/blob/main/marimo/08_debugging.py)
</small>

## Getting Started
Expand All @@ -94,14 +102,16 @@ The visualization curriculum can be used either online or on your local computer
### Online

- [Jupyter Book](https://uwdata.github.io/visualization-curriculum/) to read Python notebooks online.
- Run the **Python** notebooks online on [Colab](https://colab.research.google.com/github/uwdata/visualization-curriculum/), [Nextjournal](https://github.nextjournal.com/uwdata/visualization-curriculum/), or [Deepnote](https://deepnote.com/launch?url=https://github.com/uwdata/visualization-curriculum/blob/master/altair_introduction.ipynb)
- Run the **JavaScript** notebooks online using [Observable](https://observablehq.com/collection/@uwdata/visualization-curriculum)
- Run the **Python** notebooks online on [Colab](https://colab.research.google.com/github/uwdata/visualization-curriculum/), [Nextjournal](https://github.nextjournal.com/uwdata/visualization-curriculum/), or [Deepnote](https://deepnote.com/launch?url=https://github.com/uwdata/visualization-curriculum/blob/master/altair_introduction.ipynb).
- Run the **JavaScript** notebooks online using [Observable](https://observablehq.com/collection/@uwdata/visualization-curriculum).
- Run the **marimo** notebooks online using [molab](https://marimo.io/for-learners#learn-altair).

### Local Installation

1. [Install Altair and a notebook environment](https://altair-viz.github.io/getting_started/installation.html). The most recent versions of these notebooks use _Altair version 6_.
2. Download the notebooks from the [releases page](https://github.com/uwdata/visualization-curriculum/releases). Typically you will want to use the most recent release.
3. 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. With [uv](https://docs.astral.sh/uv/guides/install-python/), you can run `uv run jupyter lab` (it automatically installs the dependencies).
3. If you are using [Jupyter](https://jupyter.org/), open the `.ipynb` 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. With [uv](https://docs.astral.sh/uv/guides/install-python/), you can run `uv run jupyter lab` (it automatically installs the dependencies).
4. If you are using [marimo](https://marimo.io/), open the `.py` notebooks in the `marimo` directory using either `marimo run marimo/notebook.py` (to use the virtual environment you set up) or `uv 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](https://altair-viz.github.io/user_guide/display_frontends.html) for Altair.

Expand Down
Loading
Loading