Fork of Vega-Lite API Template
✓ Published0🌍 Public
This example uses the Vega-Lite API to render a scatter plot of automotive data from the UCI Auto MPG Data Set. The visualization positions each vehicle by miles per gallon on the x-axis and horsepower on the y-axis, with color encoding for country of origin and circle size representing weight. Tooltips display the car name. The code imports data via d3.csv, configures axes and label styling through a custom config object, and uses the Vega-Lite API to define marks and encodings programmatically before rendering with Vega in SVG format.
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.
MIT Licensed