Public
Edited
Aug 14, 2024
Insert cell
Insert cell
ds011.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Plot.plot({
marks: [
Plot.rectY(
ds011,
Plot.binX(
{ y: "count" },
{ x: "edad", tip: true, fill: "#888", stroke: "white" }
)
)
]
})
Insert cell
Plot.plot({
title: "Histograma",
color: {
legend: false,
type: "categorical",
domain: ["F", "M"],
range: ["violet", d3.color("rgb(0, 156, 222)")]
},
marks: [
Plot.rectY(
ds011,
Plot.binX({ y: "count" }, { x: "edad", fill: "sexo", tip: true })
)
// Plot.ruleY([0])
]
})
Insert cell
Plot.plot({
marks: [
Plot.barX(
ds011,
Plot.groupY(
{ x: "count" },
{ y: "sexo", sort: { y: "x", reverse: true } }
)
)
// Plot.ruleX([0])
]
})
Insert cell
Plot.plot({
marks: [
Plot.tickX(ds011, {
x: "edad",
y: "sexo",
tip: true,
title: (d) => [d.id, d.edad + " años", "sexo: " + d.sexo].join("\n")
})
]
})
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