Published
Edited
Oct 17, 2021
Insert cell
Insert cell
vl.markLine() // Make a scatter chart
.data(data) // Using the cars data (below)
.encode(
vl.x().fieldT("date"), // For x, use the Horsepower field
vl.y().fieldQ("numconf"), // For y, use the Miles_per_Gallon field
vl.tooltip().fieldN("prname"),
vl.color()
.field('prname')// For tooltips, show the Name field
)
.width(800)
.render({renderer: "svg"})
Insert cell
data = d3.csvParse(await FileAttachment("covid19-data.csv").text(), d3.autoType)
Insert cell
FileAttachment("covid19-data.csv").csv()
Insert cell
Table(data, { WIDTH: 660 })
Insert cell
import {Table} from "@observablehq/table"
Insert cell
import { vl } from "@vega/vega-lite-api"
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