Perspective › Examples
SF Evictions
Map Scatter chart of lon, lat and neighborhood, grouped by lat and lon, filtered to lon is not null, with 2 computed expression columns.
San Francisco eviction notices, from DataSF.

Data
San Francisco eviction notices from the DataSF open data portal, plotted on tile-based scatter and density maps.
Loaded from /data/evictions.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:
{
"layout": {
"type": "tab-layout",
"tabs": [
"p0"
],
"selected": 0
},
"panels": {
"p0": {
"table": "evictions",
"columns_config": {},
"plugin": "Map Scatter",
"theme": null,
"title": null,
"group_by": [
"lat",
"lon"
],
"split_by": [],
"sort": [],
"filter": [
[
"lon",
"is not null",
null
]
],
"group_rollup_mode": "flat",
"split_rollup_mode": "flat",
"expressions": {
"lat": "var x[2];\nindexof(\"shape\", ' .+?( )', x);\nvar y := substring(\"shape\", x[0], length(\"shape\") - x[1]);\nfloat(y)",
"lon": "var x[2];\nindexof(\"shape\", ' .+?( )', x);\nvar y := substring(\"shape\", 7, x[1] - 7);\nfloat(y)"
},
"columns": [
"lon",
"lat",
"neighborhood",
null,
null,
null
],
"aggregates": {
"neighborhood": "dominant",
"lat": "any",
"lon": "any"
}
}
},
"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