BMI By Age
✓ Published1🌍 Public
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 descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed