Transition Graph
Displays an interactive directed graph where nodes are events and edges represent transitions between them. Edge weights can show transition probabilities, counts, or time-based metrics. Supports diff mode to compare two user segments side by side.
Usage
es.transition_graph()With options:
es.transition_graph(
edge_weight="proba_out",
diff=["plan", "pro", "free"],
cloud_file_name="my_graph",
)Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
edge_weight | str | "proba_out" | Values shown on edges. See available values below. |
diff | list | None | None | Enables diff mode. A 3-element list [segment_col, value1, value2]. Use "<OUTER>" as value2 to compare against all other users. |
path_id_col | str | None | None | Override the path ID column. Defaults to the schema primary path column. |
cloud_file_name | str | None | None | Saves and restores widget configuration to the cloud. See Cloud save section in the Widgets overview. |
height | int | 500 | Widget height in pixels. |
sidebar_open | bool | True | Whether the settings sidebar starts open. |
Edge weights
| Value | Description |
|---|---|
proba_out | Probability of transitioning from the source node to this target — share of outgoing transitions. Default. |
proba_in | Probability of arriving at the target from this source — share of incoming transitions. |
count | Number of times this transition occurred. |
unique_paths | Number of unique paths that include this transition. |
transition_rate | Share of paths that contain this transition out of all transitions in the eventstream. |
per_path | Average number of times this transition occurs per path. |
time_median | Median time in seconds between the source and target events. |
time_q95 | 95th percentile time in seconds between the source and target events. |
Headless mode
es.transition_graph_data() returns the transition matrix as a DataFrame without rendering a widget.
| Mode | Returns |
|---|---|
| Standard | DataFrame — events × events matrix of the selected edge weight |
Diff (diff=) | tuple[DataFrame, DataFrame, DataFrame] — (diff, group1, group2) |
tm = es.transition_graph_data(edge_weight="proba_out")
# diff mode
diff, g1, g2 = es.transition_graph_data(
edge_weight="count",
diff=["platform", "mobile", "desktop"],
)