Public
Edited
Apr 21
Insert cell
Insert cell
Insert cell
Plot.plot({
title: "Provincias y población promedio",
marginLeft: 250,
marks: [
Plot.barX(data_2c, {
x: "personas",
y: "provincia",
sort: { y: "x", reverse: true },
tip: true
}),
Plot.ruleX([d3.mean(data_2c, (d) => d.personas)], { stroke: "steelblue" })
]
})
Insert cell
Insert cell
Insert cell
data_2c = data.map((d) => ({
provincia: d.Provincia,
personas: +d["Total de población"]
}))
Insert cell
Plot.plot({
marginLeft: 250,
marks: [
Plot.barX(data, {
x: "Total de población",
y: "Provincia",
sort: { y: "x", reverse: true }
})
]
})
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