Activity6_Task3_Question_3
✓ Published0🌍 Public
This scatter plot visualizes the relationship between BMI and insurance charges, with each point colored blue or green to indicate whether the person is a smoker. The data comes from a CSV file hosted on GitHub, loaded via `d3.csv` with parsed numeric fields. The visualization uses `d3.scaleLinear`, `d3.extent`, and `d3.axisBottom`/`d3.axisLeft` to map the continuous variables and render axes. All marks are drawn as SVG circles using `d3.selectAll().join()`, with colors assigned via a switch statement on the smoker attribute.
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