#visualization #analytics #real-time #dataset #streaming #component #browser

perspective

A data visualization and analytics component, especially well-suited for large and/or streaming datasets

55 stable releases

Uses new Rust 2024

new 3.4.1 Mar 12, 2025
3.3.4 Feb 10, 2025
3.2.1 Dec 23, 2024
3.1.7 Nov 30, 2024
1.7.2 Nov 26, 2022

#1146 in WebAssembly

Download history 61/week @ 2024-11-20 239/week @ 2024-11-27 198/week @ 2024-12-04 101/week @ 2024-12-11 108/week @ 2024-12-18 29/week @ 2024-12-25 29/week @ 2025-01-08 85/week @ 2025-01-15 84/week @ 2025-01-22 137/week @ 2025-01-29 271/week @ 2025-02-05 39/week @ 2025-02-12 60/week @ 2025-02-19 48/week @ 2025-02-26 131/week @ 2025-03-05

300 downloads per month

Apache-2.0

1.5MB
35K SLoC

C++ 30K SLoC // 0.1% comments Rust 4.5K SLoC // 0.1% comments JavaScript 50 SLoC // 0.3% comments Python 20 SLoC // 0.5% comments

The Rust language bindings for Perspective, a high performance data-visualization and analytics component for the web browser.

Examples

A simple example which loads an Apache Arrow and computes a "Group By" operation, returning a new Arrow.

use perspective::client::config::ViewConfigUpdate;
use perspective::client::{TableInitOptions, UpdateData, ViewWindow};
use perspective::server::Server;
use perspective::LocalClient;

let data = UpdateData::Arrow(arrow_vec_data);
let options = TableInitOptions::default();
let table = client.table(data.into(), options).await?;
let mut view_config = ViewConfigUpdate::default();
view_config.group_by = ["CounterParty", "Security"]
    .iter()
    .map(|x| Some(x.to_string()))
    .collect();

let view = table.view(Some(view_config)).await?;
let arrow = view.to_arrow(ViewWindow::default()).await?;

See also

Dependencies

~3–13MB
~163K SLoC