Public
Edited
Oct 21, 2023
1 fork
Insert cell
Insert cell
Insert cell
Insert cell
Wrangler(data)
Insert cell
data_long = aq
.from(data)
.fold([
"Javier Milei",
"Sergio Massa",
"Patricia Bullrich",
"Myriam Bregman",
"Juan Schiaretti"
])
.filter((d) => d["Time"] < 1696240711200)
.objects()
Insert cell
Plot.plot({
color: {
legend: true
},
marks: [
Plot.ruleY([0], { stroke: "#AAA", strokeWidth: 0.4 }),
Plot.lineY(data_long_ar, {
x: "Time",
y: "value",
z: "key",
stroke: "key",
tip: true
})
]
})
Insert cell
Insert cell
{
let fecha = m();
fecha.subtract(3, "hours");
return fecha._d;
}
Insert cell
data_long_ar = data_long.map((d) => ({
Time: m(d.Time).subtract(3, "hours")._d, // resto 3 hs
key: d.key,
value: d.value
}))
Insert cell
m = require("moment")
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