Skip to main content
100%

Nivesh Syreddy Reusable D3 Scatter Plot

• Draft1🔗 Unlisted
Nniveshsyreddy@gmail.com
Last edited Apr 1, 2025
Created on Mar 31, 2025

This animated scatter plot visualizes medical insurance charges against patient age and BMI, with points colored by smoking status using a categorical color scale. Built with D3 v6, it uses `scaleLinear`, `scaleOrdinal`, `axisLeft`, `axisBottom`, and a reusable chart function with setter methods. The chart redraws every three seconds, alternating its x-axis between age and BMI, while the y-axis remains fixed on charges. Data comes from a CSV hosted on GitHub Gist, and the rendering uses SVG circles with opacity and transitions between axis configurations.

AI-generated description
MIT Licensed

Similar vizzes