Fork of Vega-Lite API Template
✓ Published0🌍 Public
This example uses the Vega-Lite API to render an interactive scatter plot of the Auto MPG dataset, showing vehicle fuel efficiency (mpg) against horsepower. Points are colored by origin and sized by weight, with tooltips displaying model names. The visualization is constructed programmatically via vega-lite-api, which registers with the vega and vega-lite libraries, while D3’s csv method loads the data. Styling is customized through a config object, and the plot auto-fits to the window using autosize and renderer settings.
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