perspective
A data visualization and analytics component, especially well-suited for large and/or streaming datasets.
A high-performance data visualization tool for building interactive charts and dashboards over millions of rows or live-updating data, running inside the browser, Python notebooks, or Node.js without sending data to a server.
Perspective is a tool for building interactive charts, data grids, and dashboards that can handle very large datasets or data that updates in real time. It is designed to be dropped into web applications, Python data notebooks, or server-side projects, without being tied to any specific framework.
The core of Perspective is a high-performance query engine written in C++ that gets compiled into a form that runs directly inside a web browser. This means filtering, grouping, and aggregating millions of rows can happen locally on the user's machine without sending data back to a server. The same engine is also available as a Python library and in Rust, so developers can use it in whichever environment suits their project.
For building dashboards and reports, Perspective provides a visual component that users can interact with to change chart types, pick which columns to show, and apply filters, all through a drag-and-drop interface. It supports over ten chart types including line, bar, scatter, heatmap, treemap, sunburst, and candlestick. There is also a data grid view for spreadsheet-style inspection of rows and columns.
Perspective can also connect to external databases as data sources. The README mentions support for DuckDB, an in-process database, and ClickHouse, a columnar database used for analytics. In these cases, Perspective translates the user's visual selections into native database queries rather than loading all the data into memory itself.
For data scientists working in JupyterLab, a Python notebook environment, Perspective ships as a widget that can be embedded directly into notebook cells. Data in Apache Arrow format, a common columnar data format used in analytics, is supported for reading and writing.
The project is available as npm packages for JavaScript and Node.js, a pip package for Python, and a crate for Rust. Examples on the project site show it being used for financial market data, COVID statistics, census eviction records, and live webcam feeds.
Where it fits
- Build an interactive financial market dashboard with live price feeds and candlestick charts
- Embed a filterable, groupable data grid into a JupyterLab notebook to explore a large dataset
- Connect a drag-and-drop chart builder to a ClickHouse analytics database to let non-technical users slice data visually