Published
Edited
Apr 4, 2022
1 fork
8 stars
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.frame(),
Plot.lineY(aapl, {
x: "date",
y: "close",
stroke: (d) => d.date.getFullYear(),
curve: "step"
})
],
facet: { data: aapl, x: (d) => d.date.getFullYear() },
x: {
transform: (d) => d3.utcDay.offset(d, (2000 - d.getUTCFullYear()) * 365.24),
tickFormat: ((a) => (d) => a(d.getUTCMonth()))(Plot.formatMonth()),
ticks: 4
},
width
})
Insert cell
aapl = FileAttachment("aapl.csv").csv({ typed: true })
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