🌍 Public
Viewing a saved revision (read-only)
fb8d60e9011845469c04b4e12065c88a
Weight Treatment Data Visualization
Ssyedhaliz
Last edited Mar 9, 2023
Created on Mar 9, 2023
This example visualizes average weight differences before and after treatment, grouped by gender, using diverging blue and pink bars. It builds a React component that loads CSV data via `d3.csv`, nests and aggregates it with `d3.nest` and `d3.mean`, then renders an SVG bar chart with `d3.scaleBand` and `d3.scaleLinear` scales. Axes are drawn using `d3.axisBottom` and `d3.axisLeft` via refs, while the bar heights encode positive and negative weight changes relative to a zero baseline.
AI-generated descriptionA bare minimum HTML page.