Public
Edited
Jun 8, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
r.objects().slice(0, 10)
Insert cell
r = data.select([
"game_id",
"game_date",
"team_abbreviation_home",
"wl_home",
"pts_home",
"team_abbreviation_away",
"wl_away",
"pts_away"
])
Insert cell
Insert cell
Insert cell
r.groupby("wl_home").count().view()
Insert cell
Insert cell
r
.rollup({
home_average: (d) => op.mean(d.pts_home),
away_average: (d) => op.mean(d.pts_away)
})
.view()
Insert cell
Insert cell
r
.filter((d) => d.team_abbreviation_away == "BOS")
.rollup({ avg_pts_away: (d) => op.mean(d.pts_away) })
.view()
Insert cell
r
.filter((d) => d.team_abbreviation_home == "BOS")
.rollup({ avg_pts_home: (d) => op.mean(d.pts_home) })
.view()
Insert cell
Insert cell
r
.filter(
(d) =>
d.team_abbreviation_home == "BOS" || d.team_abbreviation_away == "BOS"
)
.view()
Insert cell
r
.select([
"game_id",
"game_date",
"team_abbreviation_home",
"pts_home",
"team_abbreviation_away",
"pts_away"
])
.fold(["team_abbreviation_home", "team_abbreviation_away"])
.view()
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
anime = require("https://unpkg.com/animejs/lib/anime.min.js")
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