Public
Edited
Aug 7, 2023
Insert cell
Insert cell
Insert cell
Plot.plot({
y: { grid: true, label: "# Evictions" },
x: { label: "Month", round: true },
// color: { scheme: "YlOrRd" },
marks: [
Plot.rectY(
data,
Plot.binX(
{
y: "count"
// fill: "x"
},
{
x: {
thresholds: radios.toLowerCase(),
value: "executed_date"
},
tip: true,
inset: 0,
fill: color
}
)
),
Plot.ruleY([0])
]
})
Insert cell
Insert cell
ticks = d3[radios == "Month" ? "timeMonth" : "timeWeek"].count(
new Date(d3.min(data.map((d) => d.executed_date))),
new Date()
)
Insert cell
bins = d3
.bin()
.value((d) => new Date(d.executed_date))
.thresholds(thresholdTime(ticks))(data)
Insert cell
draw_histogram_from_buckets(bins)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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