Public
Edited
May 14
1 fork
Insert cell
Insert cell
data = FileAttachment("Colegio.csv").csv({typed: true})
Insert cell
resumenPorJornada = d3.rollups(
data,
v => v.length,
d => d.Jornada
).map(([jornada, cantidad]) => ({ jornada, cantidad }))
Insert cell
Plot.plot({
marks: [
() => htl.svg`<defs>
<linearGradient id="gradient" gradientTransform="rotate(90)">
<stop offset="15%" stop-color="purple" />
<stop offset="75%" stop-color="red" />
<stop offset="100%" stop-color="gold" />
</linearGradient>
</defs>`,
Plot.barY(resumenPorJornada, {
x: "jornada",
y: "cantidad",
fill: "url(#gradient)"
}),
Plot.ruleY([0])
]
})
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