Viewing a saved revision (read-only)
dd3828eaa36543c4aeb70a0867b1bbe5
Fork of Vega-Lite API Template
This example visualizes the Auto MPG dataset from the UCI Machine Learning Repository, plotting each car as a circle with engine horsepower on the y-axis and miles per gallon on the x-axis. Color encodes country of origin, while circle size represents vehicle weight, and hovering reveals the car name via a tooltip. The visualization is built programmatically using the vega-lite-api library, which registers Vega and Vega-Lite, loads CSV data with d3.csv, and renders an SVG chart with a custom dark-themed configuration. The chart automatically fits the browser window size.
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.