Public
Edited
May 1, 2024
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
task2 = await FileAttachment("task2.json").json()
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
t2 = task2.map((d) => {
d["query combination"] = d["comb"];
return d;
})
Insert cell
Insert cell
barChart = {
let target = [];
for (let data of task2) {
let res = {};
res["comb"] = data.comb;
res["duckdb"] = data["duckDB-filter_time"];
res["arquero"] = data["arquero-filter_time"];
res["nativeJS"] = data["vanillaJS-filter_time"];
res["dataset"] = data.dataset;
target.push(res);
}

let data = [];
if (target.length) {
data = aq
.from(target)
.fold(["duckdb", "arquero", "nativeJS"], { as: ["backend", "time"] })
.objects();
}

const label = vl
.markText({ dx: 5, dy: 5, align: "start", fontSize: "8" })
.encode(
vl.y().fieldN("backend").title("Filtering Operation"),
vl.x().median("time").title("Median Time with IQR"),
vl.text().median("time").format(".4f")
)
.height(100)
.width(100);

const bar = label
.markBar({ tooltip: true, opacity: 0.6 })
.encode(vl.color().fieldN("backend").title("Filtering Operation"))
.height(100)
.width(100);

const error = bar.markErrorbar({ extent: "iqr" });

return vl
.layer(label, bar, error)
.facet(vl.fieldN("comb"))
.spacing(15)
.columns(6)
.data(data)
.render();
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
transformData({ data: akhila_system }).filter((d) => d["experimentName"] < 600)
Insert cell
Insert cell
Insert cell
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