Public
Edited
May 5, 2023
Insert cell
Insert cell
data = d3.csv(
"https://aaizemberg.github.io/infovis/data/energia/precios-en-surtidor-resolucin-3142016.csv",
d3.autoType
)
Insert cell
data[0]
Insert cell
datos_gnc = data
.filter(
(d) =>
d.precio < 500 &&
d.producto == "GNC" &&
d.indice_tiempo > new Date("2023-04-01")
)
.map((d) => ({ p: d.precio }))
Insert cell
Plot.plot({
marks: [Plot.rectY(datos_gnc, Plot.binX({ y: "count" }, { x: "p" }))]
})
Insert cell
datos_gnc
X
p
Y
Color
Size
Facet X
Facet Y
Mark
Auto
Type Chart, then Shift-Enter. Ctrl-space for more options.

Insert cell
Plot.auto(datos_gnc, { x: "p" }).plot()
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