Public
Edited
Sep 21, 2023
Insert cell
Insert cell
y = (d) => (d.Symbol === "GOOG" ? -1 : 1) * d.Close
Insert cell
Plot.plot({
color: { legend: true },
marks: [
Plot.ruleY([0]),
Plot.rectY(data, { x: "Date", y, fill: "Symbol", interval: "day" }),
Plot.lineY(data, Plot.groupX({ y: "sum" }, { x: "Date", y }))
]
})
Insert cell
import {stocks} from "@observablehq/plot-test-data"
Insert cell
data = stocks.data.filter(d => d.Date < new Date("2013-08-01"))
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