Public
Edited
Apr 3, 2023
Insert cell
Insert cell
viewof DATA = Inputs.textarea({
rows: 24,
cols: 80,
})
Insert cell
embed({
datasets: {
samples: (
DATA
.split(/\s+/g)
.map((d) => Number.parseInt(d, 10))
.filter((d) => d < 10000)
.map((x) => ({ x }))
),
},
data: {
name: 'samples',
},
mark: 'bar',
encoding: {
x: {
bin: true,
field: 'x',
},
y: {
aggregate: 'count',
},
},
});
Insert cell
embed = require("vega-embed@6")
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