Fork of Vega-Lite API Template
This visualization displays the relationships among weight, horsepower, and fuel efficiency (mpg) for vehicles in the UCI Auto MPG data set, with each car plotted as a semi-transparent circle whose size reflects mpg, color encodes weight, and tooltips reveal model names. It uses the Vega-Lite API to declare the scatter plot specification, which is registered with Vega and Vega-Lite libraries. The data is loaded asynchronously via d3.csv, while d3.v5 provides the underlying parsing, and the visualization scales responsively to fill the browser window with customized axis and label styling for readability.
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.