CoolFace
Datasetpublic

kwongnon/2026-24679-tabular-dataset

24-679 (Fall 2026): Snack Nutrition Dataset kwongnon/2026-24679-tabular-dataset Nutrition-label information for 50 packaged snack products. Each row represents one snack and contains its product name, servings per container, calories, total fat, cholesterol, sodium, total carbohydrate, and protein. The dataset can be used for classroom exercises involving tabular data exploration, preprocessing, visualization, clustering, regression, or other machine-learning tasks using… See the full description on the dataset page: https://huggingface.co/datasets/kwongnon/2026-24679-tabular-dataset.

sourceHugging Faceupdated 8d agoView on Hugging Face
0likes63downloads
Dataset Card

24-679 (Fall 2026): Snack Nutrition Dataset

kwongnon/2026-24679-tabular-dataset

Nutrition-label information for 50 packaged snack products. Each row represents one snack and contains its product name, servings per container, calories, total fat, cholesterol, sodium, total carbohydrate, and protein.

The dataset can be used for classroom exercises involving tabular data exploration, preprocessing, visualization, clustering, regression, or other machine-learning tasks using nutrition information.

Source and task

The preparation notebook reads the snack nutrition data, standardizes numeric fields, removes non-numeric text such as "About" from servings-per-container values, and checks that the selected nutrition fields satisfy valid numeric domains.

Each row corresponds to one packaged snack product. Snack name identifies the product and should normally be excluded from numeric modeling unless it is deliberately transformed into a feature.

Nutrition quantities must be finite and nonnegative. Servings per container must be positive. These checks establish valid numerical domains but do not independently verify the accuracy of the manufacturer's nutrition label.

Course: 24-679, Fall 2026, Carnegie Mellon University. Repository maintainer: the account shown above.

Fields

Stored fieldMeaning and modeling role
Snack nameProduct identifier/name. Treat as descriptive context rather than a numeric measurement.
Servings per containerNumber of servings in one package. Positive numeric feature.
CaloriesCalories per serving. Nonnegative numeric feature.
Total fat (g)Total fat per serving in grams. Nonnegative numeric feature.
Cholesterol (mg)Cholesterol per serving in milligrams. Nonnegative numeric feature.
Sodium (mg)Sodium per serving in milligrams. Nonnegative numeric feature.
Total carbohydrate (g)Total carbohydrate per serving in grams. Nonnegative numeric feature.
Protein (g)Protein per serving in grams. Nonnegative numeric feature.

The machine-readable feature metadata at the top of this card preserves the exact column names and storage types used in the packaged dataset.

Dataset summary

The packaged dataset contains 50 snack products.

FeatureCountMeanStd. dev.MinMedianMax
Calories50147.6038.7980150300
Servings per container508.823.891818
Total fat (g)506.973.840717
Cholesterol (mg)501.604.570020
Sodium (mg)50194.00102.8515175530
Total carbohydrate (g)5018.985.6001838
Protein (g)502.340.98127

For example, one observation is UTZ Classic Thins Pretzels, with 16 servings per container, 100 calories, 1 g total fat, 0 mg cholesterol, 420 mg sodium, 21 g total carbohydrate, and 2 g protein per serving.

Data validation and preprocessing

The preparation process applies the following checks:

  • Snack name must be present and is treated as a product identifier rather than a quantitative feature.
  • Servings per container must be finite and greater than zero.
  • Calories, total fat, cholesterol, sodium, total carbohydrate, and protein must be finite and nonnegative.
  • Text such as "About" is removed from servings-per-container values before numeric conversion.
  • Decimal serving counts may be rounded during cleaning when the source expresses the quantity approximately.
  • Nutrition measurements are retained as numeric values and should not be assumed to be counts merely because many observed values are integers.

The observed ranges in this dataset are:

  • Servings per container: 1–18
  • Calories: 80–300 kcal
  • Total fat: 0–17 g
  • Cholesterol: 0–20 mg
  • Sodium: 15–530 mg
  • Total carbohydrate: 0–38 g
  • Protein: 1–7 g

These observed ranges describe this particular sample and should not be interpreted as universal limits for snack foods.

Splits

These counts are computed from the packaged splits for this run.

SplitOriginal rowsSynthetic rowsTotal rows
train35210245
validation707
test808

Requested holdout fraction: 30%; test receives 50% of that holdout. Small-sample rounding may change the realized proportions. The first split uses seed 42, and the holdout split uses seed 43.

Rows should be split before any augmentation or transformations that learn information from the dataset. Keep validation and test rows unchanged so that downstream model comparisons use the same holdout observations.

Because the dataset contains only 50 products, performance estimates may vary substantially depending on the particular train/validation/test split.

Intended use and limitations

Use this dataset for teaching tabular-data preparation, exploratory data analysis, visualization, feature relationships, clustering, regression, and basic machine-learning workflows.

The dataset contains only 50 snack products and is not a representative sample of all snack foods available in the market. Product selection may introduce substantial sampling bias.

Nutrition values are reported per serving, so comparisons can be affected by differences in manufacturer-defined serving sizes. A product with fewer calories per serving is not necessarily lower in calories per package.

Servings per container describes package size and should therefore be interpreted differently from the per-serving nutrition variables.

The dataset does not contain information about ingredients, price, package weight, micronutrients, consumer preferences, health outcomes, or frequency of consumption. Nutrition values alone should not be used to make individual medical or dietary recommendations.

If models are trained on this dataset, evaluate them using fixed validation and test sets and report appropriate metrics for the selected task. Because the sample is small, conclusions about generalization should be made cautiously.

Privacy and licensing

The dataset describes commercial snack products rather than individual people and therefore does not contain direct personal information.

Product names may be trademarks of their respective owners. Nutrition information may originate from manufacturer packaging or publicly available product information. Review the original source and its applicable terms before redistributing the dataset.

No license is assigned by this dataset card unless one is explicitly provided in the repository metadata.

Load and inspect

python
from datasets import load_dataset

ds = load_dataset("kwongnon/2026-24679-tabular-dataset")

print(ds)
print(ds["train"][0])