vega-lite JavaScript API browser example with vegaEmbed
This example shows a linked brushing-and-clicking dashboard for Seattle weather data, combining a scatterplot of daily maximum temperature and precipitation with a bar chart of weather-type counts. It demonstrates the Vega-Lite JavaScript API and vegaEmbed in the browser, where the API builds a visualization specification and vegaEmbed renders it into the DOM. The code uses `vl.selectInterval` and `vl.selectMulti` for interactive selections, `vl.markPoint` and `vl.markBar` for marks, and `vl.vconcat` to stack the two views. The data is loaded from the vega-datasets CDN, with weather categories colored via a custom scale and precipitation mapped to point size.
AI-generated descriptionConverted from : https://observablehq.com/@vega/vega-lite-api
A very simple example of how to run the wonderful JavaScript API for vega-lite directly in the browser. This one uses vegaEmbed to render the chart. The key is to use the api to generate the spec, and then vegaEmbed to render it.
Built with blockbuilder.org
forked from <a href='http://bl.ocks.org/john-guerra/'>john-guerra</a>'s block: <a href='http://bl.ocks.org/john-guerra/d6f1c4fc6473f78dd1b900145f8b63df'>vega-lite JavaScript API browser example</a>
forked from <a href='http://bl.ocks.org/john-guerra/'>john-guerra</a>'s block: <a href='http://bl.ocks.org/john-guerra/a90b26fc3c99a925b05d51a479c16af2'>vega-lite JavaScript API browser example with vegaEmbed</a>
forked from <a href='http://bl.ocks.org/EE2dev/'>EE2dev</a>'s block: <a href='http://bl.ocks.org/EE2dev/93076c6db5ed91ba2275767ba6809476'>vega-lite JavaScript API browser example with vegaEmbed</a>