Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Weight Treatment Data Visualization

Public visualization

Viewing a saved revision (read-only)

36b31acb4b52403a892df2328c4585e7

Weight Treatment Data Visualization

0 stars0🌍 Public
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 description

A bare minimum HTML page.