Quick Start
This guide walks you through a complete example — from installation to your first interactive visualization — in under five minutes.
1. Install
pip install hopscotch-analytics2. Load your data
Create an Eventstream from a pandas DataFrame. By default, Eventstream expects columns named user_id, event, and timestamp. If your data uses different column names, pass a schema.
import pandas as pd
from hopscotch import Eventstream
df = pd.read_csv("events.csv")
es = Eventstream(df)No CSV yet? Use the built-in sample dataset to follow along:
from hopscotch.datasets.ecom import load_ecom
from hopscotch import Eventstream
df = load_ecom()
es = Eventstream(df, schema={
"path_cols": ["user_id"],
"segment_cols": ["platform", "acquisition_channel"],
})3. Explore with a widget
Open an interactive Transition Graph — no arguments needed. Configure everything in the sidebar.
es.transition_graph()Build a conversion funnel:
es.funnel(steps=["catalog", "add_to_cart", "checkout", "purchase"])Compare two user segments side by side:
es.transition_graph(diff=["platform", "mobile", "desktop"])4. Prepare your data
Use data processors to clean and shape the eventstream before visualizing:
es = (
Eventstream(df)
.filter_events(by_column={"column": "event", "values": ["bot_ping"], "exclude": True})
.rename_events({"btn_click": "button_click"})
)
es.step_sankey()Next steps
- Eventstream — schema configuration and data format
- Widgets — all available visualizations and how they work
- Data Processors — full list of transformations