1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Data Visualization with Julia

Connected

Exercise

BMI versus age

In this exercise, your task is to manipulate the age and body mass index (BMI) data to generate a plot illustrating the average BMI progression among policyholders as they age. You will compare two approaches: one using the StatsPlots plotting recipe for DataFrames and the other without it. Additionally, you will utilize chains to perform data manipulation and visualization.

The necessary packages, DataFrames, StatsPlots, Statistics and Chain, have already been imported for you, and the insurance DataFrame is readily available.

Instructions 1/3

undefined XP
  • 1
    • Create a scatter plot of the mean BMI (y-axis) versus age (x-axis), adding a regression line.
  • 2
    • Recreate the plot from before but using the DataFrame plotting recipe.
  • 3
    • Define a chain joining the calculation of BMI by age and the scatter plot from before.