Pima Indians Diabetes Dataset (Bar Chart technique)
✓ Published0🌍 Public
Sskasliwal@wpi.edu
Last edited Oct 4, 2025
Created on Oct 4, 2025
This example visualizes the average plasma glucose concentration for two patient outcome groups—high-risk (diabetic) and low-risk (non-diabetic)—using a bar chart. The code loads the Pima Indians Diabetes dataset from a CSV file, filters out records with zero values for glucose or BMI, and aggregates the data by calculating the mean glucose per outcome. It uses D3 v7 functions such as `csvParse`, `scaleBand`, `scaleLinear`, and `mean`, with bars colored via a categorical scale to distinguish risk levels.
AI-generated descriptionMIT Licensed