Skip to main content
100%

Fork of Vega-Lite API Template

✓ Published0🌍 Public
DDaniel
Last edited Aug 13, 2023
Created on Aug 11, 2023

This example uses the Vega-Lite API to render a scatter plot of automobile data, with each circle positioned by origin (categorical) and horsepower (quantitative) and given a constant size and opacity. It loads the auto-mpg dataset from a CSV via D3’s `csv` function, then registers Vega, Vega-Lite, and Vega-Tooltip to build an interactive SVG visualization. The chart config customizes axis and label styling for readability, and the final view is fit to the full window. The code’s core is the `vl.markCircle().encode()` specification, which defines the visual encoding declaratively.

AI-generated description

A visualization constructed using the vega-lite-api.

MIT Licensed

Similar vizzes