Fork of Vega-Lite API Template
This example visualizes Auto MPG data from the UCI Machine Learning Repository, plotting each car as a semi-transparent circle positioned by origin (categorical) and horsepower (quantitative), with tooltips revealing the vehicle name. The visualization is built entirely with the Vega-Lite API, leveraging `vl.markCircle`, `vl.x().fieldN`, `vl.y().fieldQ`, and `vl.tooltip` to define the encodings. Data is loaded asynchronously via D3’s `csv` function, while Vega, Vega-Lite, and the Vega Tooltip handler manage rendering and interaction. The configuration customizes axis styles and label colors to improve readability against a dark background.
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.