Fork of Vega-Lite API Template
This visualization presents a scatter plot of automotive data from the UCI Auto MPG dataset, graphing miles per gallon against horsepower. Each circle’s size encodes acceleration, while tooltips reveal the car’s name. The example demonstrates the Vega-Lite API workflow, using `vl.markCircle` with field encodings for quantitative axes and an opacity adjustment for overlapping points. The code builds the chart by processing CSV data via `d3.csv`, configuring axis styling through Vega-Lite’s `config`, and rendering with the vega-lite-api library alongside vega-tooltip for interactive hover details.
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.