Unlisted
Edited
Apr 21
Insert cell
Insert cell
Insert cell
weather.sample(6).view()
Insert cell
Insert cell
onlyCS = enrollment.select('county', 'race', 'sex', 'AP CS', 'Non-AP CS')
Insert cell
viewof HSenrollment = enrollment.groupby('county').rollup({ enrollment: op.sum('Overall Enrollment') }).view()
Insert cell
onlyCS.join(HSenrollment, 'county').view()
Insert cell
viewof table = aq.from([{ col1: 'A', col2: 1 }, { col1: 'B', col2: 1 }, { col1: 'A', col2: 5 }, { col1: 'A', col2: 3 }]).view()
Insert cell
table
.groupby('col1')
.rollup({
sum: d => op.sum(d.col2)
})
.view()
Insert cell
enrollment.sample(6).view()
Insert cell
vl.markBar()
.data(enrollment)
.transform(
vl.groupby('race').aggregate(
vl.sum('Non-AP CS').as('totalCS'),
vl.sum('Overall Enrollment').as('totalEnroll')
),
vl.calculate('datum.totalCS / datum.totalEnroll')
.as('perCapitaEnroll')
)
.encode(
vl.x().fieldN('race'),
vl.y().fieldQ('perCapitaEnroll')
)
.render()
Insert cell
import {aq, op} from '@uwdata/arquero'
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