Public
Edited
Oct 17, 2023
Insert cell
Insert cell
Plot.plot({
x: {axis: null},
y: {tickFormat: "s", grid: true},
color: {scheme: "spectral", legend: true},
marks: [
Plot.barY(car, {
x: "Cars",
y: "Percent",
fill: "Cars",
fx: "Where",
sort: {x: null, color: null, fx: {value: "-y", reduce: "sum"}}
}),
Plot.ruleY([0])
]
})
Insert cell
data = FileAttachment("population-state-age.csv").csv({typed: true})
Insert cell
car= FileAttachment("car_ownership - Sheet1.csv").csv({typed: true})
Insert cell
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