Easier visualization
✓ Published2🌍 Public
This example uses the Vega-Lite API to create an interactive scatter plot from the UCI Auto MPG dataset, displaying each car's miles per gallon against its horsepower. Points are colored by country of origin, sized by vehicle weight, and show the car name on hover through a tooltip. The JavaScript code constructs the visualization declaratively using `vl.markCircle` and `vl.encode`, then renders it with Vega-Lite's renderer while applying custom axis styling from a separate config file. Data is loaded asynchronously using `d3.csv` from a remote Gist.
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