Fork of Vega-Lite API Template
✓ Published0🌍 Public
This example visualizes the relationship between automobile fuel efficiency (mpg), vehicle weight, and horsepower, colored by country of origin, using a scatter plot of circles with tooltips. It is built with the Vega-Lite API for D3.js, which constructs a specification rendered via Vega and Vega-Lite. The visualization loads an auto-mpg CSV dataset from a GitHub gist, sets circle size and opacity via `markCircle`, and encodes fields using methods like `.fieldQ('mpg')` and `.fieldN('origin')`. The tooltip uses the `vega-tooltip` handler, and the chart resizes to fit the window.
AI-generated descriptionA visualization constructed using the vega-lite-api.
MIT Licensed