import{vl}from'@vega/vega-lite-api-v5'// Vega-Lite API visualization library
vl.markCircle({color:"#f00",size:30})
.data(df)
.encode(
vl.x().fieldQ('DCH')
)
.render({renderer:'svg'})// this option allows downloading SVGs as well as PNGs
vl.markBar()
.data(df)
.encode(
vl.x().fieldQ('DCH').bin(true).bin({maxbins:10}),
vl.y().count()
)
.render({renderer:'svg'})// this option allows downloading SVGs as well as PNGs
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.