1.0.2 • Published 8 years ago

fda-nutrient-database v1.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

FDA Nutrient Datbase

Build Status

US Department of Agriculture, Agricultural Research Service, Nutrient Data Laboratory. USDA National Nutrient Database for Standard Reference, Release 28. Version Current: September 2015. Internet: http://www.ars.usda.gov/nea/bhnrc/ndl

This package includes helper functions for processing the FDA Nutrient Database for Standard Reference.

Abbreviated Fields

The fields are defined on page 44 of the sr28_doc.pdf

FieldDescriptionExample
ndbNoprimarykey9522
shortDescription60 character abbreviated description'CRANBERRY JUC BLEND,100% JUC,BTLD,W/ ADDED VIT C & CA'
waterg/100g88.6
calorieskcal/100g45
proteing/100g0.27
fatg/100g0.12
ashg/100g0.1
carbohydrateg/100g10.91
fiberg/100g0.1
sugarg/100g9.8
calciummg/100g19
ironmg/100g0.08
magnesiummg/100g5
phosphorusmg/100g8
potassiummg/100g76
sodiummg/100g6
zincmg/100g0.05
coppermg/100g0.016
manganesemg/100g0.067
seleniumug/100g0.1
vitaminCmg/100g31.5
thiaminmg/100g0.005
riboflavinmg/100g0.015
niacinmg/100g0.094
pantoAcidmg/100g0
vitaminB6mg/100g0.018
folateTotalug/100g18
folicAcidug/100g0
foodFolateug/100g18
folateDFEug/100g18
cholinemg/100g1.8
vitaminB12ug/100g0
vitaminAIUIU/100g25
vitaminARAEug retinol activity equivalents/100g1
retinolug/100g0
alphaCarotug/100g0
betaCarotug/100g15
betaCryptug/100g0
lycopeneug/100g0
luteinZeazanthinug/100g68
vitaminEmg/100g0.01
vitaminDMCGug/100g0
vitaminDIUIU/100g0
vitaminKug/100g0
saturatedFatg/100g0.002
monosaturatedFatg/100g0.002
polyunsaturatedFatg/100g0.002
cholesterolmg/100g0
weight1W in the Weights and Measures formula below200
weight1DescriptionDescription of weight 1'6.75 fl oz'
weight2W in the Weights and measures formula below240
weight2DescriptionDescription of weight 2'8 fl oz'
refusePercentPercent Refuse0

Food Description Fields

The fields are defined on page 35 of the sr28_doc.pdf

Weights and Measures

(From page 31 of sr28_doc.pdf)

Information is provided on household measures for food items (for example, 1 cup, 1 tablespoon, 1 fruit, 1 leg). Weights are given for edible material without refuse, that is, the weight of an apple without the core or stem, or a chicken leg without the bone, and so forth. The Weight file contains the gram weights and measure descriptions for each food item. This file can be used to calculate nutrient values for food portions from the values provided per 100 g of food. The following formula is used to calculate the nutrient content per household measure:

N = (V*W)/100

N = nutrient value per household measure,
V = nutrient value per 100 g (Nutr_Val in the Nutrient Data file), and W = g weight of portion (Gm_Wgt in the Weight file).

The Weight file can be used to produce reports showing the household measure and nutrient values calculated for that portion. The weights are derived from published sources, industry files, studies conducted by USDA (Adams, 1975; Fulton et al., 1977), and the weights and measures used in the FNDDS (2014). However, weight information is not available for all food items in the database. Though special efforts have been made to provide representative values, weights and measures obtained from different sources vary considerably for some foods.

Usage

const fda = require('fda-nutrient-database')

nutrients = fda.abbreviated(cb)

This invokes the callback with an array of objects from the abreviated datafile:
{
  ndbNo: '09522',
  shortDescription: 'CRANBERRY JUC BLEND,100% JUC,BTLD,W/ ADDED VIT C & CA',
  water: 88.6,
  calories: 45,
  protein: 0.27,
  fat: 0.12,
  ash: 0.1,
  carbohydrate: 10.91,
  fiber: 0.1,
  sugar: 9.8,
  calcium: 19,
  iron: 0.08,
  magnesium: 5,
  phosphorus: 8,
  potassium: 76,
  sodium: 6,
  zinc: 0.05,
  copper: 0.016,
  manganese: 0.067,
  selenium: 0.1,
  vitaminC: 31.5,
  thiamin: 0.005,
  riboflavin: 0.015,
  niacin: 0.094,
  pantoAcid: 0,
  vitaminB6: 0.018,
  folateTotal: 18,
  folicAcid: 0,
  foodFolate: 18,
  folateDFE: 18,
  choline: 1.8,
  vitaminB12: 0,
  vitaminAIU: 25,
  vitaminARAE: 1,
  retinol: 0,
  alphaCarot: 0,
  betaCarot: 15,
  betaCrypt: 0,
  lycopene: 0,
  luteinZeazanthin: 68,
  vitaminE: 0.01,
  vitaminDMCG: 0,
  vitaminDIU: 0,
  vitaminK: 0,
  saturatedFat: 0.002,
  monosaturatedFat: 0.002,
  polyunsaturatedFat: 0.002,
  cholesterol: 0,
  weight1: 200,
  weight1Description: '6.75 fl oz',
  weight2: 240,
  weight2Description: '8 fl oz',
  refusePercent: 0
}
nutrients = fda.foodDescription(cb)

This invokes the callback with an array of objects from the food description datafile:
{
  ndbNo: '44203',
  foodGroupCode: '1400',
  longDescription: 'Beverages, Cocktail mix, non-alcoholic, concentrated, frozen',
  shortDescription: 'BEVERAGES,COCKTAIL MIX,NON-ALCOHOLIC,CONCD,FRZ',
  commonName: '',
  manufacturer: '',
  survey: true,
  refuseDescription: '',
  refuse: 0,
  scientificName: '',
  nitrogenFactor: 6.25,
  proteinFactor: 4,
  fatFactor: 9,
  carbohydrateFactor: 4
}