Published unlisted
Edited
Mar 10, 2022
Insert cell
# Plot transform in an Inputs.table
Insert cell
data = [
{ date: "2022-01-01", name: "Microsoft", score: 20 },
{ date: "2022-01-02", name: "Microsoft", score: 22 },
{ date: "2022-01-03", name: "Microsoft", score: 24 },

{ date: "2022-01-01", name: "Apple", score: 20 },
{ date: "2022-01-02", name: "Apple", score: 22 },
{ date: "2022-01-03", name: "Apple", score: 24 },

{ date: "2022-01-01", name: "IBM", score: 10 },
{ date: "2022-01-02", name: "IBM", score: 12 },
]
Insert cell
line = Plot.line(data, Plot.groupY({ x: "last" }, { y: "name", x:"score" }))
Insert cell
import {getTransformed} from "@observablehq/plot-data-transformations"
Insert cell
Inputs.table(getTransformed(line))
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