Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@nvif1989/caloriecoefficient

nvif198922MIT1.0.5

Relative calorie requirement of distinct demographics.

nvif, 1989, calorie, coefficient, nutritive, value, indian, food, composition, table, carbohydrates, proteins, fats, amino, acids, vitamins, minerals, national, institute, nutrition, research

readme

Relative calorie requirement of distinct demographics.

This is part of package nvif1989.
Source: Nutritive Value of Indian Foods 1989.

const calorieCoefficient = require('@nvif1989/caloriecoefficient');
// calorieCoefficient.corpus: Map {group => {group, cu}}
// calorieCoefficient.load(): true (corpus loaded)
// calorieCoefficient.sql([table], [options]): sql commands
// calorieCoefficient.csv(): path to csv file
// calorieCoefficient(<query>)
// -> [{group, cu}] for matched groups


calorieCoefficient.load();
/* load corpus first */

calorieCoefficient('children 8 years');
calorieCoefficient('8 years');
calorieCoefficient('8');
// [ { group: 'Children 7 to 9 years', cu: 0.7 } ]

calorieCoefficient('12 years');
calorieCoefficient('12');
// [
//   { group: 'Adolescents 12 to 21 years', cu: 1.0 },
//   { group: 'Children 9 to 12 years', cu: 0.8 }
// ]

calorieCoefficient('adult male');
// [
//   { group: 'Adult male (sedentary worker)', cu: 1.0 },
//   { group: 'Adult male (moderate worker)', cu: 1.2 },
//   { group: 'Adult male (heavy worker)', cu: 1.6 }
// ]

calorieCoefficient('heavy worker');
// [
//   { group: 'Adult male (heavy worker)', cu: 1.6 },
//   { group: 'Adult female (heavy worker)', cu: 1.2 }
// ]

// ->
// cu: Consumption units

nvif1989

You can ask about composition of 592 key foods in India here: nvif1989.github.io.
Food composition values were measured by National Institute of Nutrition, Hyderabad.
Take a peek at the raw data here: Document, Webpage.