Nivesh Syreddy Reusable D3 Scatter Plot
• Draft1🔗 Unlisted
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 descriptionMIT Licensed