Skip to main content
100%

BMI by Age - Histogram Visualization

✓ Published0🌍 Public
HHarshithaAmbilpur
Last edited Jun 20, 2023
Created on Jun 20, 2023
Forked from Hello VizHub

This histogram visualizes average body mass index (BMI) across age groups, using data from a CSV file. The code sorts individuals into age bins with `d3.bin`, then renders orange rectangles whose heights represent each bin’s mean BMI, computed via `d3.sum`. Axes are generated with `d3.axisBottom` and `d3.axisLeft`, with scales set by `d3.scaleLinear`. The visualization uses D3 v7, loads data via `d3.csv`, and renders to an SVG canvas.

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