Public
Edited
Jun 5, 2023
Insert cell
Insert cell
suicidesByState = FileAttachment("data-table.csv").csv({typed:true});
Insert cell
vl.markBar()
.data(suicidesByState)
.encode(
vl.x().fieldN('STATE').sort('descending'),
vl.y().fieldQ('RATE').aggregate('mean').fieldQ('DEATHS').scale({ domain: [0, 500] }),
vl.color().fieldN('STATE')
)
.width(800)
.height(200)
.title("Mean Deaths By State")
.render()

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