Published
Edited
Jun 10, 2022
1 star
Insert cell
Insert cell
Insert cell
Insert cell
viewof tableView = Inputs.table(data, {})
Insert cell
Plot.barX(data, Plot.groupY({ x: "sum" }, { x: "value", y: "year", fill: "energyType" })).plot()
Insert cell
Plot.plot({
x: {
label: "Jahr →"
},
y: {
grid: true,
label: "↑ Energieverbrauch in kWh"
},
marks: [
Plot.barY(data, Plot.groupX({y: "sum"}, {x: "year", y: "value", fill: "energyType"})),
Plot.ruleY([0])
],
marginLeft: 50,
marginBottom: 35,
})
Insert cell
Plot.plot({
x: {
grid: true
},
marks: [
Plot.barX(data, Plot.groupY({ x: "sum" }, { x: "value", y: "buildingType", fill: "energyType", sort: {
y: "x",
reverse: true
} })),
Plot.ruleX([0])
],
marginLeft: 180
})
Insert cell
htl.html`<h1>Hello</h1>`
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