Rio 2016 athletes
athletes.py loads the Rio 2016 roster with Polars, a dataframe library for Python. It calculates age, medal awards, sport participation, and athlete profiles, and fits how body mass scales with height. Every view reads its results from these cells.
Compare the views
In Overview, change Sport. The native marimo control selects one of 29 prepared notebook states. Four mo-value totals, the browser-drawn roster, and the top_sports chart update from that result.
In Explorer, select a sport bar or brush an age range. Mosaic coordinates that browser-side selection while the notebook remains the source of the complete athlete table.
In Field, move through the roster as a four-chapter Three.js 3D presentation. The same records regroup by sport, medal status, height, weight, and age. Its sport control uses the same 29 prepared states as Overview.
In Paper, change Sport to refit a short note on how body mass scales with stature. Quarto, a publishing system built on Pandoc, renders its numbered equations, theorem environments, cross-references, and bibliography, and KaTeX typesets the math in the browser. The results table and the running text read the notebook's fitted values, and one projected cell writes the fitted lines with marimo's own LaTeX beside Quarto's math.
Open Notebook to inspect the controls and Polars operations in their analytical context.
Run locally
From the root of a clone set up as described in Run an example locally:
uv run marimo edit examples/athletes.py --sandboxStudio opens overview, the notebook's default view. Switch among overview, explorer, field, and paper. The Paper renders with the quarto command. Install Quarto 1.9.38 or newer, or use the Quarto from the repository's pixi environment:
pixi run uv run marimo edit examples/athletes.py --sandboxKaTeX loads from a CDN, so the Paper needs no TeX installation. The notebook fetches the pinned athlete CSV from raw.githubusercontent.com. The Explorer and Field views also load the remote font or module origins declared by their view source.