Public
Edited
Jun 26, 2023
14 forks
10 stars
Insert cell
Insert cell
Plot.plot({
aspectRatio: 1,
x: {label: "Age (years)"},
y: {
grid: true,
label: "← Women · Men →",
labelAnchor: "center",
tickFormat: Math.abs
},
marks: [
Plot.dot(
congress,
Plot.stackY2({
x: (d) => 2023 - d.birthday.getUTCFullYear(),
y: (d) => d.gender === "M" ? 1 : -1,
fill: "gender",
title: "full_name"
})
),
Plot.ruleY([0])
]
})
Insert cell
congress = FileAttachment("us-congress-2023.csv").csv({typed: 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