Published unlisted
Edited
May 26, 2021
Insert cell
Insert cell
Insert cell
// Can't see these rects!
Plot.rectY(data, Plot.binX({y:"count"}, {x:"Attendees", y:"count"})).plot()
Insert cell
Plot.rectY(data, Plot.binX({y: "count"}, {x: "Attendees", y: "count", inset: 0})).plot({y: {transform: d => d / 1000, label: "↑ Count (thousands)"}})
Insert cell
Plot.rectY(data, Plot.binX({y: "count"}, {x: "Attendees", y: "count", thresholds: 200})).plot({y: {transform: d => d / 1000, label: "↑ Count (thousands)"}})
Insert cell
d3.thresholdScott(data.map(d => d.Attendees), ...d3.extent(data, d => d.Attendees))
Insert cell
Insert cell
Plot.rectY(data, Plot.binX({y:"count"}, {x:"Attendees", y:"count"})).plot({
x:{
type:"log"
}
})
Insert cell
Insert cell
FileAttachment("ggplot_example.png").image()
Insert cell
data = FileAttachment("protests (1).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