Skip to main content
100%

Diabetes Dataset in Vega-lite

✓ Published0🌍 Public
Llakalia@wpi.edu
Last edited Sep 24, 2020
Created on Sep 24, 2020

A grouped bar chart visualizes an early-stage diabetes risk prediction dataset from UCI, showing the number of patients across age groups, separated by gender and diabetes status. The data is loaded from a Gist-hosted CSV via d3.csv in getData.js, then rendered using the vega-lite-api with a bar mark, encoding age on the x-axis, patient count on the y-axis, and a combined Gender_Diabetes field for color. The visualization uses Vega-Lite’s opacity channel and custom axis styling from config.js, with tooltips displaying patient counts.

AI-generated description

Diabetes Dataset: A visualization constructed using the vega-lite-api.

Diabetes Dataset summary is a summary by AgeGroup and Gender_Diabetes (diabetes status) of Early stage diabetes risk prediction dataset from UCI

I had realized in my original viz that I needed to create a Gender_Diabetes column to group by gender and diabetes status for the color channel. Haven't been able to figure out how to get javascript to work in getData.js so I had to re-generate the data set. Next step will be to upload additional datasets filtered on the risk factors and add a drop-down that will determine the url for getData.js based on the user's choice. (Not sure if I should add luminance as another channel for the presence or abscence of the chosen risk factor or if I should just double the number of categories for the color channel and maybe control the colors).

MIT Licensed

Similar vizzes