Skip to content

Example gallery

Every notebook under examples/ in the repo demonstrates a specific Strata capability. A card's picture is what that notebook makes, taken from a real run. Click through for the notebook as it ran: every cell with its outputs, without cloning the repo.

To run the examples, start the server on the repo's examples/ directory from a clone:

uv run strata-notebook --notebook-dir examples

Every example then appears under Open Notebook on the Strata home page: open one, click Run All, edit a cell and watch only what depends on it run again. To keep the examples apart from your own work, copy the one you want under your storage root instead: cp -R examples/iris_classification ~/.strata/notebooks/.

Walkthroughs: start here

  • The caching tutorial: a bar chart of revenue by region.The caching tutorial: a bar chart of revenue by region.

    caching: a two-minute tutorial on what the cache saves and what an edit runs again. strata tutorial caching opens a copy.

  • The Keeling curve: CO₂ at Mauna Loa rising from about 315 to 427 ppm since 1958, beside the average year's cycle.The Keeling curve: CO₂ at Mauna Loa rising from about 315 to 427 ppm since 1958, beside the average year's cycle.

    keeling_curve: NOAA's Mauna Loa record, downloaded with # @fetch, the curve and its yearly cycle, then a published figure whose page shows the code and NOAA's bytes behind it. strata tutorial keeling_curve opens a copy.

  • Iris classification: a pairplot of the four flower measurements, coloured by species.Iris classification: a pairplot of the four flower measurements, coloured by species.

    iris_classification: end-to-end ML in seven cells (load, split, train, evaluate, plot). The canonical multi-cell DAG with caching.

  • Pandas basics: a sales DataFrame in the notebook's table viewer.Pandas basics: a sales DataFrame in the notebook's table viewer.

    pandas_basics: core DataFrame operations fanning out from one dataset, with per-cell unit tests.

  • Titanic: a bar chart of feature importance for the best of three classifiers.Titanic: a bar chart of feature importance for the best of three classifiers.

    titanic_ml: feature engineering, then three classifiers trained and the best one evaluated. Closer to a real ML workflow.

  • Data viewer: a 2,000-row transactions table with search, filter, CSV and Parquet buttons and paging.Data viewer: a 2,000-row transactions table with search, filter, CSV and Parquet buttons and paging.

    data_viewer: a DataFrame larger than the inline preview, in the interactive viewer. Page through and sort the full cached artifact.

  • Agent demo: the cell that trains a random forest, the step the cache keeps.Agent demo: the cell that trains a random forest, the step the cache keeps.

    agent_demo: the notebook a coding agent builds live in the strata agent demo. The expensive training cell stays cached while only the evaluation runs again.

Variant cells

  • Model variants: a confusion matrix for the active logistic-regression variant.Model variants: a confusion matrix for the active logistic-regression variant.

    model_variants: three classifier variants (logistic regression, random forest, gradient boosting) sharing one DAG slot. Switch tabs and the downstream cells run again; the other variants stay cached.

  • Model variants sweep: the cell that compares every variant's accuracy, and what it printed.Model variants sweep: the cell that compares every variant's accuracy, and what it printed.

    model_variants_sweep: sweep mode. Every variant runs and one downstream cell compares them as a {variant: value} dict, plus a # @per_variant fan-out.

Prompt cells and AI

These call an LLM: set ANTHROPIC_API_KEY or OPENAI_API_KEY in the notebook's Runtime panel first.

  • Review triage: a structured JSON verdict from a prompt cell.Review triage: a structured JSON verdict from a prompt cell.

    review_triage: a prompt cell with @output_schema, validated against JSON Schema and retried on a bad answer.

  • arxiv_classifier: arXiv papers aggregated on a DataFusion worker, embedded on a GPU worker, classified, and summarized by prompt cells. Needs two local workers (run_local_workers.sh) and an LLM key.

  • news_alpha_trader: a secret manager, an AI pricing lookup and a multi-cell DAG over market news. Needs Alpaca keys and an LLM key.

SQL cells

The server needs the sql and sql-sqlite extras for this one (uv tool install "strata-notebook[sql,sql-sqlite]"); the development environment and the Docker image carry both.

  • SQL orders report: the top five orders above $50 and revenue by product category.SQL orders report: the top five orders above $50 and revenue by product category.

    sql_orders_report: named connections, bind parameters from a Python cell upstream, and schema-aware caching.

Loops, widgets and library cells

  • Hill climb loop: the loop's final state as JSON, with the best score and each step.Hill climb loop: the loop's final state as JSON, with the best score and each step.

    loop_hill_climb: # @loop with carried state and an early-termination predicate.

  • Widget playground: the plot the slider and dropdown drive, titled with their values.Widget playground: the plot the slider and dropdown drive, titled with their values.

    widget_playground: a widget cell (slider, number, dropdown) driving a downstream DataFrame and plot, with # @live recomputing on every change.

  • Library cells: the cell that defines area and perimeter for other cells to call.Library cells: the cell that defines area and perimeter for other cells to call.

    library_cells: def and class shared across cells through the synthetic-module slicing path, and the diagnostic when a helper closes over a runtime value.

Mounts and tables

  • S3 mount: LaGuardia weather rows read from a public bucket, with the mount listed in the notebook settings.S3 mount: LaGuardia weather rows read from a public bucket, with the mount listed in the notebook settings.

    s3_mount: a [[mounts]] entry makes a public S3 prefix a local pathlib.Path inside the cell. Needs the s3 extra.

  • each_pipeline: # @each over 287 real files from a public bucket, each cached on its own, and # @write_table ... sync keeping a table in a REST catalog in step. Needs Docker and the s3 and sql extras.

Markdown

  • Markdown showcase: a leaderboard report rendered as Markdown from a DataFrame.Markdown showcase: a leaderboard report rendered as Markdown from a DataFrame.

    markdown_showcase: every markdown rendering path: headings, lists, tables, code blocks, the security guards, and dynamic Markdown(...) output.

R cells

These need R (Rscript on the server's PATH).

  • r_mtcars_analysis: a pure-R notebook: lm(), aggregate(), and inline ggplot2 and base-graphics plots, with data.frame and R-only (RDS) handoff between R cells.

  • r_lm_vs_sklearn: Python and R in one graph. Fit a model with R's lm() and compare it with scikit-learn over a cross-language Arrow handoff.