# jsgrowup

> Calculate z-scores of anthropometric measurements based on WHO and CDC child growth standards; translation of pygrowup

Latest version **0.8.0** (published 2017-09-01) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install jsgrowup
pnpm add jsgrowup
yarn add jsgrowup
bun add jsgrowup
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.8.0 |
| Published | 2017-09-01 |
| First published | 2017-09-01 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Elon Danziger |
| Maintainers | elon-gs |

## Links

- npm: https://www.npmjs.com/package/jsgrowup
- Repository: https://github.com/GlobalStrategies/jsgrowup
- Homepage: https://github.com/GlobalStrategies/jsgrowup#readme
- Issues: https://github.com/GlobalStrategies/jsgrowup/issues
- npm.io page: https://npm.io/package/jsgrowup

## Dependencies (5)

- [chai](https://npm.io/package/chai.md) ^4.1.1
- [ramda](https://npm.io/package/ramda.md) ^0.24.1
- [fs-extra](https://npm.io/package/fs-extra.md) ^4.0.1
- [csvtojson](https://npm.io/package/csvtojson.md) ^1.1.7
- [decimal.js](https://npm.io/package/decimal.js.md) ^7.2.3

## Recent versions

- 0.8.0 (latest) — 2017-09-01

## README

jsgrowup
========

[![Build Status](https://travis-ci.org/GlobalStrategies/jsgrowup.svg?branch=master)](https://travis-ci.org/GlobalStrategies/jsgrowup.svg?branch=master)

`jsgrowup` by Global Strategies is based on `pygrowup` by Evan Wheeler:
https://github.com/ewheeler/pygrowup

`jsgrowup` calculates z-scores for the following anthropometric indicators:

* weight-for-age

* length/height-for-age

* weight-for-length/height

* head-circumference-for-age

* body-mass-index-for-age

based on the WHO Child Growth Standards:
* http://www.who.int/childgrowth/standards/en/
* http://www.who.int/entity/childgrowth/standards/technical_report/en/index.html

and can optionally use CDC growth standards:
* http://www.cdc.gov/growthcharts

`jsgrowup` avoids floating-point operations to eliminate the unwanted rounding
that muddles the precision of some of the `igrowup` implementations:
* http://docs.sun.com/source/806-3568/ncg_goldberg.html


INSTALLATION
============
`npm install jsgrowup`


EXAMPLE USAGE
=============

`demo.js` includes a sample z-score lookup.


EXCEPTIONS
==========

caller should watch for:

* `AssertionError` raised when caller provides inappropriate parameters

as well as more specific errors (all subclasses of `RuntimeError`):

* `InvalidMeasurement` raised when measurement is invalid for requested indicator

* `InvalidAge` raised when age is invalid for requested indicator

* `DataNotFound` raised when WHO/CDC data is not found for the requested observation (e.g., box-cox, median, coefficient of variance for age)

* `DataError` raised when an error occurs while loading WHO/CDC data into memory


TESTING
=======

* test script using mocha:
`mocha --delay`

* no-framework tests:
`node simpletests.js`

The included tests use example anthropometric data taken from
demonstration data shipped with WHO's `igrowup` software.
`jsgrowup` performs the same calculations and compares the results
to the WHO results.
Please see the sofware licence agreement for WHO's `igrowup`, which
is the source of the test data files:
http://www.who.int/childgrowth/software/license2.pdf

Currently, a small number of cases fail to produce results within 1 standard
deviation of the WHO resuts. These discrepancies may be due to WHO's
use of floating point arithmetic in their `igrowup` software, which leads to
less precise calculations compared to `jsgrowup`. In the absence of any other
trusted test data, please be aware that no claims are made to the
accuracy or reliability of `jsgrowup`'s calculations.


DEVELOPING
==========

The source WHO .txt tables can be easily converted to json with the help of
two amazing python utilities:

* The Pyed Piper https://code.google.com/p/pyp/

* csvkit http://pypi.python.org/pypi/csvkit

heres an example one-liner that changes the source .txt from tsv
to csv (with `pyp`) and then to json (with csvkit's `csvjson`)
`$ cat bmi_girls_2_5_zscores.txt | pyp "p.replace('\t', ',')" | csvjson > bmifa_girls_2_5_zscores.json`

---
_Source: https://npm.io/package/jsgrowup · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
