2022-11-16

What is Body Mass Index

Body Mass Index (BMI) is an indicator of health and chronic disease risk that is calculated from the weight and height of a person. BMI is defined as weight (kilograms) divided by the square of the height (meters). It is expressed in units of kg/m2. If you are interested in more details on the science behind body mass index you can find it at the Wikipedia page https://en.wikipedia.org/wiki/Body_mass_index or at the U.S. Centers for Disease Control and Prevention https://www.cdc.gov/healthyweight/assessing/bmi/index.html.

Body mass index can be categorized as: underweight, normal weight, overweight, obesity, and morbid obesity.

Having obesity puts an individual at higher risk for chronic diseases such as diabetes, cardiovascular disease, asthma, and certain cancers.

Body Mass Index Calculator

The Body Mass Index (BMI) Calculator that I have created as a Shiny app can be accessed here: https://elizabethlundeen.shinyapps.io/Body_Mass_Index_Calculator/.

The code (server.R and ui.R code) I developed to design the Shiny app to calculate body mass index can be accessed here: https://github.com/elundeen1592/body_mass_index_calculator.

The application contains documentation explaining that when the user enters the following information, BMI will be calculated and displayed:
- Your Height (feet)
- Your Height (inches)
- Your Weight (pounds)

Calculation of Body Mass Index

This application was designed for users in the United States, meaning it asks users to enter their height and weight in imperial system units (feet, inches, and pounds). However, the units of BMI are kg/m2. Kilograms and meters are metric system units. The function in R contains a conversion factor (703) to account for height and weight expressed in the imperial system units rather than the metric system units. Below is R code which illustrates how BMI is being calculated in this application.

heightft = 5
heightinch = 4
weight = 197
bmi = (weight*703)/((heightft*12)+heightinch)^2
bmi
## [1] 33.81128

Weight Categories Derived from BMI

Once a user enters their height and weight, the application calculates and displays their BMI and tells the user what weight status category they fall in:

  • Underweight = <18.5
  • Normal weight = 18.5–24.9
  • Overweight = 25.0–29.9
  • Obesity = 30.0-34.9
  • Morbid obesity = BMI of 35.0 or greater