@ifct2017/hierarchy
TypeScript icon, indicating that this package has built-in type declarations

2.0.9 • Public • Published

Tree-like hierarchy of nutrients, and its components.
📦 Node.js, 📜 Files.

This is part of package ifct2017.
Online database: ifct2017.github.io.


const hierarchy = require('@ifct2017/hierarchy');
// hierarchy(query)
// → {parents, ancestry, children} if found, null otherwise


hierarchy('soluble oxalic acid');
hierarchy('Soluble Oxalic Acid');
// { parents: 'oxalt', ancestry: 'oxalt orgac', children: '' }

hierarchy('what is hierarchy of total saturated fat?');
hierarchy('who are children of total saturated fat?');
// { parents: 'fatce',
//   ancestry: 'fatce',
//   children:
//    'f4d0 f6d0 f8d0 f10d0 f11d0 f12d0 f14d0 f15d0 f16d0 f18d0 f20d0 f22d0 f24d0' }
hierarchy.load() // → corpus
hierarchy.sql([table], [options]) // → sql statements
hierarchy.csv() // → path of csv file



ORG DOI

Data was obtained from the book Indian Food Composition Tables 2017.
Food composition values were measured by National Institute of Nutrition, Hyderabad.
Take a peek at the raw data here: Document, Webpage.

Package Sidebar

Install

npm i @ifct2017/hierarchy

Weekly Downloads

35

Version

2.0.9

License

MIT

Unpacked Size

29 kB

Total Files

7

Last publish

Collaborators

  • wolfram77