Skip to main content
100%

BMI by Age

✓ Published0🌍 Public
Aaniteshterala2000
Last edited Jun 25, 2023
Created on Jun 25, 2023
Forked from Hello VizHub

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 description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes