AlgebraOfVega.jl
AlgebraOfVega translates AlgebraOfGraphics.jl specs into Vega-Lite JSON for interactive client-side rendering. Write standard AoG (data * mapping * visual) and get plots that run in the browser with tooltips, legend filtering, zoom/pan, and HTMX-driven server-side updates — without a Makie backend.
Why?
Interactive by default — tooltips, legend click filtering, and zoom/pan without configuration
Composable algebra — the same
*(intersection),+(union), anddims(...)from AoGClient-side rendering — Vega-Lite in the browser, no Makie required
HTMX integration — wire Vega signals to server-side Julia handlers for dynamic dashboards
Tidybayes-style uncertainty —
lineribbon,pointinterval,dotinterval,gradient_interval,ribbonfor posterior visualisationStatic export — also produces standalone HTML, raw Vega-Lite JSON, or SVG via
sdraw
Quick example
using AlgebraOfVega
spec = data(df) * mapping(:x, :y, color=:group) * visual(Scatter) *
config(width=500, title="My Plot")
to_node(spec) # HTMX.Node — embed in HTMXObjects/Oxygen apps. Aliased as `vdraw(spec)`.
to_html(spec) # standalone HTML string
to_vegalite(spec) # raw Vega-Lite JSON DictA VegaSpec (the result of data * mapping * visual * config) auto-renders in text/html-aware contexts via Base.show, so you can also just return the spec directly from notebooks or HTMX route handlers.
Where to next
| Page | What it covers |
|---|---|
| Getting Started | Quick example end-to-end, the algebra (*, +, dims), faceting, mark types |
| Translation Guide | How AoG specs are lowered to Vega-Lite — mappings, layers, scales, the deep-merge contract |
| Gallery | Worked examples — scatter, ribbons, faceting, uncertainty, dashboards |
| FAQ / Gotchas | Aliases (vdraw, vdata), deep-merge surprises, faceting + select, legend binding caveats, interactivity wiring |
| API Reference | Full export list, organised by use case (tidybayes-style lineribbon / pointinterval / dotinterval / gradient_interval / ribbon live here) |
Installation
AlgebraOfVega is not yet registered. Install from GitHub:
using Pkg
Pkg.add(url="https://github.com/nsiccha/AlgebraOfVega.jl")