Published
Edited
Jun 9, 2022
Importers
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
raw = FileAttachment("GMM Cereal in Milk - data.csv").csv({typed: true})
Insert cell
Insert cell
// parse minutes/seconds into time
data = aq.from(raw)
.derive({time: d => (d.min * 60) + d.sec})
.objects()
Insert cell
Insert cell
// ordered array of cereal categories
cerealCategories = aq.from(data)
.select("category")
.dedupe()
.orderby("category")
.objects()
.map(d => d.category)
Insert cell
// Chex-like colors (red serving as oats)
colorRange = ["#5B8644", "#C64930", "#63B5E3", "#EAA534"]
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