Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

CS573 Final Project - Sugar (g) vs Sodium (mg) w/ category grouping

Public visualization

Viewing a saved revision (read-only)

f8e56b793a41442ea6eaedc13678538c

CS573 Final Project - Sugar (g) vs Sodium (mg) w/ category grouping

0 stars1🌍 Public
Ppbruss@bu.edu
Last edited Oct 25, 2024
Created on Oct 24, 2024

This scatter plot shows the relationship between sugar and sodium levels for menu items from six major fast-food chains, with circle size encoding calorie content and color distinguishing restaurants. The visualization uses D3’s scaleLinear and scaleOrdinal functions to map data to positions and categorical colors, while a custom responsive-axes library handles dynamic resizing. Interactive tooltips appear on mouseover, revealing item details from the Kaggle fast-food nutrition dataset. The chart filters out entries with missing values and displays a title above the plot.

AI-generated description

CS573 Final Project Chart showcasing a <b>responsive</b> Cholesterol vs Sodium levels scatter plot for menu items belonging to six of the most popular fast food restaurants.

Items are color-coded by restaurant name as follows:

  • McDonald's (Pink)
  • Wendy's (Gray)
  • KFC (Brown)
  • Pizza Hut (Green)
  • Burger King (Orange)
  • Taco Bell (Purple)

Dataset: https://www.kaggle.com/datasets/joebeachcapital/fast-food