Histogram of BMI by Age With Brushing
This visualization displays the average Body Mass Index (BMI) of individuals grouped by age, using data from the CDC dataset. A brush tool allows the user to select a range of ages on the horizontal axis, which then filters the data and re-renders the histogram to show more granular age bins for the selected range. The code uses D3 v7 APIs such as `scaleLinear`, `axisBottom`, `axisLeft`, `bin`, and `brushX` to create and update the SVG rendering. The visualization is built with React and displays the data as a series of rectangular bars, with the title "BMI By Age" and labeled axes.
AI-generated descriptionThis visualization is a histogram of Body Mass Index enhanced by brushing from the [CDC Dataset] (https://gist.github.com/ridhimasaxena/a45f4774ff99a80bb5f71ca575f64ec3).
For this assignment, I have the brush essentially zoom into the histogram to further display BMI for more granular age bins.