Platform
Resources
Pricing
Sign in
Get started
Joses W. Ho
Estimation statistics, craft beer, data visualization, web scraping, poetry
Workspace
Fork
Unlisted
By
Joses W. Ho
Edited
Aug 25, 2023
Insert cell
1
Insert cell
import
{
mobydick
as
letters
}
from
"@observablehq/plot-group"
Insert cell
letterTable
=
aq
.
table
(
{
letter
:
letters
}
)
.
groupby
(
"letter"
)
.
count
(
)
.
orderby
(
"count"
)
// explictly ordered by count.
.
reify
(
)
Insert cell
Inputs
.
table
(
letterTable
)
Insert cell
letterTable
.
objects
(
)
.
slice
(
0
,
5
)
// the underlying object view is also in ascending order
Insert cell
Plot
.
plot
(
{
marginLeft
:
50
,
y
:
{
grid
:
true
}
,
x
:
{
// Yet, I have to specify the domain to order it as the Arquero table is ordered. Why?
domain
:
letterTable
.
columnArray
(
"letter"
)
}
,
marks
:
[
Plot
.
barY
(
letterTable
,
{
x
:
"letter"
,
y
:
"count"
}
)
,
Plot
.
ruleY
(
[
0
]
)
]
,
height
:
170
}
)
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
Show 1 comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
letterTable
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
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML