Platform
Resources
Pricing
Sign in
Get started
Justin Schifflin
Workspace
Fork
Published
By
Justin Schifflin
Edited
Oct 9, 2020
Insert cell
Insert cell
codons
Insert cell
Insert cell
codonArray
=
{
let
codonArray
=
[
]
;
let
codonSeqs
=
Object
.
keys
(
codons
)
;
codonSeqs
.
forEach
(
codon
=>
codonArray
.
push
(
{
codon
:
codon
,
count
:
codons
[
codon
]
}
)
)
;
return
codonArray
;
}
Insert cell
Insert cell
spec
=
(
{
data
:
{
values
:
codonArray
}
,
mark
:
'bar'
,
encoding
:
{
x
:
{
field
:
'codon'
,
type
:
'Nominal'
,
sort
:
{
field
:
'count'
,
order
:
'descending'
}
}
,
y
:
{
field
:
'count'
,
type
:
'Quantitative'
}
}
,
}
)
Insert cell
Insert cell
embed
(
spec
)
Insert cell
Insert cell
Insert cell
Insert cell
embed
=
require
(
'vega-embed@6'
)
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
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
codonArray
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
spec
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
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
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
embed
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML