task2q
✓ Published0🌍 Public
This scatter plot visualizes the relationship between Horsepower and MPG for various car brands, with each point colored by its brand. The visualization loads car data from a CSV file hosted on GitHub, parses it with `d3.csv`, and maps values to screen coordinates using `d3.scaleLinear` for both axes. Points are rendered as SVG circles with `d3.selectAll`, and a legend is generated using `d3.scaleOrdinal` with `d3.schemeSet1`. Axis labels are added via `d3.axisBottom` and `d3.axisLeft`, with the SVG container created using standard D3 selection and attribute methods.
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.
MIT Licensed