1.0.9 • Published 4 years ago

nvif1989 v1.0.9

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

The Nutritive Value of Indian Foods (NVIF 1989) provides nutrient composition for 592 key foods. Food composition values were measured by National Institute of Nutrition, Hyderabad. You can ask about composition of 592 key foods in India here: nvif1989.github.io.

Shown below is a text-query javascript API for search information through these tables. However, you may also add these to a database for more control over the query.

const nvif1989 = require('nvif1989');

async function main() {
await nvif1989.compositions.load();
await nvif1989.codes.load();
nvif1989.columns.load();
nvif1989.groups.load();
/* load corpus first */
 
// NOTE: grup is wrong, curd is wrong
nvif1989.compositions('pine apple');
nvif1989.compositions('ananas comosus');
nvif1989.compositions('sapuri');
nvif1989.compositions('294');
// [
//   {
//     code: '294',
//     name: 'PINE APPLE',
//     scie: 'Ananas comosus',    lang: 'B. Anarash; G., H., Kan., Mar., P. Ananas; Mal. Kayitha chakka; O. Sapuri Anasianas; Tam. Anasi pazham; Tel. Anasa Pandu',
//     grup: 'Cereal grains and products',
//     tags: 'vegetarian eggetarian fishetarian veg',
//     enerc: 46,
//     water: 87.8,
//     ...
//   }
// ]

nvif1989.columns('vitamin c');
nvif1989.columns('c-vitamin');
// [
//   {
//     code: 'vitc',
//     name: 'Vitamin C',
//     tags: 'ascorbic acid total ascorbate water soluble essential'
//   }
// ]

nvif1989.codes('hing');
// [ { name: 'Hing (B.,G.,H.,Mar.,P.)', code: '215' } ]

nvif1989.groups('cereals');
nvif1989.groups('Grains');
nvif1989.groups('505a');
// [
//   {
//     code: 'A',
//     group: 'Cereal grains and products',
//     entries: '1-27;452-465;505a',
//     tags: 'vegetarian eggetarian fishetarian veg'
//   }
// ]
}
main();

reference

MethodAction
compositionsDetailed nutrient composition of 592 key foods in India.
columnsCodes and names of nutrients, and its components.
picturesSingle representative photo of each foods (JPEG, 307x173).
intakesRecommended daily intakes of nutrients.
hierarchyTree-like hierarchy of nutrients, and its components.
representationsRepresentations of columns (as factors and units).
codesUniquely identifiable codes for each food.
groupsCategorization of food by their common names.
descriptionsNames of each food in local languages, including scientific name.
abbreviationsFull forms of abbreviations used in the original book.
languagesFull form of language abbreviations.
nutrientsDetailed description of various nutrients, and its components.
proteinValueAbsorption and bioavailability of different protein sources.
calorieCoefficientRelative calorie requirement of distinct demographics.
activityClassClassification of activities based on occupations.
energiesMetabolizable energy conversion factors.
jonesFactorsJones factors for conversion of nitrogen to protein.
carbohydratesConversion of carbohydrate weights to monosaccharide equivalents.
aboutOn the history of malnutrition, current status, and data details.
contentsContents in the original book.

TODO: methods in italic.

nodef