Skip to main content
100%

BMI By Age

✓ Published1🌍 Public
MMichael Biancardi
Last edited Jul 19, 2023
Created on Jun 14, 2023
Forked from Hello VizHub

This example visualizes the average body mass index (BMI) across different ages using a bin-based bar chart. The chart aggregates individual BMI values into age bins and displays the mean BMI per bin, with axes labeled "Age" and "Average Body Mass Index." The code loads data from a CSV file and uses d3.bin to create the histogram bins, along with d3.scaleLinear, d3.axisBottom, and d3.axisLeft to construct the scales and axes. SVG rectangles render the bars, with orange fills and white strokes as defined in the stylesheet.

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