You need to agree to share your contact information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

营养成分权威数据 / Authoritative food composition data

Collected under assistant 营养成分 into this dataset. Goal: official, citable food composition sources with reproducible scripts and full provenance.

Hard rules used during collection

  1. Keep all fetch/processing scripts (scripts/, team/*/scripts/).
  2. Provenance in sources.md / team/*/sources.md / manifests (agency, dataset, version, URL, access date).
  3. Cross-validate when multiple sources exist; never fabricate values.
  4. Prefer government / UN official bulk downloads.

Layout

Path Contents
team/0/ USDA FoodData Central — Foundation Foods (2026-04-30) + SR Legacy (2018-04) official CSV zips, extracted tables, download script + SHA256 manifest
team/3/ UK CoFID / McCance & Widdowson 2021 official Excel + user guide + download script
raw/cofid/ CoFID Excel provenance mirror
parquet/ Hub-mainstream Parquet mirrors of CSV / XLSX sheets (for DuckDB hf://, Polars, datasets)
team/1,2,4,5/ Reserved for China FCT, FAO/INFOODS, Japan STFC, ANSES CIQUAL
sources.md Master provenance index
ASSIGNMENT_BOARD.md / TEAM_INDEX.md Team board

Original CSV/XLSX are kept as provenance. PDFs and source ZIP archives are not converted.

Parquet naming

  • CSV → parquet/<same relative path>.parquet
  • XLSX sheet → parquet/<dir>/{workbook_stem}__{sanitized_sheet}.parquet

Configs (selected tables via load_dataset)

config_name Source
usda_foundation_food FDC Foundation food
usda_foundation_food_nutrient FDC Foundation food_nutrient
usda_foundation_nutrient FDC Foundation nutrient
usda_sr_legacy_food FDC SR Legacy food
usda_sr_legacy_food_nutrient FDC SR Legacy food_nutrient
usda_sr_legacy_nutrient FDC SR Legacy nutrient
cofid_proximates CoFID 2021 sheet 1.3 Proximates
cofid_inorganics CoFID 2021 sheet 1.4 Inorganics
cofid_vitamins CoFID 2021 sheet 1.5 Vitamins

Additional tables live under parquet/ (Foundation/SR Legacy companions, CoFID fatty-acid sheets, field-description workbooks). Use path-based DuckDB/Polars below for any file.

Usage

Hugging Face datasets

from datasets import load_dataset

# Private repo: ensure HF_TOKEN / huggingface-cli login
ds = load_dataset("666ofmine/nutrition-food-composition", "usda_sr_legacy_food")
print(ds["train"][0])

cofid = load_dataset("666ofmine/nutrition-food-composition", "cofid_proximates")

DuckDB (hf://)

import duckdb

con = duckdb.connect()
# Private: SET hf_token='hf_...';  or rely on huggingface-cli credential helper
df = con.sql("""
  SELECT f.description, n.name AS nutrient, fn.amount
  FROM read_parquet(
    'hf://datasets/666ofmine/nutrition-food-composition/parquet/team/0/extracted/sr_legacy/FoodData_Central_sr_legacy_food_csv_2018-04/food.parquet'
  ) f
  JOIN read_parquet(
    'hf://datasets/666ofmine/nutrition-food-composition/parquet/team/0/extracted/sr_legacy/FoodData_Central_sr_legacy_food_csv_2018-04/food_nutrient.parquet'
  ) fn ON f.fdc_id = fn.fdc_id
  JOIN read_parquet(
    'hf://datasets/666ofmine/nutrition-food-composition/parquet/team/0/extracted/sr_legacy/FoodData_Central_sr_legacy_food_csv_2018-04/nutrient.parquet'
  ) n ON fn.nutrient_id = n.id
  WHERE lower(f.description) LIKE '%apple%'
    AND n.name = 'Energy'
  LIMIT 20
""").df()
print(df)

CoFID proximates example:

SELECT "Food Code", "Food Name", "Protein (g)", "Fat (g)", "Carbohydrate (g)", "Energy (kcal) (kcal)"
FROM read_parquet(
  'hf://datasets/666ofmine/nutrition-food-composition/parquet/team/3/raw/McCance_Widdowsons_Composition_of_Foods_Integrated_Dataset_2021__1.3_Proximates.parquet'
)
WHERE "Food Name" IS NOT NULL
LIMIT 20;

Polars

import polars as pl

food = pl.read_parquet(
    "hf://datasets/666ofmine/nutrition-food-composition/parquet/team/0/extracted/foundation/FoodData_Central_foundation_food_csv_2026-04-30/food.parquet"
)
print(food.head())

Licensing / redistribution

  • USDA FoodData Central: U.S. government work; see USDA / FDC terms. Redistribution should preserve attribution to USDA ARS.
  • UK CoFID: Crown / UK government publication; follow gov.uk / Open Government Licence terms as applicable.
  • This repo’s scripts and documentation are provided for reproducibility of the collection pipeline.

Access date

Primary downloads: 2026-09-10 (Asia/Shanghai). Dataset packaged for Hub upload: 2026-09-12. Parquet conversion: 2026-09-12.

Downloads last month
20