Platform
Resources
Pricing
Sign in
Get started
DIS-2023-FALL
Workspace
Fork
Public
By
Gabriel Salazar
Edited
Oct 25, 2023
Fork of
Data workshop question
1
Insert cell
Insert cell
olympians
Filter
Columns
Sort
Slice
Save
Type Table, then Shift-Enter. Ctrl-space for more options.
Insert cell
aggregate
=
d3
.
rollup
(
olympians
,
v
=>
d3
.
mean
(
v
,
d
=>
d
.
weight
)
,
d
=>
d
.
sport
)
Insert cell
sportWeight
=
d3
.
flatRollup
(
olympians
,
(
v
)
=>
d3
.
mean
(
v
,
(
d
)
=>
d
.
weight
)
,
(
d
)
=>
d
.
sport
)
.
map
(
(
[
sport
,
weight
]
)
=>
(
{
sport
,
weight
}
)
)
Insert cell
Plot
.
plot
(
{
marks
:
[
Plot
.
barX
(
sportWeight
,
Plot
.
group
(
{
x
:
"mean"
}
,
{
y
:
"sport"
,
x
:
"weight"
,
sort
:
{
y
:
"x"
,
reverse
:
true
}
}
)
)
]
}
)
Insert cell
untitled
=
FileAttachment
(
"2023-10-21 09.23.35.jpg"
)
.
image
(
)
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.
Try it for free
Learn more
Compare fork
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
Cells
olympians
File attachments
Databases
Filter
Column
Operator
Columns
Sort
Column
Direction
Descending
Ascending
Slice
From
Start
To
End
aggregate
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
sportWeight
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
untitled
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML