{ "info": { "author": "Evan Wheeler", "author_email": "evanmwheeler@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Healthcare Industry", "License :: OSI Approved :: BSD License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering :: Bio-Informatics" ], "description": "========\npygrowup\n========\n\npygrowup calculates z-scores for the following anthropometric indicators:\n\n* weight-for-age\n\n* length/height-for-age\n\n* weight-for-length/height\n\n* head-circumference-for-age\n\n* body-mass-index-for-age\n\nbased on the WHO Child Growth Standards:\n* http://www.who.int/childgrowth/standards/en/\n* http://www.who.int/entity/childgrowth/standards/technical_report/en/index.html\n\nand can optionally use CDC growth standards:\n* http://www.cdc.gov/growthcharts\n\npygrowup avoids floating-point operations to eliminate the unwanted rounding\nthat muddles the precision of some of the igrowup implementations:\n* http://docs.sun.com/source/806-3568/ncg_goldberg.html\n\n\nREQUIREMENTS\n============\n\n* Python 2.7.x, Python 3.x or later\n* Additionally requires https://pypi.python.org/pypi/six\n\n\nINSTALLATION\n============\n`pip install pygrowup`\n\n\nEXAMPLE USAGE\n=============\n\nTypical usage might look like this::\n\n #!/usr/bin/env python\n\n from pygrowup import Calculator\n # helpers contains optional utilities for formatting dates, etc\n from pygrowup import helpers\n\n # Height adjustments are part of the WHO specification (see section 5.1)\n # to correct for recumbent vs standing measurements,\n # but none of the existing software seems to implement this.\n # default is false so values are closer to those produced\n # by igrowup software\n #\n # WHO specs include adjustments (see Chapter 7) to z-scores of weight-based\n # indicators that are greater than +/- 3 SDs. These adjustments\n # correct for right skewness and avoid making assumptions about\n # the distribution of data beyond the limits of the observed values.\n #\n # However, when calculating z-scores in a live data collection\n # situation, z-scores greater than +/- 3 SDs are likely to indicate\n # data entry or anthropometric measurement errors and should not\n # be adjusted. Instead, these large z-scores should be used to\n # identify poor data quality and/or entry errors.\n # These z-score adjustments are appropriate only when there\n # is confidence in data quality.\n #\n # In this example, Calculator is initialized with its default values\n # (i.e., ``calculator = Calculator()`` would do the same thing).\n # The ``include_cdc`` option will enable CDC measurements for children >5 years.\n calculator = Calculator(adjust_height_data=False, adjust_weight_scores=False,\n include_cdc=False, logger_name='pygrowup',\n log_level='INFO')\n\n # for a timeless example, lets pick a birthdate nine months ago\n import datetime\n great_day = datetime.datetime.utcnow().date()\n nine_months_ago = great_day - datetime.timedelta(days=(9 * 30.4374))\n\n # nine months ago in an odd, ambiguous string format\n dob = nine_months_ago.strftime(\"%d%m%y\")\n\n my_child = {'date_of_birth' : dob, 'sex' : 'male', 'weight' : '8.0', 'height' : '69.5'}\n\n # optionally use helper functions for formatting data\n\n # transform something like '100309' into '2009-03-10'\n valid_date = helpers.get_good_date(my_child['date_of_birth'])\n\n # transform 'male' into 'M'\n valid_gender = helpers.get_good_sex('male')\n\n # calculate 9 months from valid_date\n valid_age = helpers.date_to_age_in_months(valid_date[1])\n\n\n # calculate length/height-for-age zscore\n lhfa_zscore_for_my_child = calculator.lhfa(my_child['height'], valid_age, valid_gender)\n\n # calculate weight-for-age zscore\n wfa_zscore_for_my_child = calculator.wfa(my_child['weight'], valid_age, valid_gender)\n\n # calculate weight-for-length zscore\n # optional height parameter is only necessary for weight-for-height\n # and weight-for-length\n wfl_zscore_for_my_child = calculator.wfl(my_child['weight'], valid_age, valid_gender, my_child['height'])\n\n # Note: for backwards compatibility you may still make calls to:\n wfl_zscore_for_my_child = calculator.zscore_for_measurement('wfl', my_child['weight'], valid_age, valid_gender, my_child['height'])\n\n\nEXCEPTIONS\n==========\n\ncaller should watch for:\n\n* `AssertionError` raised when caller provides inappropriate parameters\n\nas well as more specific errors (all subclasses of `RuntimeError`):\n\n* `InvalidMeasurement` raised when measurement is invalid for requested indicator\n\n* `InvalidAge` raised when age is invalid for requested indicator\n\n* `DataNotFound` raised when WHO/CDC data is not found for the requested observation (e.g., box-cox, median, coeffeciant of vairance for age)\n\n* `DataError` raised when an error occurs while loading WHO/CDC data into memory\n\n\nTESTING\n=======\n\ninstall nose to execute tests:\n`pip install nose`\n\nthe included tests use example anthropometric data taken from\ndemonstration data shipped with WHO's igrowup software.\npygrowup performs the same calculations and compares the results\nto the WHO results.\nplease see the sofware licence agreement for WHO's igrowup, which\nis the souce of the test data files:\nhttp://www.who.int/childgrowth/software/license2.pdf\n\ncurrently, 4 cases fail to produce results within 1 standard deviation\nof the WHO resuts. I believe these discrepencies are due to WHO's use\nof floating point arithmetic in their igrowup software, which leads to less\nprecise calculations compared to pygrowup. In the absence of any other\ntrusted test data, please be aware that no claims are made to the\naccuracy or reliability of pygroup's calculations.\n\nto run the tests:\n`$ nosetests tests.py`\n\n\nDEVELOPING\n==========\n\nThe source WHO .txt tables can be easily converted to json with the help of\ntwo amazing python utilities:\n\n* The Pyed Piper https://code.google.com/p/pyp/\n\n* csvkit http://pypi.python.org/pypi/csvkit\n\nheres an example one-liner that changes the source .txt from tsv\nto csv (with `pyp`) and then to json (with csvkit's `csvjson`)\n`$ cat bmi_girls_2_5_zscores.txt | pyp \"p.replace('\\t', ',')\" | csvjson > bmifa_girls_2_5_zscores.json`", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/ewheeler/pygrowup/archive/0.8.2.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/ewheeler/pygrowup", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "pygrowup", "package_url": "https://pypi.org/project/pygrowup/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pygrowup/", "project_urls": { "Download": "https://github.com/ewheeler/pygrowup/archive/0.8.2.tar.gz", "Homepage": "http://github.com/ewheeler/pygrowup" }, "release_url": "https://pypi.org/project/pygrowup/0.8.2/", "requires_dist": null, "requires_python": null, "summary": "Calculate z-scores of anthropometric measurements based on WHO and CDC child growth standards", "version": "0.8.2" }, "last_serial": 2005651, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "642f886640a6702bde4e7b3dd8cea4b0", "sha256": "0ac20c78f4f27350c30af7fdbf3cdf73ff2cb4902e2d25b0e9090986411b805c" }, "downloads": -1, "filename": "pygrowup-0.2.tar.gz", "has_sig": false, "md5_digest": "642f886640a6702bde4e7b3dd8cea4b0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7741, "upload_time": "2010-08-10T17:27:12", "url": "https://files.pythonhosted.org/packages/f5/33/0e506efeda18130b4e295e299396605b254cf7abe89c618b20652bead606/pygrowup-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "ec3f20be0ea7599e859170fcf85cce9c", "sha256": "231444dde354c4f140d169598d24a476a76fb4c765b69c1f70acacf047264cc4" }, "downloads": -1, "filename": "pygrowup-0.3.tar.gz", "has_sig": false, "md5_digest": "ec3f20be0ea7599e859170fcf85cce9c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 56652, "upload_time": "2010-11-09T18:49:48", "url": "https://files.pythonhosted.org/packages/fc/8f/ce48a62cae75bfb68acd89182f691abee4a99699f3da41505755c6be4d99/pygrowup-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "63e09151180684eee9efcb5e89f4a745", "sha256": "ba862da5d13470cc2779e37feb7bf84473d5664fd09d608f958cb4d09cb49e44" }, "downloads": -1, "filename": "pygrowup-0.4.tar.gz", "has_sig": false, "md5_digest": "63e09151180684eee9efcb5e89f4a745", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 57930, "upload_time": "2011-02-10T00:11:52", "url": "https://files.pythonhosted.org/packages/93/e1/4cbf6df24bea522e6c5136b83e3b7ac8090f023b9b6f2f6b0be57f6e8c82/pygrowup-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "91124f9c5b42e227f552bec7823029e7", "sha256": "67e5f94a66f78f7322edd5420434bbe97124dde4f346f8d699b3e7760e30e77a" }, "downloads": -1, "filename": "pygrowup-0.5.tar.gz", "has_sig": false, "md5_digest": "91124f9c5b42e227f552bec7823029e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 370513, "upload_time": "2011-08-05T19:18:50", "url": "https://files.pythonhosted.org/packages/e3/44/e627ac571feed7a230abf40e70bad374444b0a5ee38940890b77e77a65a3/pygrowup-0.5.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "3ab7f8f9f7d2613458ef9f1b517bad5e", "sha256": "5bf817cadecd6c81a9dba18aa1d613881f48e3d66b9f1c3abcf1a2f00eff0dfa" }, "downloads": -1, "filename": "pygrowup-0.5.1.tar.gz", "has_sig": false, "md5_digest": "3ab7f8f9f7d2613458ef9f1b517bad5e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 370517, "upload_time": "2011-08-05T19:39:14", "url": "https://files.pythonhosted.org/packages/6c/56/92c05a461a9903dff618d4eeb449a67f9331440687dd5c858278e04cbe8e/pygrowup-0.5.1.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "bb3a776286f9488af095e6b1411810db", "sha256": "9605bcd1a05b9ccb960201edbf8463af12e8cbf60503909ecdb44c3346a12c64" }, "downloads": -1, "filename": "pygrowup-0.6.0.tar.gz", "has_sig": false, "md5_digest": "bb3a776286f9488af095e6b1411810db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 376835, "upload_time": "2012-01-24T17:43:40", "url": "https://files.pythonhosted.org/packages/a3/6e/f8dd77f402ef8376e54193883a7cb4f22adb9d49330e1baa8300b727e591/pygrowup-0.6.0.tar.gz" } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "f1df8d118a3ad0b1f5ea769493043e19", "sha256": "f995f769739c4537237f7108044ba01fc0cd9cd95c06734a1e5a08b6ba770543" }, "downloads": -1, "filename": "pygrowup-0.6.1.tar.gz", "has_sig": false, "md5_digest": "f1df8d118a3ad0b1f5ea769493043e19", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 382013, "upload_time": "2012-01-24T18:49:47", "url": "https://files.pythonhosted.org/packages/e9/73/d5584b188e1091147b6c1c6f573bcde7f2dca3c8958fdc67b919005e375c/pygrowup-0.6.1.tar.gz" } ], "0.7.5b0": [ { "comment_text": "", "digests": { "md5": "9a112891aa6ebe84a3d0e087fdefa78a", "sha256": "d73a8231cf03d178b6f8608c9e75bc4f27f55a2a1c4dc8953d0d5db394c9727f" }, "downloads": -1, "filename": "pygrowup-0.7.5b0.tar.gz", "has_sig": false, "md5_digest": "9a112891aa6ebe84a3d0e087fdefa78a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 426906, "upload_time": "2013-01-28T15:01:48", "url": "https://files.pythonhosted.org/packages/84/9c/63e51bd2e036abbdcc51c745a5bdfd291cabd7004a4c3adbec7309ac3a60/pygrowup-0.7.5b0.tar.gz" } ], "0.7.6b0": [ { "comment_text": "", "digests": { "md5": "42732287a6909cc4e5ffafc9f1ea0336", "sha256": "a215df4898c5413c660f3dc3dc2704dfa571954c23b48aab09508dc630211a83" }, "downloads": -1, "filename": "pygrowup-0.7.6b0.tar.gz", "has_sig": false, "md5_digest": "42732287a6909cc4e5ffafc9f1ea0336", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 426921, "upload_time": "2013-03-05T14:53:43", "url": "https://files.pythonhosted.org/packages/25/af/9184c666071158ef657c982bc68f106c360719661a5e99dab0a76334c260/pygrowup-0.7.6b0.tar.gz" } ], "0.7.7b0": [ { "comment_text": "", "digests": { "md5": "1925e594aa61fd80f03bcf77780a9c8a", "sha256": "5dc8ec84c6fa8fc24c9ff27829aefba623553960b5b70104d07cdcd6bcbaa77a" }, "downloads": -1, "filename": "pygrowup-0.7.7b0.tar.gz", "has_sig": false, "md5_digest": "1925e594aa61fd80f03bcf77780a9c8a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 427486, "upload_time": "2013-05-16T17:05:13", "url": "https://files.pythonhosted.org/packages/23/60/50a3ec53c52d58d16d0786cc0fb987e33b95e579db12e27ca931746156b6/pygrowup-0.7.7b0.tar.gz" } ], "0.7b0": [ { "comment_text": "", "digests": { "md5": "b49fceabb39ca8df03799e1ec9b139f0", "sha256": "687c72867d8f769304a997835ae255681f4107d2d927c903eab6d4d1a9ed296b" }, "downloads": -1, "filename": "pygrowup-0.7b0.tar.gz", "has_sig": false, "md5_digest": "b49fceabb39ca8df03799e1ec9b139f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 435127, "upload_time": "2013-01-16T20:01:38", "url": "https://files.pythonhosted.org/packages/0a/e7/6bd363bf76a6507f4a49442b14d2d5b0a211ee6cc4f3e4c4937bb71fdd23/pygrowup-0.7b0.tar.gz" } ], "0.8": [ { "comment_text": "", "digests": { "md5": "7ea5f99d2a5101b1d4b467bd1a65c81c", "sha256": "bc821a3dd4cda5b793501d2fe70fb0343943942c2abde47b7e5d3c777d7b7299" }, "downloads": -1, "filename": "pygrowup-0.8.tar.gz", "has_sig": false, "md5_digest": "7ea5f99d2a5101b1d4b467bd1a65c81c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 429492, "upload_time": "2015-06-26T10:56:58", "url": "https://files.pythonhosted.org/packages/a6/81/8e2e42b9576b33c91aeb70f6e4f64daa69b9162df76b2fb2d35f1eefcf13/pygrowup-0.8.tar.gz" } ], "0.8.1": [ { "comment_text": "", "digests": { "md5": "64c5e393934dddb76c2e49fae479fe8f", "sha256": "c90c8b4b4dcb69e65025f85342462c126dc83ce388f9e8406e19e10d4a194206" }, "downloads": -1, "filename": "pygrowup-0.8.1.tar.gz", "has_sig": false, "md5_digest": "64c5e393934dddb76c2e49fae479fe8f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 429669, "upload_time": "2015-06-26T11:08:23", "url": "https://files.pythonhosted.org/packages/6d/26/6725b11018c4ea86e11f4b26e7205ec63913aaec3aee3c819131cacc9c3a/pygrowup-0.8.1.tar.gz" } ], "0.8.2": [ { "comment_text": "", "digests": { "md5": "886390c26f7edb0c09a8791c2f2bc6a1", "sha256": "0fd5cd197ff7aed190fed8c18c612bc1300784878e34ac5121f528cd038c3fc7" }, "downloads": -1, "filename": "pygrowup-0.8.2.tar.gz", "has_sig": false, "md5_digest": "886390c26f7edb0c09a8791c2f2bc6a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 425633, "upload_time": "2016-03-14T12:00:49", "url": "https://files.pythonhosted.org/packages/93/95/f39ccf81d2fa50496d08400404dbfd884d9026c4b9dc41677bab005030b7/pygrowup-0.8.2.tar.gz" } ], "0.8b0": [ { "comment_text": "", "digests": { "md5": "7b2d4183c2067c907af34004efca832c", "sha256": "94e5b5ee0c459d22bba0d3674d1c65735543f705d98e9753854a2823c5851ddc" }, "downloads": -1, "filename": "pygrowup-0.8b0.tar.gz", "has_sig": false, "md5_digest": "7b2d4183c2067c907af34004efca832c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 429505, "upload_time": "2015-06-26T10:45:17", "url": "https://files.pythonhosted.org/packages/e9/71/47b2f965d5973e24f47bccf1ac94a637ec074154302c094c8415f0119543/pygrowup-0.8b0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "886390c26f7edb0c09a8791c2f2bc6a1", "sha256": "0fd5cd197ff7aed190fed8c18c612bc1300784878e34ac5121f528cd038c3fc7" }, "downloads": -1, "filename": "pygrowup-0.8.2.tar.gz", "has_sig": false, "md5_digest": "886390c26f7edb0c09a8791c2f2bc6a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 425633, "upload_time": "2016-03-14T12:00:49", "url": "https://files.pythonhosted.org/packages/93/95/f39ccf81d2fa50496d08400404dbfd884d9026c4b9dc41677bab005030b7/pygrowup-0.8.2.tar.gz" } ] }