Published
Edited
Sep 19, 2022
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof table = Inputs.table(cars)
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.barX(cars, Plot.groupY({x: "count"}, {y: "year", sort: {y: "y", reverse: false}})),
Plot.ruleX([0])
]
})
Insert cell
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.barX(cars, Plot.groupY({x: "count"}, {y: "year", sort: {y: "x", reverse: true}})),
Plot.ruleX([0])
]
})
Insert cell
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.dot(cars, {x: "displacement (cc)", y: "economy (mpg)"})
]
})
Insert cell
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.dot(cars, {x: "displacement (cc)", y: "economy (mpg)", stroke:"cylinders",fill: "cylinders"
})
],
color: {
legend: true,
},
})
Insert cell
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.boxX(cars, {x: "cylinders", y: "power", sort: {y: "x"}})
]
})
Insert cell
Insert cell
Insert cell
Insert cell
viewof input = Inputs.select(
["economy (mpg)", "cylinders", "displacement (cc)", "power (hp)"],
{ label: "Select one" }
)
Insert cell
Plot.plot({
marks: [Plot.dot(cars, { x: "weight (lb)", y: input })]
})
Insert cell
Insert cell
cars
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