🌍 Public
Viewing a saved revision (read-only)
01e7fda904494b26a228bd8c31a46b0b
Activity_6 Question 3
This interactive scatter plot visualizes the relationship between horsepower and fuel efficiency (MPG) for cars, with each point colored by the vehicle’s region of origin (USA, Europe, Japan). The visualization uses D3.js v7 (d3.v7) to render SVG elements, including circles that respond to mouseover events by displaying a tooltip with the car’s name, horsepower, and MPG. Data is loaded from a remote GitHub CSV file using `d3.csv`, and scales are constructed with `d3.scaleLinear` and `d3.scaleOrdinal` to map the quantitative and categorical attributes, respectively.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.