🌍 Public
Viewing a saved revision (read-only)
35df44228ec5426b87dbdb8e2f31987d
Activitity6_Question3
This scatter plot visualizes the relationship between horsepower and miles per gallon (MPG) for a cars dataset, with each circle colored by the vehicle’s origin (USA, Europe, or Japan). The visualization uses D3 v6 to load CSV data via `d3.csv`, parse and filter the rows, and render SVG circles with linear scales for both axes. Axis labels and ticks are added using `axisLeft` and `axisBottom`, while the full window width and height define the chart area. The code explicitly filters out rows with missing or invalid numeric values before mapping the data points.
AI-generated description