Aditya - Vega-Lite API Template
This visualization displays the relationship between fuel efficiency (mpg), horsepower, weight, and country of origin for automobiles, using circles sized by weight and colored by origin. The code uses the Vega-Lite API to construct the chart declaratively, registering it with Vega and Vega-Lite, and renders output as SVG in the browser. Data is loaded asynchronously via D3’s `csv` function from the Auto MPG dataset hosted on GitHub Gist. D3 v5, Vega, Vega-Lite, and vega-tooltip are all loaded separately, with chart appearance customized through a configuration object that adjusts axis and label styling.
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.