[A6] Vehicle Power vs. MPG (Scatter Plot With Qualitative Color Scale)
✓ Published0🌍 Public
This scatter plot compares vehicle torque and horsepower, with each point’s size encoding MPG. The chart uses a qualitative color scale to distinguish car makes—Audi in blue, Chevrolet in red, and Volvo in green—via `d3.scaleOrdinal` and a `d3.legendColor` legend. Data from a CSV file is loaded with `d3.csv`, parsed, and mapped to linear scales for the x- and y-axes, while circle radii are scaled by MPG using `d3.scaleLinear`. The SVG rendering is handled by D3 v7, with axes, labels, and a triangular-symbol legend drawn programmatically.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed