Viewing a saved revision (read-only)
fa1a936c4676400788a48eaeb454a11e
Cody Vega-Lite API Template
A scatter plot visualizes automobile data from the UCI Machine Learning Repository, mapping engine displacement and horsepower on the axes, with the country of origin and vehicle weight controlling color and point size. The visualization is built programmatically using the Vega-Lite API, which compiles a declarative specification into a Vega rendering. The code registers the API with Vega and Vega-Lite, configures the plot with custom axis styling, and loads the data asynchronously via `d3.csv`. Tooltips are enabled through the Vega-Tooltip handler.
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.