Public
Edited
Nov 28, 2022
Insert cell
Insert cell
Insert cell
diabetes = FileAttachment("diabetes.csv").csv()
Insert cell
Insert cell
rolup1 = d3.rollup(diabetes, v => d3.mean(v, d => d['BloodPressure']), d => d['Age'] )

Insert cell
Insert cell
arrayMeanBloodPressure = [...rolup1].map(function (item) {
return { age: item[0], bloodPressure: item[1] }
}).sort((a, b) => d3.ascending(a.age, b.age));
Insert cell
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