Perspective › Examples
Webcam — Video Wall Themed
3-panel dashboard of Heatmap, Y Bar and X/Y Scatter: Heatmap chart of color, grouped by x, split by y, with 2 computed expression columns; Y Bar chart of color, grouped by bucket("color", 5), with 3 computed expression columns; X/Y Scatter chart of x, New Column 2 and color, grouped by x and y, filtered to x < 0, with 3 computed expression columns.
One camera, three readings: heatmap, luminosity histogram and scatter.

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": "split-layout",
"children": [
{
"type": "tab-layout",
"tabs": [
"PERSPECTIVE_GENERATED_ID_0"
],
"selected": 0
},
{
"type": "split-layout",
"children": [
{
"type": "tab-layout",
"tabs": [
"PERSPECTIVE_GENERATED_ID_1"
],
"selected": 0
},
{
"type": "tab-layout",
"tabs": [
"PERSPECTIVE_GENERATED_ID_2"
],
"selected": 0
}
],
"sizes": [
0.5,
0.5
],
"orientation": "vertical"
}
],
"sizes": [
0.55,
0.45
],
"orientation": "horizontal"
},
"panels": {
"PERSPECTIVE_GENERATED_ID_0": {
"columns_config": {},
"plugin": "Heatmap",
"plugin_config": {},
"table": "webcam",
"theme": "Phosphor",
"title": "Heatmap Cam",
"group_by": [
"x"
],
"split_by": [
"y"
],
"sort": [],
"filter": [],
"group_rollup_mode": "flat",
"split_rollup_mode": "flat",
"expressions": {
"y": "-floor(\"index\" / 80)",
"x": "-\"index\" % 80"
},
"columns": [
"color"
],
"aggregates": {}
},
"PERSPECTIVE_GENERATED_ID_1": {
"columns_config": {},
"plugin": "Y Bar",
"plugin_config": {},
"table": "webcam",
"theme": "Dracula",
"title": "Luminosity Histogram",
"group_by": [
"bucket(\"color\", 5)"
],
"split_by": [],
"sort": [],
"filter": [],
"group_rollup_mode": "flat",
"split_rollup_mode": "flat",
"expressions": {
"bucket(\"color\", 5)": "bucket(\"color\", 5)",
"y": "-floor(\"index\" / 80)",
"x": "-\"index\" % 80"
},
"columns": [
"color"
],
"aggregates": {}
},
"PERSPECTIVE_GENERATED_ID_2": {
"columns_config": {},
"plugin": "X/Y Scatter",
"plugin_config": {},
"table": "webcam",
"theme": "Vaporwave",
"title": "Scatter Cam",
"group_by": [
"x",
"y"
],
"split_by": [],
"sort": [],
"filter": [
[
"x",
"<",
0
]
],
"group_rollup_mode": "flat",
"split_rollup_mode": "flat",
"expressions": {
"y": "floor(\"index\" / 80)",
"New Column 2": "-floor(\"index\" / 80) * 50 - \"color\"",
"x": "-\"index\" % 80"
},
"columns": [
"x",
"New Column 2",
"color",
null,
null,
null,
null
],
"aggregates": {
"New Column 2": "avg",
"x": "avg"
}
}
},
"active": "PERSPECTIVE_GENERATED_ID_0"
}
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