Unlisted
Edited
Nov 28, 2023
1 fork
Insert cell
Insert cell
Plot.plot({
width: 1000,
height: 2000,
marginLeft: 55,
x: { axis: "top", tickFormat: "%" },
y: { axis: "left", label: null, tickFormat: "%b %Y", interval: d3.utcMonth},
color: {
scheme: "Spectral",
legend: "ramp",
width: 1000,
label: "Well:"
},
marks: [
Plot.barX(tidy, {
x: "flows",
y: "date",
channels: { month: "month" },
fill: "well",
offset: "normalize",
//sort: { y: "-x" },
tip: true
}),
Plot.ruleX([0])
]
})
Insert cell
welldata = FileAttachment("WellDataByMonth.csv").csv({typed: true})
Insert cell
Insert cell
tidy = welldata.columns
.slice(1)
.flatMap((well) =>
welldata.map((d) => ({ date: d3.timeParse("%b %Y")(d.name), month: d.name, well, flows: d[well] }))
)
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