__STYLES__
The primary purpose of this Python program was to calculate the user’s BMI and waist-to-hip ratio values and provide assessments of associated health risk categories.
Special mention: Quotes used in this section are referenced in the website sources and inspiration section of this data project.
Before examining this data project, some background information on BMI and waist to hip ratio will be briefly discussed to provide context.
Maintaining an individual's weight is a constant lifelong journey. As such, according to the cdc.gov website, "BMI can be a screening tool, but it does not diagnose the body fatness or health of an individual." As also mentioned on the cdc.gov website, "BMI does not measure body fat directly, but BMI is moderately correlated with more direct measures of body fat." From the cdc.gov website, the following sentences are mentioned, "to determine if BMI is a health risk, a healthcare provider performs further assessments. Such assessments include skinfold thickness measurements, evaluations of diet, physical activity, and family history."
Now that the BMI was briefly discussed, the waist to hip ratio will be explored next. The following sentences are from healthline.com, "the waist-to-hip ratio (WHR) calculation is one way your doctor can see if excess weight is putting your health at risk. It determines how much fat is stored on your waist, hips, and buttocks." Additionally, the healthline.com website mentions that "unlike your body mass index (BMI), which calculates the ratio of your weight to your height, WHR measures the ratio of your waist circumference to your hip circumference." To follow closely on this line of thought, healthline.com also states that "this is important because not all excess weight is the same when it comes to your health risks." Lastly, healthline.com has "one interesting point to mention, one 2021 study showed that people who carry more of their weight around their midsection (an apple-shaped body) may be at a higher risk of heart disease, type 2 diabetes, and premature death than people who carry more of their weight in their hips and thighs (a pear-shaped body)."
Special mention: The following quotes are from the webmd.com hyperlink found below:
Waist to Hip Ratio: Why it Matters, How to Measure It, and More (webmd.com)
From the WebMD hyperlink found above, I came across the following health information, ”a ratio higher than 1.0 for either sex means a much higher chance of health problems.”
Males and females have varying waist to hip ratio associated values. More specifically, when it comes to men’s waist to hip ratio, as stated on webmd.com, “WHO defines abdominal obesity in men as a waist-to-hip ratio of at least 0.90.” In comparison, according to WebMD.com, for women, “it’s a ratio of 0.85 or more.”
This waist to hip ratio probability of adversely affecting both males and females was a concerning one to me.
As a solution, I came to realize that an individual can promote health awareness for the quality of life in others such as family and friends. By engaging in positive health-promoting behavior and sharing data-informed results with loved ones, an individual can still maintain a level of data privacy while providing valuable insights into health risk assessment categories that could potentially affect those close to the them.
Special mention: I do acknowledge and respect that levels of data sharing vary on an individual basis.
To gain a better understanding of BMI and waist to hip ratio, three websites were used to explore the differences between the two measurements and their significance in assessing overall health.
The three websites that were referenced for this data project are:
The following web page provided information on BMI:
The following four web pages provided information on the waist to hip ratio:
Inspiration for this Python project:
As a source of inspiration, I found a Youtube video developed by Alex Freberg where he walked through his Python guided project that dealt with creating a BMI calculator.
By utilizing the Anaconda platform, the Jupyter notebook application was selected to compose Python code.
The Anaconda platform can be viewed via this hyperlink:
Special mention: Anaconda states the following on their documentation webpage, "Anaconda® Distribution is a Python/R data science distribution that contains conda, a package and environment manager, which helps users manage a collection of over 7,500+ open source-source packages available to them."
The following 8 steps outline the Python program structure.
1.) Greeting the user at the very start of the text-based Python program.
print("Hello. Thank you for your willingness to share your BMI, 'Body mass index', information.")
2.) Provided the user with an overview on what to expect from three upcoming information input prompts.
3.) Variable, BMI, was created to reflect that of the cdc.gov based formula for BMI calculation.
BMI = user_weight / total_height_inches**2 * 703
BMI = round(BMI, 1)
Ex.) BMI = 23.7
4.) Calculated BMI value was recorded and placed into a BMI weight status category.
Print("Hello " + name + ", your BMI results have been calculated. Your BMI of " + str(BMI) + ", indicates that you're at a healthy weight.")
5.) After calculating the BMI value, the user has the option to calculate their Waist to Hip ratio
print(name + ", before you go, there is another calculation that you can participate in if you like.")
print("This other calculation is known as a Waist to Hip ratio.")
print("Studies have shown that it is more accurate than a BMI calculation.")
print("A little advice, " + name + ", you have 6 attempts to enter a valid choice such as 'yes' or 'no'.")
print("If you do not provide a valid choice within 6 attempts, your Waist to Hip ratio calculation will not occur.")
ask_user = input("Are you interested in calculating your Waist to Hip ratio today? Please type yes or no: ")
6.) User selected yes as a valid option to calculate waist to hip ratio.
Special mention:
In Step 7, waist to hip ratio information is referenced from this WebMD web page.
https://www.webmd.com/fitness-exercise/what-is-waist-to-hip-ratio
7.) User is presented with various basic knowledge topics that focus on waist to hip ratio:
Examples of basic knowledge topics include:
Establishing the "three simple steps" method:
In summary, the Python lines of code below inform the user that the waist to hip ratio will be calculated by using the "three simple steps" method. Afterwards, two information input prompts will be presented to the user before any more basic knowledge topics are revealed.
print(name + ", before the waist to hip ratios for men and women are revealed to you, let's first calculate yours.")
print() # displays empty line for easier user readability
print("Follow the three simple steps for measuring your waist to hip ratio.")
print() # displays empty line for easier user readability
print("After you have completed the three simple steps, please follow the two information prompts displayed for you.")
print("The first information prompt will ask you to provide your recorded waist size.")
print("The second information prompt will ask you to provide your recorded hip size.")
8.) Calculated waist to hip value was placed into a waist to hip health risk category range.
Example of a calculated waist to hip ratio with a health risk category for a male:
Hello John, your waist to hip ratio results have been calculated based on male gender data.
Your waist to hip ratio of 0.88, indicates that you're at a low risk.
Example of a calculated waist to hip ratio with a health risk category for a female:
Hello Emma, your waist to hip ratio results have been calculated based on female gender data.
Your waist to hip ratio of 0.78, indicates that you're at a low risk.
Below is a Github hyperlink that contains the Python source code that was used in this project.
Github.com - Python source code for BMI index and Waist to Hip ratio data project
Please feel free to reach out to me on LinkedIn if you have any comments or questions.
Lastly, thank you very much for viewing this Python data project.