@nvif1989/caloriecoefficient

1.0.5 • Public • Published

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.

Dependents (1)

Package Sidebar

Install

npm i @nvif1989/caloriecoefficient

Weekly Downloads

1

Version

1.0.5

License

MIT

Unpacked Size

7.39 kB

Total Files

5

Last publish

Collaborators

  • wolfram77