PerspectiveExamples

Webcam — Luminosity Histogram

Y Bar chart of color, grouped by bucket("color", 5), with 3 computed expression columns.

Live webcam luminance sampled into a Perspective table at 20fps (falls back to a placeholder image without a camera).

Webcam — Luminosity Histogram: Y Bar chart of color, grouped by bucket("color", 5), with 3 computed expression columns.

Data

Live webcam frames streamed into a Perspective table one pixel per row, and rendered back as real-time heatmaps, scatter plots and histograms.

Generated continuously in the browser by a JavaScript simulation streaming into a Perspective Table.

Configuration

This example is a saved <perspective-viewer> workspace. Pass this JSON to viewer.restoreWorkspace() to reproduce it over the same table:

{
    "layout": {
        "type": "tab-layout",
        "tabs": [
            "p0"
        ],
        "selected": 0
    },
    "panels": {
        "p0": {
            "table": "",
            "plugin": "Y Bar",
            "plugin_config": {},
            "title": "Luminosity Histogram",
            "group_by": [
                "bucket(\"color\", 5)"
            ],
            "split_by": [],
            "columns": [
                "color"
            ],
            "filter": [],
            "sort": [],
            "expressions": {
                "bucket(\"color\", 5)": "bucket(\"color\", 5)",
                "y": "-floor(\"index\" / 80)",
                "x": "-\"index\" % 80"
            },
            "aggregates": {}
        }
    },
    "active": "p0"
}

About Perspective

Perspective is an open-source, WebAssembly-powered data grid, pivot table and charting component for large, real-time and streaming datasets — in the browser, Python, Jupyter, Node.js and Rust.

Documentation