Fork of Vega-Lite API Template 2
This scatter plot visualizes the relationship between fuel efficiency (mpg) and horsepower for a collection of automobiles, with each point colored by country of origin, sized by vehicle weight, and labeled with the car model name. The visualization is built using the Vega-Lite API, which constructs a specification rendered via D3.js and Vega. Data is loaded from a CSV file fetched through D3’s `csv` method, sourced from the UCI Machine Learning Repository’s Auto MPG dataset. The chart’s appearance is customized through a configuration object that removes axis frames, adjusts tick colors, and increases font sizes for readability.
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.