FlexViz is a visualization library for exploring datasets that are too big for conventional Python dashboarding tools.
Charts stay interactive (zoom, pan, cross-filter) at 100M+ rows because every interaction is answered by lazy Polars aggregations and Rust kernels instead of by shipping raw data to the browser.
The same engine serves a coding agent: it builds the dashboard, hands you the URL, and reads back what you zoomed and brushed. You explore the data together, and neither of you loads it.
Brush one chart and every linked chart re-aggregates against the filtered
set. Try it yourself on 2 x 100M rows in the
live demo.
[!WARNING]
FlexViz is pre-1.0 and under active development. APIs, defaults, and the spec
format may change between minor releases, and rough edges remain. Bug reports
are very welcome.
Install
pip install flexviz
The Rust kernels arrive as a prebuilt wheel (flexviz-polars) on Linux
(x86_64, aarch64), macOS (Intel and Apple silicon), and Windows (x64). Any
other platform builds them from source and needs a Rust toolchain.
Quickstart
Run this after pip install flexviz or uv add flexviz.
It generates 10 million rows and opens two linked figures.
import numpy as np
import polars as pl
from flexviz import Dashboard
n = 10_000_000
value = np.sin(np.arange(n) / 5e4) + np.random.default_rng(0).standard_normal(n) * 0.05
value[6_000_000:6_050_000] += 3.0 # a 0.5% burst
ts = pl.datetime(2024, 1, 1) + pl.duration(milliseconds=pl.int_range(n) * 10)
df = pl.select(timestamp=ts, value=pl.Series(value))
dash = Dashboard(df, cache=True)
dash.add_figure(title="value").add_line(x="timestamp", y="value", n_points=2000)
dash.add_figure(title="distribution").add_histogram(x="value", bins=60)
dash.show()
Try:
Zoom the line near 16:40 on Jan 1 to see the shape of the burst.
Brush the histogram above value 2. Only the burst remains in the line.
The same script lives at examples/quickstart_10m.py.
Your own data
import polars as pl
from flexviz import Dashboard
lf = pl.scan_parquet("readings.parquet") # 100M rows, stays lazy
dash = Dashboard(lf)
dash.add_figure().add_line(x="timestamp", y="value")
dash.add_figure().add_histogram(x="value", bins=50)
dash.show() # brush one chart to cross-filter the other
The LazyFrame stays lazy. FlexViz loads nothing until a chart needs it.
Outside a notebook, show() blocks until Ctrl-C. Pass block=False to
return at once.