Foundation foods
USDA FOODDATA CENTRAL / FOUNDATION FOODS
A public dataset should arrive with receipts.
A reproducible pipeline that pins the source, enforces contracts, builds analytical tables, and publishes the evidence.
Nutrient observations
Referenced nutrients
Published Parquet layers
QUALITY CONTRACT
Nothing passes silently.
Primary keys, foreign keys, nulls, units, ranges, and evidence coverage are tested before an analytical artifact is trusted.
| Status | Contract | Observed | Expected |
|---|---|---|---|
| pass | food rows present | 20 | > 0 |
| pass | observation rows present | 1852 | > 0 |
| pass | food primary key unique | 0 | 0 duplicates |
| pass | observation primary key unique | 0 | 0 duplicates |
| pass | required food values complete | 0 | 0 nulls |
| pass | descriptions non-blank | 0 | 0 blank values |
| pass | food foreign keys valid | 0 | 0 orphan observations |
| warn | nutrient foreign keys valid | 1 | 0 orphan nutrients |
| pass | category foreign keys valid | 0 | 0 orphan categories |
| pass | amounts non-negative | 0 | 0 negative values |
| warn | amount completeness disclosed | 1 | 0 null amounts |
| pass | nutrient units recognized | 0 | 0 unsupported units |
| pass | per-100g macro ranges plausible | 0 | 0 values above 100 g/100 g |
| pass | energy range plausible | 0 | 0 values above 1,000 kcal/100 g |
| pass | every food has nutrient evidence | 0 | 0 foods without observations |
CORE NUTRIENT COVERAGE
Missingness is visible.
Completeness is reported, never imputed. A blank analytical value remains an explicit absence.
100.0% complete
100.0% complete
100.0% complete
100.0% complete
55.0% complete
80.0% complete
100.0% complete
100.0% complete
100.0% complete
95.0% complete
DATA LINEAGE
One source. Four useful layers.
- 01Acquire
Pinned USDA archive + SHA-256 verification
- 02Validate
Typed schemas + relational quality gates
- 03Transform
Dimensions, long fact, and wide nutrition profile
- 04Serve
Compressed Parquet + indexed DuckDB + this report
QUERYABLE EVIDENCE
From raw tables to an answer.
The wide table stays convenient for analysis while the long fact preserves nutrient-level lineage.
SELECT
description,
category,
protein_g,
energy_kcal,
fiber_g
FROM food_nutrition_wide
WHERE protein_g IS NOT NULL
ORDER BY protein_g DESC
LIMIT 6;| FDC ID | Food | Category | Protein | Energy | Fiber |
|---|---|---|---|---|---|
| 331960 | Chicken, broiler or fryers, breast, skinless, boneless, meat only, cooked, braised | Poultry Products | 32.1 g | 166.0 kcal | — g |
| 325036 | Cheese, parmesan, grated | Dairy and Egg Products | 29.6 g | 421.0 kcal | — g |
| 328637 | Cheese, cheddar | Dairy and Egg Products | 23.3 g | 408.0 kcal | — g |
| 323294 | Nuts, almonds, dry roasted, with salt added | Nut and Seed Products | 20.4 g | 620.0 kcal | 11.0 g |
| 334194 | Fish, tuna, light, canned in water, drained solids | Finfish and Shellfish Products | 19.0 g | 90.0 kcal | — g |
| 333374 | Fish, haddock, raw | Finfish and Shellfish Products | 16.3 g | 74.0 kcal | — g |
REPRODUCE IT
Clone. Run one command.
Get the same validated layer.
uv sync --frozen
uv run food-pipeline runOpen repository ↗