Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

BMI by Age

Public visualization

BMI by Age

0 stars0🌍 Public
BBhavanaGIrni
Last edited Jul 3, 2023
Created on Jul 3, 2023

A histogram displays average body mass index (BMI) across age, using orange bars with white strokes and labeled axes. The code loads CDC health survey data via `d3.csv`, computes BMI from height and weight, and bins ages with `d3.bin`. `d3.scaleLinear` maps age and averaged BMI to SVG pixel coordinates, while `d3.axisBottom` and `d3.axisLeft` render the ticks. Axes labels are added manually, and the chart is built with D3 v7 selections and SVG rectangles.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed