Published
Edited
Jun 15, 2021
Insert cell
# File Attachment test
Insert cell
data = FileAttachment("penguins-2.csv").csv()
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
avg = {
let vs = data.map(s => s.bill_length_mm).filter(s => s !== "NA").map(Number);
let n = 0;
vs.forEach(v => n += v);
return n / vs.length;
}
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