Published
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.
Learn more