Skip to content
Increment 0.1.0a6 prerelease documentation. These docs describe the increment 0.1.0a6 prerelease (v0.1.0a6). Its API may change. Install: pip install 'increment==0.1.0a6' Keep any extras requested by the guide, such as increment[dashboard]==0.1.0a6.

Optional dashboard (`increment.dashboard`)

increment.dashboard is an optional presentation layer over one bound experiment: a complete interactive four-tab dashboard, section-level mo.Html helpers, and thin adapters over the public run results and CoefTable APIs. Install it with pip install "increment[dashboard]"; core Increment, estimation, power, and the dataframe entry points never import marimo, CoefTable, or pandas through this package. See the dashboard guide for the caller-owned source/config/prepare/render recipe, supported experiment shapes, and statistical disclosures.

DashboardConfig(expected_allocation, title, source_label, provenance, metric_units, theme, exploratory_metrics)

Display configuration a caller supplies alongside their experiment.

exploratory_metrics are the added metrics shown. The overview’s exploratory family counts every saved metric the definitions offer whether shown or not, so choosing what to display, before or after seeing results, never changes the correction.

DashboardSnapshot(experiment_name, binding_fingerprint, title, description, start, end, control_group, treatment_group, primary_metric, metrics, breakouts, estimates, readout_rows, allocation, allocation_refusal, allocation_history, allocation_history_refusal, config, computed_at, group_data, explore, overview, overviews, population_estimates, exploratory_metrics, offered_metrics, triggered_allocation, triggered_allocation_refusal, triggered_allocation_history, triggered_allocation_history_refusal, health, readout_collection, population_collections, view_multiplicity)

One prepared reading of an experiment: metadata, allocation, results, Explore views.

Read-only by construction. It holds no connection, reader or source and is not a portable analysis format; reprepare from the source instead of persisting it. binding_fingerprint identifies the experiment declarations it was prepared from, so a later lookup can refuse another experiment without reading anything. explore maps (view, metric or None, completed windows only, breakout) to the capture taken inside the same pinned read as the headline, where breakout is a declared (source, property) choice or None for the whole experiment; load_explore only looks these up. A hand-built snapshot with no captures refuses every Explore request. offered_metrics are every saved metric read and counted in the overview’s family; exploratory_metrics are the ones shown. view_multiplicity is the plan’s declared correction for segmented views, or None for route defaults.

increment.dashboard.ExploreView is the exported literal type "cumulative_lift" | "daily_values" | "cumulative_values" | "segments", accepted by load_explore and render_explore.

prepare_dashboard(experiment, reader, config)

Run the headline readout once and capture it as a read-only snapshot.

This is the only place the dashboard computes results. The reader’s source is verified against experiment and pinned once; the headline, allocation, health, group data and every Explore view a caller can later load are read from that pin, so load_explore never touches the warehouse and a later source change cannot make the views disagree with the headline; reexecuting the source cell is an intentional new snapshot. The caller keeps ownership of reader and its connection: nothing here closes or replaces them, and the snapshot retains neither. Repeated ratio cautions become one summary; each distinct unrelated warning is shown once. Details remain on affected results.

render_dashboard(experiment, snapshot)

The complete interactive dashboard for one prepared snapshot.

experiment proves the snapshot belongs to the caller’s experiment; every tab reads only captured evidence. In a running notebook, adding or removing exploratory metrics in Explore re-renders the same snapshot showing them; nothing is read again. A static export shows its captured selection.

dashboard_styles(theme)

The configured theme tokens and packaged section stylesheet as one style block.

Standalone sections scope the theme to .inc-dashboard-root, so the notebook canvas is untouched and the typography, layout and palette are the caller’s preset. Read from package data, so an installed wheel needs no stylesheet path and no repository checkout.

render_header(snapshot, population)

Experiment identity, analysis policy, and the selected population’s headline summary.

Readout qualifications are shown by render_results and render_health, not here.

render_health(snapshot)

The allocation, applicable checks, and caveat section shown above results.

render_results(snapshot)

The whole declared family, its readout table, and its disclosures.

render_metric_details(snapshot, metric, population)

Definition, tested tail, policy, and one population’s observed group evidence.

load_explore(experiment, snapshot, metric, view, completed_windows_only, breakout, population)

Load exactly the one advanced view a caller asked for.

A lookup into the views captured with the headline by :func:prepare_dashboard: it reads no warehouse, never reruns the headline family, the allocation check, or materialization, and so cannot disagree with the snapshot or change a verdict. experiment only proves the caller still holds the experiment the snapshot was prepared from; nothing is resolved or read through it. Each call returns a fresh collection; a state the source refused at capture raises its original coded error. metric=None selects every declared metric in snapshot order; a metric name selects just that metric.

breakout names one declared (source, dimension) choice. Segment views require it when breakouts are declared; the temporal views break their series out by it. Each choice was read through that declared breakout alone, so another source of the same property, or its refusal, never appears in it. Without it a temporal view is the whole experiment.

render_explore(snapshot, data, metric, view, completed_windows_only)

The requested chart or table, with context and unavailable-point reasons.

render_details(snapshot)

Experiment brief and its original reproduction settings.

readout_csv(snapshot)

Export every unrounded headline row; unavailable numbers stay empty.

Formula markers after leading whitespace and control-prefixed strings receive an apostrophe for safe human-facing downloads.

group_data_csv(snapshot, metric)

Export exactly the rows returned by :func:group_data_rows.