Published
Edited
Feb 9, 2022
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
nschools = bySchool.length
Insert cell
Insert cell
Insert cell
scoresFile
Insert cell
schoolData = {
if (scoresFile) {
return scoresFile.csv({ typed: true });
} else {
return [];
}
}
Insert cell
rawScores = schoolData.filter((d) => d["bio.firstName"] != "Total")
Insert cell
schoolScores = rawScores.map((d, i) => {
return { total: d.total };
})
Insert cell
totalData = totals.concat(schoolScores)
Insert cell
n = schoolScores.length
Insert cell
mean = schoolScores.map((d) => d.total).reduce((a, b) => a + b, 0) / n
Insert cell
mean.toFixed(2)
Insert cell
myClass = bySchool
.filter((d) => d["data.n"] == n)
.filter((d) => d["data.mean"].toFixed(2) == mean.toFixed(2))
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