Skip to main content
Public

Share visualization

Loading preview…

CS573 Final Project - Cholesterol (mg) vs Sodium (mg)

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 - Cholesterol (mg) vs Sodium (mg)

3
Ppbruss@bu.edu
Last edited Oct 24, 2024
Created on Oct 24, 2024

This scatter plot visualizes the relationship between sodium and cholesterol content in fast food menu items, with each point’s radius encoding caloric value and color indicating the menu item name. The plot uses D3’s `scaleLinear`, `axisLeft`, and `extent` functions for axes and scaling, while `@pbruss/responsive-axes` handles responsive resizing. Hover interactions reveal a tooltip with item, company, sodium, cholesterol, and calories. The code imports data from the `@pbruss/fast-food-nutrition-dataset-v3` package and uses `circleOpacity` to manage point transparency.

AI-generated description

A responsive scatter plot.

Comments

Sign in to join the discussion.

MIT Licensed