Published
Edited
Oct 7, 2019
Insert cell
Insert cell
viewof s = slider({max:6,step:1})
Insert cell
vl.markBar({stroke:"black"})
.columns(4)
.width(100)
.height(100)
.data(data)
.encode(
vl.y().fieldN("DAY_OF_WEEK").scale({domain:days}),
vl.x().count().scale({domain:[0,10]}),
vl.color().fieldN("OFFENSE_DESCRIPTION"),
vl.tooltip().count(),
vl.facet().fieldQ("HOUR")
)
.resolve({scale:{x:"independent"}})
.render()
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
days = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more