question-6
✓ Published0🌍 Public
This scatter plot visualizes the relationship between vehicle weight and horsepower for a small dataset of 1970s cars. Each circle represents a car, color-coded by country of origin using `d3.scaleOrdinal` with `d3.schemeCategory10`. The visualization uses d3.axisBottom and d3.axisLeft to render axes, while circles appear as SVG elements with interactive tooltips. Data is loaded from a CSV file via `d3.csv`, with values coerced to numbers for scaling. The example demonstrates modular ES6 imports, including local modules for the scatter plot and axis creation.
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