Skip to main content
Public

Share visualization

Loading preview…

CS573 Final Project - Average Sodium (mg) Levels by Restaurant

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 - Average Sodium (mg) Levels by Restaurant

1
Ppbruss@bu.edu
Last edited Nov 30, 2024
Created on Nov 14, 2024

This interactive bar chart displays the average sodium levels (in mg) for six fast food restaurants, using data from a Kaggle nutrition dataset. Each bar is color-coded and includes a hover tooltip that reveals the exact average value. The visualization is built with D3.js, using `scaleBand` and `scaleLinear` for axes, while the `@pbruss/responsive-axes` library handles responsive sizing. Bars change color on mouseenter and revert on mouseleave, with tooltip positioning managed through mouse events. The chart also includes labeled axes and a background rectangle for clarity.

AI-generated description

An interactive and responsive bar chart showing the average sodium levels by fast food restaurant. Includes a tooltip feature to view the exact values.

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

Comments

Sign in to join the discussion.

MIT Licensed