Public
Edited
Jun 25, 2024
1 fork
Insert cell
Insert cell
Insert cell
import {vl} from "@vega/vega-lite-api-v5"
Insert cell
import {printTable} from "@uwdata/data-utilities"
Insert cell
greenhouse = FileAttachment("GHG@2.csv").csv()
Insert cell
Insert cell
printTable(greenhouse.slice(0, 10))
Insert cell
Insert cell
vl.markPoint()
.data(greenhouse)
.encode(
vl.x().fieldQ('OBS_VALUE').title('OBSERVED VALUE'),
vl.y().fieldT('TIME_PERIOD').title('YEAR'),
vl.color().fieldN('Reference area').title('COUNTRY')
)
.render()
Insert cell
Insert cell
vl.markBar()
.data(greenhouse)
.encode(
vl.x().fieldN('Reference area').title('COUNTRY'),
vl.y().fieldN('Pollutant').title('TYPE OF POLLUTANT')
)
.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