Skip to main content
Public

Share visualization

Loading preview…

CS573 Final Project - Sugar (g) vs Sodium (mg) w/ category grouping, legend, tooltip & interactive color functionality

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

CS573 Final Project - Sugar (g) vs Sodium (mg) w/ category grouping, legend, tooltip & interactive color functionality

1

This scatter plot from the CS573 Final Project visualizes the relationship between sugar (g) and sodium (mg) across menu items from six fast-food chains, with bubble size encoding calories. Data comes from a Kaggle fast-food nutrition dataset. The D3.js visualization uses `scaleLinear` for axes, tooltips on hover, and an interactive legend that highlights bubbles by restaurant category when hovered, while `observeResize` ensures responsive rendering.

AI-generated description

CS573 Final Project Chart showcasing a responsive Sugar vs Sodium levels scatter plot for menu items belonging to six of the most popular fast food restaurants. Bubble size is derived by the calories of the menu item.

Bubbles 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)

Interactive Features include:

  • Tooltip data view
  • Interactive color legend

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

Comments

Sign in to join the discussion.

MIT Licensed