Fork of Vega-Lite API Template
This example displays a scatter plot of auto-mpg data, where each point represents a car, with engine displacement on the x-axis, horsepower on the y-axis, and color encoding the country of origin. The point size is also encoded by the vehicle’s weight, with tooltips revealing the car’s name on hover. The visualization is built using the Vega-Lite API, which constructs a Vega-Lite specification programmatically, and is rendered with Vega’s SVG renderer. Data is loaded asynchronously from the UCI Machine Learning Repository via D3’s `csv` function, and the tooltip interaction is handled through `vega-tooltip`’s `Handler`.