BMI by Age
✓ Published0🌍 Public
This example visualizes the relationship between age and average body mass index (BMI) using binned bar charts. The code loads data via D3’s `csv` method, computes BMI from height and weight, and applies `scaleLinear` and `scaleTime` for axes. Binning is performed with `bin` and aggregated using `sum`. The SVG rendering includes axes with `axisBottom` and `axisLeft`, while rectangular bins are drawn with `.join('rect')`. The data originates from a GitHub gist, and the visualization demonstrates D3 v7’s modular imports and local ES6 module usage.
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