Skip to main content
100%

Fast Food Nutrition

✓ Published0🌍 Public
Ppbruss@bu.edu
Last edited Sep 18, 2024
Created on Aug 31, 2024

This example displays the first row of a fast food nutrition dataset in raw JSON format, revealing attributes like calories, fat, sodium, and protein for items from McDonald’s and other chains. The code uses the `data.csv` import to load the dataset, then logs the keys and converts all quantitative attributes to numbers via a loop. The main function renders the parsed data as a formatted `<pre>` element, offering a static preview of the dataset’s structure.

AI-generated description

Overview

This dataset has been parsed and loaded as a CSV file.

It contains Nutritional values, including Calories and Micro-nutrients from six of the largest and most popular fast food restaurants: McDonald's, Burger King, Wendy's, Kentucky Fried Chicken (KFC), Taco Bell and Pizza Hut

Attributes:

  • Calories
  • Calories from Fat
  • Total Fat
  • Saturated Fat
  • Trans Fat
  • Cholesterol
  • Sodium
  • Carbs
  • Fiber
  • Sugars
  • Protein
  • Weight Watchers Points (where available)

Data & Dataset source:

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

Tasks:

  • I want to see the correlation between "Protein\n(g)" and "Calories" values for all fast food items ("Item").

  • I want to identify fast food companies with food items containing the highest and lowest levels of sodium, saturated, cholesterol by considering the following attributes: "Company", "Item", "Saturated Fat\n(g)", "Cholesterol\n(mg)" and "Sodium \n(mg)".

  • I want to see the correlation between "Saturated Fat\n(g)" and "Trans Fat\n(g)".

  • I want to be able to see the distribution of fiber values for individual fast food items by analyzing the "Fiber\n(g)" data for each "Item".

  • I want to discover outliers or extremes with regard to "Sodium \n(mg)" and "Item".

MIT Licensed

Similar vizzes