{"id":26520600,"url":"https://github.com/unytics/static_bi","last_synced_at":"2026-05-16T23:06:33.621Z","repository":{"id":282388656,"uuid":"948426854","full_name":"unytics/static_bi","owner":"unytics","description":"Embed Analytics Everywhere!","archived":false,"fork":false,"pushed_at":"2025-07-04T08:15:30.000Z","size":14686,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-19T20:43:38.381Z","etag":null,"topics":["chartjs","dashboards","duckdb","static-bi","static-site","web-components"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unytics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-14T10:13:54.000Z","updated_at":"2025-12-19T11:24:55.000Z","dependencies_parsed_at":"2025-04-23T16:41:24.593Z","dependency_job_id":"e5c70c3d-1c94-4e52-b809-27246f193921","html_url":"https://github.com/unytics/static_bi","commit_stats":null,"previous_names":["unytics/static_bi","unytics/staticbi"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/unytics/static_bi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unytics%2Fstatic_bi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unytics%2Fstatic_bi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unytics%2Fstatic_bi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unytics%2Fstatic_bi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unytics","download_url":"https://codeload.github.com/unytics/static_bi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unytics%2Fstatic_bi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31993755,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chartjs","dashboards","duckdb","static-bi","static-site","web-components"],"created_at":"2025-03-21T12:22:53.463Z","updated_at":"2026-04-19T03:32:24.812Z","avatar_url":"https://github.com/unytics.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n![logo](docs/assets/static_bi_logo_and_name.svg)\n\n\n\u003cp align=\"center\"\u003e\n    \u003cem\u003eEmbed Analytics Everywhere\u003c/em\u003e\n\u003c/p\u003e\n\n---\n\n\u003cbr\u003e\n\n\n## Static BI?\n\nStatic BI is **the easiest way to embed \u003cu\u003eInteractive Dashboards\u003c/u\u003e in your website**.\n\n\u003cbr\u003e\n\n\n## Your first dashboard\n\nTo create a dashboard, you only need to:\n\n\u003e 1. [Add BI components in a html file](#1-add-bi-components-in-a-html-file)\n\u003e 2. [Open the file in a browser](#2-open-the-file-in-a-browser)\n\u003e 3. [Play with your dashboard](#3-play-with-your-dashboard)\n\u003e 4. [Deploy Anywhere](#4-deploy-anywhere)\n\n\u003cbr\u003e\n\n#### 1. Add BI components in a html file\n\nTo follow the evolution of stocks value of some companies over time, create an html file with this content:\n\n\n``` html title=\"my_first_dashboard.html\"\n\u003csource-table\n  name=\"stocks\"\n  url=\"https://idl.uw.edu/mosaic/data/stocks.parquet\"\n  columns=\"*, Symbol as company, Close as stock_value, date_trunc('month', Date) as month\"\u003e\n\u003c/source-table\u003e\n\n\u003cbar-chart\n  table=\"stocks\"\n  measure=\"avg(stock_value)\"\n  by=\"company\"\u003e\n\u003c/bar-chart\u003e\n\n\u003cline-chart\n  table=\"stocks\"\n  measure=\"avg(stock_value)\"\n  by=\"month\"\n  order_by=\"month\"\u003e\n\u003c/line-chart\u003e\n\n\n\u003cscript type=\"module\" src=\"https://unytics.io/static_bi/src/connectors/duckdb.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"module\" src=\"https://unytics.io/static_bi/src/components/source_tables.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"module\" src=\"https://unytics.io/static_bi/src/components/echarts.js\"\u003e\u003c/script\u003e\n```\n\u003cbr\u003e\n\n#### 2. Open the file in a browser\n\nOpen the file in Google Chrome (or any browser) and you'll get this simple dashboard:\n\n![simple_dashboard](docs/assets/simple_dashboard.png)\n\n\u003cbr\u003e\n\n#### 3. Play with your dashboard\n\nThe dashboard is interactive! Click on `AMZN` bar in the bar chart to filter the data in other charts:\n\n![simple_dashboard_filtered](docs/assets/simple_dashboard_filtered.png)\n\n\u003cbr\u003e\n\n#### 4. Deploy Anywhere\n\nYou can deploy a website with Static BI components anywhere:\n\n- in your own website, web app\n- in static websites hosting services: github pages, gitlab pages, s3, google cloud storage, netlify, vercel, etc\n\n\u003cbr\u003e\n\n\n## Key Features\n\n1. **Declarative UI**\n    - *Define data sources and charts using simple custom HTML tags (e.g., `\u003cbar-chart\u003e`, `\u003cscore-card\u003e`, `\u003csource-table\u003e`).*\n    - *Includes Rich \u0026 Customizable Component Library.*\n2. **Interactive Filtering**\n    - *Click on chart elements (bars, lines, pie slices) to filter the data across other components on the page.*\n    - *Supports multi-select with `Ctrl`/`Cmd` key.*\n3. **Serverless Analytics**\n    - *Runs entirely in the browser after loading static assets (HTML, JS, CSS, data files).*\n    - *Can be deployed anywhere*\n\n\n\n\u003cdetails markdown\u003e\n\n\u003csummary\u003eHow it works\u003c/summary\u003e\n\nStatic BI is Powered by [DuckDB-WASM](https://duckdb.org/docs/api/wasm/overview), [ECharts](https://echarts.apache.org/) and [Web Components](https://developer.mozilla.org/en-US/docs/Web/API/Web_Components).\n\n1.  **Data Management:** The `\u003csource-table\u003e` components initializes DuckDB-WASM and instruct it to load data (e.g., fetch a Parquet file or fetch data from an API) within the in-browser database.\n2.  **Component Initialization:** Custom elements like `\u003cbar-chart\u003e`, `\u003cscore-card\u003e`, etc., are defined in JavaScript modules and used directly in the HTML/Markdown content.\n3.  **Data Querying:** When the page loads or filters change, each component constructs a SQL query based on its attributes (e.g., `table`, `measure`, `by`, `breakdown_by`) and the current global filters. It sends this query to `DuckDB`.\n4.  **Rendering:** The component receives query results from DuckDB and renders the visualization using ECharts or by generating appropriate HTML (for tables/scorecards).\n5.  **Interactivity:** Click events on chart elements trigger a filter update. The `base_chart.js` logic updates the global filter state and dispatches an event, causing relevant components to re-query data and re-render.\n\n\u003c/details\u003e\n\n\n\u003cdetails markdown\u003e\n\n\u003csummary\u003eInspiration\u003c/summary\u003e\n\n- [Evidence](https://evidence.dev/)\n- [Rill Data](https://www.rilldata.com/)\n- [Mosaic](https://idl.uw.edu/mosaic/)\n- [Lightdash](http://lightdash.com/)\n\n\u003c/details\u003e\n\n\n\u003cbr\u003e\n\n\n## Contribute!\n\nStatic BI is fully open-source (MIT License). Any contribution is more than welcome 🤗!\n\n- Add a ⭐ on the [repo](https://github.com/unytics/static_bi) to show your support\n- [Join our Slack](https://join.slack.com/t/unytics/shared_invite/zt-1gbv491mu-cs03EJbQ1fsHdQMcFN7E1Q) and talk with us\n- [Raise an issue](https://github.com/unytics/static_bi/issues/new/choose)\n- Open a Pull-Request!\n\n\n\u003cdetails markdown\u003e\n  \u003csummary\u003eTodo Ideas\u003c/summary\u003e\n\n- Add Examples\n- Add Documentation\n- Add controls such as date-range or dimension selection.\n- Create a playground to edit dashboard code online and see result in realtime\n- Add connectors to:\n    - cubejs\n    - supabase\n    - 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`\n    - buckets\n    - data-warehouses...\n    - unytics\n  - Add layout components?\n    - tabs\n    - grid / columns\n\n\u003c/details\u003e\n\n\u003cbr\u003e\n\n\u003cstyle\u003e\n.md-typeset h1 {\n  font-size: 0px;\n}\n\u003c/style\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funytics%2Fstatic_bi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funytics%2Fstatic_bi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funytics%2Fstatic_bi/lists"}