Public
Edited
Jul 28, 2024
Insert cell
Insert cell
HDF_kW_10305364687_28-07-2024.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
HDF_Daily_kWh_10305364687_28-07-2024@1.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
tidyArray = importArray.flatMap((d) => ({date: (new Date((d.date[0]).split("-").reverse().join("-")+"T"+(d.date[1])+(":00"))), type: d.type, value: d.value}))
Insert cell
exported = tidyArray.filter(d => d.type === "Active Export Interval (kW)")
Insert cell
(d3.sum(exported, d => d.value)/2)*.24
Insert cell
imported = tidyArray.filter(d => d.type === "Active Import Interval (kW)")
Insert cell
Plot.plot({
width: 800,
marks: [
Plot.ruleY([0]),
Plot.barY(exported, {x: "date", y: "value", fill: "type", tip: true})
]
})
Insert cell
HDF_kW_10305364687_28-07-2024.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
BGE_Export_HDF_28_06_2024.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Plot.plot({
marginLeft: 80,
padding: 0,
height: 400,
style: {fontSize: 12, fontFamily: "IBM Plex Sans"},
y: {tickFormat: Plot.formatMonth("en", "long"), nice: true},
marks: [
Plot.cell(bordGais, Plot.group({fill: "max"}, {
x: (d) => d.date.getUTCDate(),
y: (d) => d.date.getUTCMonth(),
fill: "export",
inset: 0.5, title: (d) => `On ${(d.date).toLocaleString("en-IE", {day: "numeric", month: "long", year: "numeric"
})}, the export was ${format(d.export)+"kW"}`})),
],
color: {scheme: "Turbo", type: "linear", domain: [0,20], range: [0,1], legend: true}
})
Insert cell
d3.sum(bordGais, d => d["export"])*.24
Insert cell
bordGais = bge_export_hdf_26_04_2024.flatMap((d) => ({date: (new Date(d.Date)), export: d["Export Volume (kWh)"]}))
Insert cell
Plot.plot({
width: 850,
x: {tickFormat: d3.utcFormat("%B %YY")},
marks: [
Plot.barY(bordGais, {x: "date", y: "export", fill: "export", tip: true}),
Plot.ruleY([0])
]
})
Insert cell
format = d3.format(".2f")
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