Gathering detailed insights and metrics for @uwdata/mosaic-sql
Gathering detailed insights and metrics for @uwdata/mosaic-sql
Gathering detailed insights and metrics for @uwdata/mosaic-sql
Gathering detailed insights and metrics for @uwdata/mosaic-sql
An extensible framework for linking databases and interactive views.
npm install @uwdata/mosaic-sql
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
866 Stars
753 Commits
58 Forks
16 Watching
10 Branches
19 Contributors
Updated on 28 Nov 2024
Minified
Minified + Gzipped
JavaScript (59.39%)
TypeScript (34.65%)
Rust (2.31%)
Python (1.23%)
HTML (1.21%)
Jupyter Notebook (0.97%)
CSS (0.24%)
Cumulative downloads
Total Downloads
Last day
3.1%
1,406
Compared to previous day
Last week
9.9%
10,335
Compared to previous week
Last month
22.3%
39,296
Compared to previous month
Last year
4,125.5%
231,725
Compared to previous year
No dependencies detected.
Mosaic is an extensible architecture for linking data visualizations, tables, input widgets, and other data-driven components, leveraging a backing database for scalable processing of both static and interactive views. With Mosaic, you can visualize and explore millions and even billions of data points at interactive rates.
The key idea is to have interface components "publish" their data needs as declarative queries that can be managed, optimized, and cross-filtered by a coordinator that proxies access to DuckDB.
Learn more about Mosaic at the documentation site, or read the Mosaic research paper.
If referencing Mosaic, please use the following citation:
1@article{heer2024mosaic, 2 title={Mosaic: An Architecture for Scalable \& Interoperable Data Views}, 3 author={Heer, Jeffrey and Moritz, Dominik}, 4 journal={IEEE Transactions on Visualization and Computer Graphics}, 5 year={2024}, 6 volume={30}, 7 number={1}, 8 pages={436-446}, 9 doi={10.1109/TVCG.2023.3327189} 10}
This repository contains a set of related packages.
Note: For convenience, the vgplot
package re-exports much of the mosaic-core
, mosaic-sql
, mosaic-plot
, and mosaic-inputs
packages. For most applications, it is sufficient to either import @uwdata/vgplot
alone or in conjunction with @uwdata/mosaic-spec
.
mosaic-core
: The core Mosaic components. A central coordinator, parameters and selections for linking scalar values or query predicates (respectively) across Mosaic clients, and filter groups with materialized views of pre-aggregated data. The Mosaic coordinator can send queries either over the network to a backing server (socket
and rest
clients) or to a client-side DuckDB-WASM instance (wasm
client).mosaic-sql
: An API for convenient construction and analysis of SQL queries. Query objects then coerce to SQL query strings.mosaic-inputs
: Standalone data-driven components such as input menus, text search boxes, and sortable, load-on-scroll data tables.mosaic-plot
: An interactive grammar of graphics implemented on top of Observable Plot. Marks (plot layers) serve as individual Mosaic clients. These marks can push data processing (binning, hex binning, regression) and optimizations (such as M4 for line/area charts) down to the database. This package also provides interactors for linked selection, filtering, and highlighting using Mosaic Params and Selections.vgplot
: A visualization grammar API for building interactive Mosaic-powered visualizations and dashboards. This package provides convenient, composable methods that combine multiple Mosaic packages (core, inputs, plot, etc.) in an integrated API. This API re-exports much of the mosaic-core
, mosaic-sql
, mosaic-plot
, and mosaic-inputs
packages, enabling use in a stand-alone fashion.mosaic-spec
: Declarative specification of Mosaic-powered applications as JSON or YAML files. This package provides a parser and code generation framework for reading specifications in a JSON format and generating live Mosaic visualizations and dashboards using the vgplot API.duckdb-server
: A Python-based server that runs a local DuckDB instance and support queries over Web Sockets or HTTP, returning data in either Apache Arrow or JSON format.widget
: A Jupyter widget for Mosaic. Given a declarative specification, will generate web-based visualizations while leveraging DuckDB in the Jupyter kernel. Create interactive Mosaic plots over Pandas and Polars data frames or DuckDB connections.mosaic-duckdb
: A Promise-based Node.js API to DuckDB, along with a data server that supports transfer of Apache Arrow and JSON data over either Web Sockets or HTTP. Due to persistent quality issues involving the Node.js DuckDB client and Arrow extension, we recommend using the Python-based duckdb-server
package instead. However, we retain this package for both backwards compatibility and potential future use as quality issues improve.duckdb-server-rust
: A Rust-based server similar to duckdb-server
(Python) and mosaic-duckdb
(Node.js) with additional support for HTTP/2. We are still evaluating what server component works best. DuckDB support for Rust is often delayed compared to Python.vega-example
: A proof-of-concept example integrating Vega-Lite with Mosaic for data management and cross-view linking.To build and develop Mosaic locally:
npm i
to install dependencies.npm test
to run the test suite.npm run build
to build client-side bundles.uv build --all-packages
to build the Python packages.To run local interactive examples:
npm run dev
to launch a local web server and view examples. By default, the examples use DuckDB-WASM in the browser. For greater performance, launch and connect to a local DuckDB server as described below below.To launch a local DuckDB server:
npm run server
to launch the duckdb-server
. This runs the server in development mode, so the server will restart if you change its code.To use Mosaic with DuckDB Python in Jupyter Notebooks:
widget
documentation.To use Mosaic with DuckDB-WASM in Observable Notebooks:
To use Mosaic and DuckDB in Observable Framework:
No vulnerabilities found.
No security vulnerabilities found.