Vega-Lite API Template
✓ Published0🌍 Public
This example demonstrates a scatter plot of automobile data from the UCI Machine Learning Repository, with each car’s origin encoded by color and weight by point size. The visualization is built using the Vega-Lite API, which abstracts the declarative Vega-Lite specification into a programmatic interface, and renders through Vega’s SVG engine. Data is loaded asynchronously via D3’s `csv` function, and a custom tooltip is attached using the Vega-Tooltip `Handler` class. The chart’s axes and labels are styled through a custom Vega-Lite configuration object.
AI-generated descriptionA visualization constructed using the vega-lite-api.
The data shown here comes from the UCI Machine Learning Repository: Auto MPG Data Set, via Gist: Scatter Plot with Menus.
MIT Licensed