Public
Edited
Feb 13, 2023
Insert cell
Insert cell
co2_data = FileAttachment("CO2_data.xlsx").xlsx()
Insert cell
CO2_data (1).csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell


Insert cell
Plot.plot({
facet: {
data: co2_data1,
x: "Route",
marginRight: 90
},
y: {
grid: true
},
marks: [
Plot.barY(co2_data1,
Plot.groupX(
{y: "mean"},
{x: "Mode",
y: "CO2InKGramsPerPassenger",
fill: "Mode"

}))
]
})

Insert cell
Plot.plot({
x: {
tickRotate: -45,
label: ""
},
facet: {
data: co2_data1,
x: "Route",
marginRight: 90
},
y: {
grid: true
},
marks: [
Plot.barY(co2_data1,
Plot.groupX(
{y: "mean"},
{x: "Mode",
y: "TicketPriceEuros",
fill: "Mode"

}))
]
})

Insert cell
Plot.plot({
facet: {
data: co2_data1,
x: "Route",
marginRight: 90
},
y: {
grid: true
},
marks: [
Plot.barY(co2_data1,
Plot.groupX(
{y: "mean"},
{x: "Mode",
y: "TravelTimeMinutes",
fill: "Mode"

}),
Plot.text(
co2_data1,
{text: "Route", dx: -5, dy: -5, rotate: -45
})
)
]
})

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