Public
Edited
May 12, 2023
8 forks
Importers
5 stars
Insert cell
Insert cell
Plot.plot({
inset: 10,
grid: true,
x: {label: "Miles driven (per person-year) →"},
y: {label: "↑ Cost of gasoline ($ per gallon)"},
marks: [
Plot.line(driving, {x: "miles", y: "gas", curve: "catmull-rom", marker: true}),
Plot.text(driving, {filter: (d) => d.year % 5 === 0, x: "miles", y: "gas", text: (d) => `${d.year}`, dy: -8})
]
})
Insert cell
driving = FileAttachment("driving.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