Public
Edited
Jun 18, 2024
Insert cell
Insert cell
Insert cell
Insert cell
import {printTable} from '@uwdata/data-utilities'
Insert cell
import {vl} from "@vega/vega-lite-api-v5"
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

{
const line = vl.markLine().data(df).encode(
vl.x().fieldN('Year').title('Years (1970-2020)'),
vl.y().fieldQ('Spending').title('USA Education Expenditure (USD)'),
vl.tooltip('Spending')
);

const point = vl.markCircle().data(df).encode(
vl.x().fieldN('Year').title('Years (1970-2020)'),
vl.y().fieldQ('Spending'),
vl.tooltip('Spending')
);
return vl.layer(line, point).render();
}
Insert cell
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