🌍 Public
Viewing a saved revision (read-only)
6f0cbd594c844a6c84b3f349fcde9d33
Activity8Task3UN
This D3.js scatter plot visualizes the relationship between a car's horsepower and its fuel efficiency (miles per gallon), with each circle colored by the vehicle's country of origin (USA, Japan, or other). The visualization uses `d3.csv` to load data from a GitHub-hosted `cars.csv` file, then employs `d3.scaleLinear` to map the numeric axes and `d3.axisLeft`/`d3.axisBottom` to render the labeled scales. Circles are drawn as SVG elements, with colors assigned via a switch statement on the origin field.
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.