Public
Edited
May 13, 2023
9 forks
2 stars
Insert cell
Insert cell
Insert cell
Plot.plot({
marginLeft: 90,
color: { legend: true },
marks: [Plot.barX(congress, Plot.groupZ({ x: "count" }, { fill: "gender" }))]
})
Insert cell
Insert cell
Plot.plot({
marginLeft: 90,
marks: [
Plot.barX(
congress,
Plot.groupY(
{ x: "count" },
{ fill: "gender", y: "party", sort: { y: "x", reverse: true } }
)
)
]
})
Insert cell
Insert cell
Plot.plot({
marginLeft: 90,
color: { scheme: "Dark2", legend: true },
x: { percent: true },
marks: [
Plot.barX(
congress,
Plot.groupY(
{ x: "count" },
{
fill: "party",
y: "gender",
sort: { y: "x", reverse: true, color: "width" },
offset: "normalize"
}
)
)
]
})
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