Platform
Resources
Pricing
Sign in
Get started
John Knight
Workspace
Fork
Public
By
John Knight
Edited
Jul 6, 2023
Insert cell
Insert cell
viewof
table
=
Inputs
.
table
(
olympians
)
Insert cell
olympians
Insert cell
Plot
.
plot
(
{
marks
:
[
Plot
.
barX
(
olympians
,
Plot
.
groupY
(
{
x
:
"count"
}
,
{
y
:
"nationality"
,
sort
:
{
y
:
"x"
,
reverse
:
true
,
limit
:
10
}
}
)
)
,
Plot
.
ruleX
(
[
0
]
)
]
}
)
Insert cell
viewof
sport
=
Inputs
.
select
(
sports
,
{
label
:
"Sport:"
}
)
Insert cell
Plot
.
plot
(
{
marks
:
[
Plot
.
rectY
(
sport
,
Plot
.
binX
(
{
y
:
"count"
}
,
{
x
:
"weight"
,
fill
:
"sex"
}
)
)
,
Plot
.
ruleY
(
[
0
]
)
]
,
color
:
{
legend
:
true
}
,
x
:
{
domain
:
[
0
,
200
]
}
}
)
Insert cell
Insert cell
sports
=
d3
.
group
(
olympians
,
d
=>
d
.
sport
)
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
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
table
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
sport
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
sports
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML