Public
Edited
Aug 13, 2024
Paused
Comments locked
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
mapping
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
synopsis = query.map((row) => ({ Status: row[0], Count: row[1].length }))
Insert cell
query = d3.groups(records, (row) => row.Set)
Insert cell
pivot = query.map((item) => ({
Status: item[0],
Entries: item[1].map(cut)
}))
Insert cell
pivot.slice().sort((a, b) => a.Status.localeCompare(b.Status))
Insert cell
pivot.slice().sort((a, b) => b.Entries.length - a.Entries.length)
Insert cell
lookup = Object.fromEntries(
query
.sort((a, b) => a[0].localeCompare(b[0]))
.map((item) => [
item[0],
item[1].map(cut)
])
)
Insert cell
sets = Object.keys(lookup)
Insert cell
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