🌍 Public
Viewing a saved revision (read-only)
992a442f0bfb4db59abe140556787523
CS573 Final Project - Sugar (g) vs Sodium (mg)
Ppbruss@bu.edu
Last edited Oct 31, 2024
Created on Oct 24, 2024
This scatter plot displays the relationship between sodium (mg) and sugar (g) levels across menu items from six popular fast food restaurants, with circle size encoding calorie count and color distinguishing individual menu items. The visualization uses D3.js APIs including `scaleLinear`, `scaleOrdinal`, and `axisLeft` to construct the axes and scales, while a custom `observeResize` function from `@pbruss/responsive-axes` enables responsive width and height adjustments. Interactive tooltips appear on hover via D3 event handlers, and the data originates from a Kaggle dataset of fast food nutrition facts.
AI-generated descriptionA responsive scatter plot.