Published
Edited
Nov 26, 2021
Insert cell
Insert cell
chart = Plot.plot({
left: 10,
width: 800,
height: 640,
padding: 5,
//grid: true,
x: {
domain: [0,1000],
round: true,
//axis: "top",
//label: "Season"
},
y: {
round: true,
//sort: Total Ballots Counted",
//label: "Episode"
},
color: {
domain: [100,0],
range: ["black","yellow"],
},
marks: [
Plot.dot(table,
//Plot.group({fill: "mean"},
{
x: "TotalBallotsCounted",
y: "BallotType",
fill: "TotalBallotsCounted",
fillOpacity: "VotesAgainst"

})
]
})
Insert cell
fill = value => {
const { id, VotesAgainst,TotalBallotsCounted} = value;
// if (value > 0, value < -25)
return VotesAgainst /TotalBallotsCounted
}
Insert cell
penguins = FileAttachment("penguins.csv").csv({typed: true})
Insert cell
table = FileAttachment("union_votes_nospaces_dates.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