Cheesy

Author

Joe Galuppo

Which Cheese is the healthiest and which is the least healthy?

The purpose of this document is to rank cheese using fats, carbs, protein, and calories. Using these we will create weights and for each based on how important it is and assign each cheese a score. The cheese we are using comes from a html table on the website https://www.fatsecret.com/calories-nutrition/food/cheese. We will be using a scraping method that will allow us to take the data from the table on the web and recreate it on R for analysis. The list we are using has 28 different cheeses on it. These are all popular cheeses so it will be interesting to see which, according to our criteria, is the healthiest!

To start our analysis of cheese, we need to start with loading in the data.

── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.3     ✔ readr     2.1.4
✔ forcats   1.0.0     ✔ stringr   1.5.0
✔ ggplot2   3.4.3     ✔ tibble    3.2.1
✔ lubridate 1.9.2     ✔ tidyr     1.3.0
✔ purrr     1.0.2     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors

Attaching package: 'rvest'


The following object is masked from 'package:readr':

    guess_encoding

Next we are going to create our criteria for rating the healthiest cheese. To being we are going to assign fats, carbs, and proteins with values to add up and then rank them in order of these values. We want to assign proteins with the highest score because protein is the most important for our health. Next we want carbs to be assigned the second highest score because is the second most important for our health. Then we want fats be the second least scored because they are the not beneficial for our health. Finally, we want to eat the least amount of calories when we eat cheese because cheese is not the highest quality food to eat

   Popular.Types.of.Cheese............1.slice.or.1.oz.serving. Fat.g. Carbs.g.
1                                                 Goats Cheese  10.09     0.62
2                                               Gjetost Cheese   8.37    12.09
3                                                Asiago Cheese   7.32     0.91
4                                              Parmesan Cheese   7.32     0.91
5                                                Romano Cheese   7.64     1.03
6                                               Gruyere Cheese   9.06     0.10
7                                               Cheddar Cheese   9.28     0.36
8                                                 Swiss Cheese   7.78     1.51
9                                               Fontina Cheese   8.72     0.43
10                                                Colby Cheese   8.99     0.72
11                                        Mexican Blend Cheese   8.50     0.54
12                                              Havarti Cheese   8.41     0.79
13                                             Monterey Cheese   8.48     0.19
14                                                Gouda Cheese   7.78     0.63
15                                                 Edam Cheese   7.88     0.41
16                                             Muenster Cheese   8.41     0.31
17                                            Provolone Cheese   7.45     0.60
18                                                 Blue Cheese   8.15     0.66
19                                             American Cheese   7.39     1.97
20                                                Pizza Cheese   5.68     1.09
21                                                 Brie Cheese   7.85     0.13
22                                           Mozzarella Cheese   6.34     0.62
23                                            Camembert Cheese   6.88     0.13
24                               Mozzarella Cheese (Part Skim)   4.51     0.79
25                                                 Feta Cheese   6.03     1.16
26                                     Low Fat American Cheese   1.98     0.99
27                                           Neufchatel Cheese   6.64     0.83
28                                              Ricotta Cheese   3.68     0.86
   Prot.g. Calories  Score
1     8.65      128 54.965
2     2.74      132 54.755
3    10.14      111 52.600
4    10.14      111 52.600
5     9.02      110 50.390
6     8.35      116 50.330
7     6.97      113 47.190
8     7.54      106 46.980
9     7.17      109 46.380
10    6.65      110 46.015
11    6.70      105 44.440
12    6.59      105 44.425
13    6.85      104 44.130
14    7.07      101 43.910
15    7.08      101 43.760
16    6.55      103 43.365
17    7.16       98 43.145
18    6.07      100 41.875
19    5.37       96 40.405
20    7.36       86 40.150
21    5.88       95 39.565
22    6.29       85 37.620
23    5.61       85 36.040
24    6.88       72 34.805
25    4.03       75 30.985
26    6.97       51 28.670
27    2.82       74 28.290
28    3.19       49 21.330

We can see based on this table and graph that the best cheese to eat in terms of our health criteria is…. Goat cheese! It contains high proteins with moderate fats and calories per serving. This would definitely be a good cheese to eat if you are looking for energy to go.

Ricotta Cheese has the lowest score with low protein, fats, carbs, and calories. If you are looking to indulge in something that will give you long lasting energy without having to eat a ton of it, you should choose something other than Ricotta!

This graph shows us how the popular cheeses look based on our criteria. There are no outliers in this data which is to be expected but there definitely is a difference from between healthy cheese and less healthy cheese. Make sure to come back to this if you find yourself indulging in one of these popular cheeses.