Skip to main content
100%

BMI by Age

✓ Published0🌍 Public
Ssrikkanth05
Last edited Jun 14, 2023
Created on Jun 14, 2023
Forked from Hello VizHub

This example visualizes the average Body Mass Index (BMI) by age, using binned age ranges along a linear scale. The chart displays blue bars for each age bin, with axes for age and average BMI, and a title labeling the graphic. The code loads data from a CSV file, computes BMI from weight and height, and uses D3 v7 APIs including `d3.bin`, `d3.scaleLinear`, `d3.axisBottom`, and `d3.axisLeft` to render the SVG. Axes are styled with custom tick marks and labels, while the binning groups individual data points into age intervals.

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