Perspective › Examples
NYPD CCRB
2-panel dashboard of Y Area and Y Line: Y Area chart of AllegationID, grouped by bucket("IncidentDate", 'M'), split by FADOType, filtered to IncidentDate > 1985-01-01, IncidentDate < 2025-01-01, sorted by AllegationID, with 1 computed expression column; Y Line chart of AllegationID, grouped by bucket("IncidentDate", 'M'), split by FADOType, filtered to IncidentDate > 1985-01-01, IncidentDate < 2025-01-01, sorted by AllegationID, with 1 computed expression column.
Civilian complaints against NYPD officers.

Data
The NYCLU's database of civilian complaints against NYPD officers, loaded from Apache Arrow and cross-filtered in the browser with no server.
Loaded from /data/nypdccrb.arrow as arrow into the perspective-server engine.
Configuration
This example is a saved <perspective-viewer> workspace. Pass this JSON to viewer.restoreWorkspace() to reproduce it over the same table:
{
"active": "PERSPECTIVE_GENERATED_ID_9",
"layout": {
"type": "split-layout",
"children": [
{
"type": "tab-layout",
"tabs": [
"PERSPECTIVE_GENERATED_ID_9"
],
"selected": 0
},
{
"type": "tab-layout",
"tabs": [
"PERSPECTIVE_GENERATED_ID_10"
],
"selected": 0
}
],
"sizes": [
0.5,
0.5
],
"orientation": "vertical"
},
"panels": {
"PERSPECTIVE_GENERATED_ID_10": {
"plugin": "Y Area",
"table": "ccrb",
"title": "Incidents (area)",
"group_by": [
"bucket(\"IncidentDate\", 'M')"
],
"split_by": [
"FADOType"
],
"sort": [
[
"AllegationID",
"col asc"
]
],
"filter": [
[
"IncidentDate",
">",
"1985-01-01"
],
[
"IncidentDate",
"<",
"2025-01-01"
]
],
"expressions": {
"bucket(\"IncidentDate\", 'M')": "bucket(\"IncidentDate\", 'M')"
},
"columns": [
"AllegationID"
],
"aggregates": {
"AllegationID": "distinct count"
}
},
"PERSPECTIVE_GENERATED_ID_9": {
"plugin": "Y Line",
"table": "ccrb",
"title": "Incidents (line)",
"group_by": [
"bucket(\"IncidentDate\", 'M')"
],
"split_by": [
"FADOType"
],
"sort": [
[
"AllegationID",
"col asc"
]
],
"filter": [
[
"IncidentDate",
">",
"1985-01-01"
],
[
"IncidentDate",
"<",
"2025-01-01"
]
],
"expressions": {
"bucket(\"IncidentDate\", 'M')": "bucket(\"IncidentDate\", 'M')"
},
"columns": [
"AllegationID"
],
"aggregates": {
"AllegationID": "distinct count"
}
}
}
}
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