bmigraph.project_calories

Module Contents

Functions

project_calories(weight, height, sex, age, pal, ...[, ...])

Returns caloric intake per day based in a target weight. Assumption is

bmigraph.project_calories.project_calories(weight, height, sex, age, pal, target_weight, number_of_days, return_graph=False)[source]

Returns caloric intake per day based in a target weight. Assumption is that the goal is losing weight rather than gaining weight.

Parameters:
  • weight (float) – Current weight in kilograms (kg).

  • height (float) – Current height in meters (m).

  • sex (int) – Sex, used in the Harris–Benedict equation estimation, 1 for male and 2 for female.

  • age (int) – Current age in years.

  • pal (float) – Physcial activity level, can only be one of the four listed values 1.2 for “Little/no exercise” 1.4 for “Light exercise 1-3 times a week” 1.6 for “Moderate exercise 3-5 times a week” 1.75 for “Hard exercise 3-5 times a week”

  • target_weight (int) – Weight goal to be achieved in number_of_days.

  • number_of_days (int) – Number of days allotted to achieve target_weight.

  • return_graph (bool) – Whether to return a graph instead of a float.

Returns:

If return_graph is False, returns a float specifying caloric intake divided by the number of days. If return_graph is True, returns a straight line graph of projected weight loss per day.

Return type:

float or plotly.graph_objects.Figure

Examples

>>> project_calories(100, 1.85, 1, 25, 1.6, 75, 25, return_graph=False)
>>> 2417.0400000000004