Public
Edited
Mar 23, 2023
Insert cell
Insert cell
data = FileAttachment("Body_Composition_Sheet1.csv").csv()
Insert cell
data
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
// Parse weight, body fat, and muscle values as numbers
data.forEach(d => {
d['Weight (kg)'] = parseFloat(d['Weight (kg)']);
d['Body Fat (%)'] = parseFloat(d['Body Fat (%)']);
d['Muscle (%)'] = parseFloat(d['Muscle (%)']);
});

Insert cell
// Parse Date column as date objects
var parseDate = d3.timeParse("%Y-%m-%d");
data.forEach(d => {
d['Date'] = parseDate(d['Date']);
});


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