Segment Overview
Displays a heatmap matrix comparing computed metrics across segment values. Rows are metrics, columns are segment values. Click any cell to see the metric distribution for that segment, or shift-click two cells in the same row to compare distributions side by side.
Usage
es.segment_overview()With options:
es.segment_overview(
segment_col="plan",
metrics_config=[
{"metric": "length", "agg": "mean"},
{"metric": "duration", "agg": "median"},
{"metric": "event_count", "metric_args": {"event": "purchase"}, "agg": "mean"},
{"metric": "has", "metric_args": {"events": ["add_to_cart", "purchase"]}, "agg": "mean"},
],
)Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
segment_col | str | "" | The segment column to split by. Must be declared in the schema's segment_cols. Required to trigger computation. |
metrics_config | list | [] | List of metric configs. Can also be configured interactively via Configure Metrics. See Path Metrics. |
path_id_col | str | None | None | Override the path ID column. |
height | int | 480 | Widget height in pixels. |
sidebar_open | bool | True | Whether the settings sidebar starts open. |
See Path Metrics for the full list of available metrics, their arguments, and aggregation options.
Headless mode
es.segment_overview_data() returns the metric heatmap as a DataFrame without rendering a widget. Rows are metrics, columns are segment values.
df = es.segment_overview_data(
segment_col="platform",
metrics_config=[
{"metric": "length", "agg": "mean"},
{"metric": "event_count", "metric_args": {"event": "purchase"}, "agg": "mean"},
],
)
print(df)
# mobile desktop
# length_mean 8.3 5.1
# event_count_mean 0.4 0.6