Public
Edited
May 15, 2024
Insert cell
Insert cell
Insert cell
data = FileAttachment("players_20.csv").csv()
Insert cell
groupedData = Array.from(
d3.group(data, (d) => d.nationality),
([key, value]) => ({
nationality: key,
count: value.length,
avgAge: d3.format(".2f")(d3.mean(value, (p) => +p.age))
})
)
Insert cell
Insert cell
Insert cell
Insert cell
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