Public
Edited
Apr 8, 2022
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
dt.groupby("id").pivot("a", "b").view()
Insert cell
dt.select("id", "c").dedupe().view()
Insert cell
dt1 = dt.groupby("id").pivot("a", "b")
Insert cell
dt2 = dt.select("id", "c").dedupe()
Insert cell
dt1.join(dt2).view()
Insert cell
Insert cell
Insert cell
Insert cell
r = q.fold(aq.not("id"), { as: ["timestamp", "metric"] })
Insert cell
Insert cell
Insert cell
r.groupby("id").pivot("timestamp", "metric").view()
Insert cell
Insert cell
Insert cell
Insert cell
q3.filter((d) => d.x > 2 && d.y < 1).view()
Insert cell
Insert cell
q4 = aq.from([
{ x: "1", y: 0.2, z: "a", s: 0.3 },
{ x: "2", y: 0.4, z: "b", s: 0.4 },
{ x: "3", y: 0.8, z: "c", s: 0.5 },
{ x: "4", y: 1.6, z: "d", s: 0.6 }
])
Insert cell
t4 = aq.from([
{ x: "1", k: "x1", z: "a" },
{ x: "2", k: "x2", z: "b" },
{ x: "3", k: "x3", z: "c" }
])
Insert cell
u4 = q4.join(t4, "x", [["x", "y", "z"], ["k"]])
Insert cell
u4.view()
Insert cell
u4.toJSON()
Insert cell
Insert cell
q5 = aq.from([
{ x: "1", y: 0.2, z: "a", s: 0.3 },
{ x: "2", y: 0.4, z: "b", s: 0.4 },
{ x: "3", y: 0.8, z: "c", s: 0.5 },
{ x: "4", y: 1.6, z: "d", s: 0.6 }
])
Insert cell
q5.array("x")
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