Skip to content

Get Started

logo

Embed Analytics Everywhere



Static BI?

Static BI is the easiest way to embed Interactive Dashboards in your website.


Your first dashboard

To create a dashboard, you only need to:

  1. Add BI components in a html file
  2. Open the file in a browser
  3. Play with your dashboard
  4. Deploy Anywhere


1. Add BI components in a html file

To follow the evolution of stocks value of some companies over time, create an html file with this content:

my_first_dashboard.html
<source-table
  name="stocks"
  url="https://idl.uw.edu/mosaic/data/stocks.parquet"
  columns="*, Symbol as company, Close as stock_value, date_trunc('month', Date) as month">
</source-table>

<bar-chart
  table="stocks"
  measure="avg(stock_value)"
  by="company">
</bar-chart>

<line-chart
  table="stocks"
  measure="avg(stock_value)"
  by="month"
  order_by="month">
</line-chart>


<script type="module" src="https://unytics.io/static_bi/src/connectors/duckdb-wasm.js"></script>
<script type="module" src="https://unytics.io/static_bi/src/components/source_tables.js"></script>
<script type="module" src="https://unytics.io/static_bi/src/components/echarts.js"></script>

2. Open the file in a browser

Open the file in Google Chrome (or any browser) and you'll get this simple dashboard:

simple_dashboard


3. Play with your dashboard

The dashboard is interactive! Click on AMZN bar in the bar chart to filter the data in other charts:

simple_dashboard_filtered


4. Deploy Anywhere

You can deploy a website with Static BI components anywhere:

  • in your own website, web app
  • in static websites hosting services: github pages, gitlab pages, s3, google cloud storage, netlify, vercel, etc


Key Features

  1. Declarative UI
    • Define data sources and charts using simple custom HTML tags (e.g., <bar-chart>, <score-card>, <source-table>).
    • Includes Rich & Customizable Component Library.
  2. Interactive Filtering
    • Click on chart elements (bars, lines, pie slices) to filter the data across other components on the page.
    • Supports multi-select with Ctrl/Cmd key.
  3. Serverless Analytics
    • Runs entirely in the browser after loading static assets (HTML, JS, CSS, data files).
    • Can be deployed anywhere


Architecture: one interface, window.dashboard

BI components never build SQL and never talk to a database. They turn their HTML attributes into a QuerySpec and hand it to window.dashboard, a small interface installed by a connector. The same components therefore run in two architectures:

Connector Where queries run
Standalone, in the browser src/connectors/duckdb-wasm.js DuckDB-WASM (Web Worker) in the page, on Parquet / CSV / JSON files declared with <source-table>
Sandboxed iframe ↔ Host src/connectors/iframe-bridge.js In the parent application: the page lives in <iframe sandbox="allow-scripts"> with connect-src 'none' and only exchanges postMessage messages with its Host (host-bridge.js)

and with two query grammars:

Example QuerySpec
Table mode (SQL expressions) <bar-chart table="stocks" measure="avg(stock_value)" by="company"> { mode: "table", table, metrics, dimensions, breakdown, filters, ... } compiled to SQL by the connector
Semantic mode (no table attribute) <bar-chart measure="ca_ttc" by="region" compare="yoy"> { mode: "semantic", metrics, dimensions, filters, date_range, period_comparison_method, ... } resolved by the Host's measures dictionary
const { rows, meta } = await window.dashboard.query(spec);      // or query('a_named_query')
window.dashboard.filters.toggle('country', 'France', { multi: true });   // what a Ctrl + click does
window.dashboard.filters.setDateRange(['2026-01-01', '2026-11-30']);
window.dashboard.subscribe((change) => render());               // filters, dateRange, options, variables, theme, sourcesReady

Custom scripts (for instance a hand-written ECharts chart) use exactly the same API as the built-in components.

👉 Details: Architecture · runnable demos: examples/


Run the examples and the tests

python3 -m http.server 8000
npm test
npm install && npm run test:e2e

npm test runs the unit tests (no dependency needed). npm run test:e2e opens the examples in headless Chromium (needs Playwright).


How it works

Static BI is Powered by DuckDB-WASM, ECharts and Web Components. No build step: everything is vanilla ES modules.

  1. Connector: a connector script installs window.dashboard (DuckDB-WASM in the page, or a postMessage bridge to a Host).
  2. Data Management (standalone): <source-table> components register their file (Parquet, CSV, JSON) with window.dashboard.registerSource; the connector loads it into the in-browser database.
  3. Data Querying: when the page loads or filters change, each component builds a QuerySpec from its attributes (table, measure, by, breakdown-by...) and the global filters, and calls window.dashboard.query(spec). The connector compiles it to SQL (or forwards it to the Host).
  4. Rendering: the component receives { rows, meta } and renders with ECharts or plain HTML (tables, score cards), with loading / empty / error states.
  5. Interactivity: a click on a chart element calls window.dashboard.filters.toggle(dimension, value). Every subscribed component queries again and re-renders.
Inspiration


Contribute!

Static BI is fully open-source (MIT License). Any contribution is more than welcome 🤗!

Todo Ideas
  • Add Examples
  • Add Documentation
  • Create a playground to edit dashboard code online and see result in realtime
  • Add connectors to:
    • cubejs
    • supabase
    • Postgrest: docker run --rm -p 3000:3000 -e PGRST_DB_URI="postgres://cube:12345@demo-db.cube.dev/ecom" -e PGRST_DB_ANON_ROLE=cube -e PGRST_DB_AGGREGATES_ENABLED=true postgrest/postgrest
    • buckets
    • data-warehouses...
    • unytics
  • Add layout components?
    • tabs
    • grid / columns