Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Check the examples

The numbers the guides quote from the Example datasets that come with datui are checked by one script; that every command and query runs is the doc-example runner’s job.

.venv/bin/python scripts/docs/check_examples.py

Run it before a release, before recording demos, and after a change to anything an example touches.

The script reruns each documented query on the frozen datasets through Polars SQL and compares the numbers with the text. It downloads about 140 MB on the first run and keeps the files in ~/.cache/datui-doc-examples (--cache moves it; -k food runs one check). It needs the network, so CI does not run it.

CheckDatasetNumbers it holds the docs to
penguins-species, penguins-countsPalmer penguinsSpecies means and counts, r = 0.871 over 342 pairs
flights-jfk, flights-carriers, flights-daysNYC flights (2013)JFK delay by hour, carrier ranking and AS’s route, 365 days and the worst one, jfk sea
foodFood nutritionRestaurant summary, chicken and chkn counts, the 30 heavy chicken items, missing vitamins
namesUS baby namesThe three-name pivot, its nulls and Jennifer’s peak, name totals
footballPremier League (2020-21)The goals query’s first rows, the 12 postponed dates
launchesSpace launchesThe count pivot
taxisNYC yellow taxis (January 2025)Trips by pickup hour

By hand

The runner opens what each command names and runs each query; what a key does on screen, and the numbers a sampled analysis or a remote dataset shows, still need a person. Build a release binary, run it with a throwaway cache and config (DATUI_CACHE_DIR, DATUI_CONFIG_DIR), and open each dataset from the home screen.

PageDoExpect
Quick startEvery stepThe numbers in the page; Gentoo drills to 124 rows
Query dataEach query, the drill-downs, the q tableResults as written; AS drills to 714 flights, taxi hour 4 to 20,033
Sort, filter and arrange columnsThe five steps30 of 515, 2,430 calories first, vit_a and vit_c hidden
Pivot and meltNames pivot, melt, launches count138, 414 and 62 rows
Make a chartEvery row of the examples tableThe shapes and labels described
AnalysisTaxis with seed 1; penguins without rownamesDescribe and Distribution values; r = 0.871
Check data qualityFood; taxis with seed 1The findings table; 16,000 rows missing together
CopyThe Markdown copy, under tmux with set-clipboard on and [clipboard] backend = "osc52"tmux show-buffer prints the table in the page
Exportgoals.csv381 lines, the three shown first
ViewsSave on 2024, apply on 2023; --view on 2022366, 365 and 365 rows
Remote dataNOAA 2024, its element counts, Bitcoin 202438,466,379 rows; PRCP first; 12 months
PythonThe capture example, with the wheel built as in Build Python bindingsThe three-row summary

Earthquakes change daily, and Bitcoin gains a partition a day: their pages quote no counts. A number that no longer matches is a docs fix or a datui bug; file the bug with the dataset and the steps.