Public
Edited
Dec 6, 2023
2 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Plot.dot(penguins, { x: "culmen_length_mm", y: "culmen_depth_mm" }).plot()
Insert cell
Insert cell
Plot.plot({
y: {
grid: true,
percent: true
},
marks: [
Plot.ruleY([0]),
Plot.barY(alphabet, {
x: "letter",
y: "frequency",
sort: { x: "y", reverse: false }
})
]
})
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
Insert cell
Plot.lineY(aapl, { x: "Date", y: "Close" }).plot({ y: { grid: true } })
Insert cell
Insert cell
Insert cell
data = FileAttachment("data.csv").csv({ typed: true })
Insert cell
Inputs.table(data)
Insert cell
Plot.plot({
marks: [Plot.boxX(data, { x: "gdppc" })]
})
Insert cell
Plot.plot({
grid: true,
marginLeft: 50,
facet: {
data: data,
y: "region"
},
marks: [Plot.boxX(data, { x: "gdppc" })]
})
Insert cell
Insert cell
Insert cell
world = FileAttachment("world.json").json()
Insert cell
Plot.plot({
color: {
scheme: "category10",
legend: true
},
projection: { type: d3.geoEqualEarth, domain: { type: "Sphere" } },
marks: [
Plot.geo({ type: "Sphere" }, { fill: "#add8f7", stroke: "none" }),
Plot.geo(d3.geoGraticule()(), { stroke: "white", strokeWidth: 0.4 }),
Plot.geo(world, {
fill: (d) => d.properties.region
})
]
})
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