BMI by Age
✓ Published0🌍 Public
This visualization shows the average Body Mass Index (BMI) across different ages, using a bar chart where each bar represents a binned age range and its height corresponds to the mean BMI for that group. The code loads data from a CSV file via a Gist URL, parses and transforms the values to calculate BMI, and uses D3 v7’s `scaleLinear`, `scaleTime`, `axisLeft`, `axisBottom`, `bin`, and `sum` functions to bin the data, scale the axes, and render the SVG output. The axes have grid lines, and the chart includes a title and labeled age and BMI axes.
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