Unlisted
Edited
Oct 12, 2023
Fork of Untitled
Insert cell
Plot.plot({
marginLeft: 90,
color: { scheme: "Dark2", legend: true, style: { fontSize: "1em" } },
x: { percent: true },
marks: [
Plot.barX(
congress,
Plot.groupY(
{ x: "count" },
{
fill: "party",
y: "gender",
sort: { y: "x", reverse: true, color: "width" },
offset: "normalize"
}
)
)
],
style: {fontSize: fontSize + "em" },
marginBottom: marginBottomEstimate
})
Insert cell
viewof fontSize = Inputs.range([0.5, 3], {value: 1.2, label: "Font size"})
Insert cell
marginBottomEstimate = fontSize * 50
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