GithubHelp home page GithubHelp logo

pyhealth's Introduction

pyhealth

Python package to calculate health indicators

  • Renan HILBERT
  • v0.0.1 (July 2023)

Installation

 pip install git+https://github.com/ed-rhilbert/pyhealth

Getting started

>>> from pyhealth.calculations.calculate import calculate_bmi

>>> heights = [1.75, 1.65, 1.80]
>>> weights = [80, 55, 95.2]

>>> bmis = calculate_bmi(heights, weights)
>>> print(bmis)

[26.122448979591837, 20.202020202020204, 29.382716049382715]

Contribution

git clone [email protected]:ed-rhilbert/pyhealth.git
cd pyhealth/
python3 -m venv venv
source venv/bin activate
pip install -r requirements.txt
pip install -e .

Tests

pytest

Test with code coverage

pytest --cov

Documentation

TO DO

pyhealth's People

Contributors

ed-rhilbert avatar

Watchers

 avatar

Forkers

chengfangho

pyhealth's Issues

Integration with Pandas

User story

As a end-user, I want to be able to be able to directly calculate indicators given a pandas dataframe, so that I only have to indicate column's names for height, weight etc.

Weight category given the BMI

User story

As a end-user, I want to be able to affect a weight categories to a a list of persons given their heights and weights

bmi-adult-fb-600x315

Negative values are not detected

What happened ?

I tried to calculate the body mass indices with an erroneous negative value for a weight. It gave me no warning and returned a negative value.

What was expected ?

In this case, the BMI shoud be None as when height is zero.

How to reproduce ?

>>> from pyhealth.indicators.health import bmi
>>> bmi(2, -100)
-25.0

Height conversion cm -> m

User story

As a end-user, I want to be able to easily convert a list of heights in cm into m so that I can calculate BMIs with the existing methods.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.