bmigraph.project_bmi¶
Module Contents¶
Functions¶
|
Compute average BMI change per week based on current weight, height, age |
- bmigraph.project_bmi.project_bmi(weight, height, target_bmi, number_of_days, return_graph=False)[source]¶
Compute average BMI change per week based on current weight, height, age and target BMI.
The average BMI increase or decrease each day is computed. If return_graph is True, a plotly.graph_objects.Figure is given based on forcasted BMI for the target timeframe.
- Parameters:
weight (float) – Weight, in kilograms.
height (float) – Height, in meters.
target_bmi (float) – Target BMI.
number_of_days (int) – Number of days to reach the target BMI
return_graph (bool) – Whether to return a graph instead of a dictionary
- Returns:
If return_graph is True, we get the average BMI change per week. If return_graph is False, we get a dictionary with key to be different exercises, and the value to be number of minutes (rounded to nearest integer) needed for that activity. Note that each of the activities are associated as an “or”. If return_graph is True, we get a plotly.graph_objects.Figure instead that can be saved or shared.
- Return type:
float or plotly.graph_objects.Figure
Example
>>> project_bmi(weight=108, height=1.88, target_bmi = 28, number_of_days=60) >>> -0.3