Eating Healthier at McDonald’s

Pranav Vijay
INST414: Data Science Techniques
5 min readMar 20, 2024

Question: How can I choose healthier meals if my only options for restaurants are fast food restaurants and for the most part, McDonald’s?

McDonald’s has the most number of locations worldwide for a fast food restaurant, and the average price for foods is less than $5. McDonald’s is accessible and affordable for many people. Approximately 50 million people in the United States eat from fast food restaurants every day(Maddie, 2023). Also, McDonald’s market share in the fast food industry is around 43.8%(McCain, 2023).

The main stakeholder is a McDonald’s consumer who lives in a lower-to-middle income household and is health-conscious. There is more awareness of the importance of eating healthy. If we give more information about the food the customer is consuming, it will help them lead a healthier lifestyle, and they will not need to spend much on healthcare expenses in the future. As the saying goes, prevention is better than cure.

From this analysis, the stakeholder will be able to pick healthy meals based on calories for their improved health.

The data that can help answer this question is a dataset of all the food items in McDonald’s menu. The most important data fields would contain details about calories and relevant nutritional information. The dataset would contain the price of each food item in the menu so that I can better understand the relationship between price and the number of calories. The dataset would also contain information about what food items are ordered the most. This data is relevant to my question since it will have nutritional information about each food item and can help the consumer choose a particular food from McDonald’s menu depending on what additional nutrients they would like to add like Vitamin A or remove/reduce from their food intake, like Sodium.

I collected a subset of this data from the Kaggle website, which contains many datasets available for downloading. The dataset was called “Nutrition Facts for McDonald’s Menu,” which is by McDonald’s and Abigail Larion. This dataset did not contain info about the price of each item and about which items are ordered the most. I created a Jupyter notebook to create a program to analyze the CSV file. I used a Python kernel for my program. I downloaded the CSV file of the dataset and read it in Python through a Pandas dataframe using the read_csv() function.

I decided to focus my analysis on the number of calories of McDonald’s food items. I wanted to create a bar chart of the top 10 items in McDonald’s with the most calories. For people who care about the number of calories they consume from food, this would help them identify foods to order less of in order to control their calorie intake. I also wanted to create a bar chart of the top 10 items in McDonald’s with the least calories. For the same group of people, this would help them identify foods that they should order more of so that they keep their calorie intake low. I used the pyplot module from the matplotlib library to create the bar graphs. I used the sort_values() function to sort the top 10 McDonald’s food items with the most calories and the top 10 McDonald’s food items with the least calories. The top 10 items with the most calories were the 40 piece Chicken McNuggets, the Big Breakfast with Hotcakes(Large Biscuit), the Big Breakfast with Hotcakes(Regular Biscuit), the Big Breakfast with Hotcakes and Egg Whites (Large Biscuit) , the Big Breakfast with Hotcakes and Egg Whites (Regular Biscuit), the 20 piece Chicken McNuggets, the Big Breakfast (Large Biscuit), the Bacon Clubhouse Crispy Chicken Sandwich, the Double Quarter Pounder with Cheese, and the Big Breakfast (Regular Biscuit). The top 10 items with the least calories were the Premium Southwest Salad (without Chicken), the Premium Bacon Ranch Salad (without Chicken), Hash Browns, the 4 piece Chicken McNuggets, the Premium Bacon Ranch Salad with Grilled Chicken, the Hamburger, the Egg White Delight, the Fruit & Maple Oatmeal without Brown Sugar, the 6 piece Chicken McNuggets, and the Premium Southwest Salad with Grilled Chicken. The top 10 items with the most calories all had over 700 calories. The top 10 items with the least calories all had under 300 calories.

Here is a figure of the top 10 food items in McDonald’s with the highest calories:

Here is another figure of the top 10 food items in McDonald’s with the lowest calories:

I cleaned up my data by making sure that no values were missing from the data. After reviewing the dataset, no values were missing. When doing the analysis, I decided that I did not want to include foods that are in the categories of “Coffee & Tea,” “Smoothies & Shakes,” “Beverages,” “Snacks & Sides,” and “Desserts” since these are only side orders, they are not ordered frequently, they have less calories, and they are the top 10 items with the least calories. I wanted this graph to have meal items so that the focus is on comparison of the top 10 items with the most calories. In my dataframe, I removed rows that had the above values in the “Category” column. I also am strictly focussing on calorie count for this analysis. In the future, I can use the information from nutritional information and serving size to do more detailed analysis. For now, since I am only focusing on calorie counts, I also removed any columns that weren’t needed in my current data analysis. In my dataframe, I removed the “Serving Size,” “Calories from Fat,” “Total Fat,” “Total Fat (% Daily Value),” “Saturated Fat,” “Saturated Fat (% Daily Value),” “Trans Fat,” “Cholesterol,” “Cholesterol (% Daily Value),” “Sodium,” “Sodium (% Daily Value),” “Carbohydrates,” “Carbohydrates (% Daily Value),” “Dietary Fiber,” “Dietary Fiber (% Daily Value),” “Sugars,” “Protein,” “Vitamin A (% Daily Value),” “Vitamin C (% Daily Value),” “Calcium (% Daily Value),” and “Iron (% Daily Value).” I only wanted to focus on the calories of food for this analysis.

There are some limitations to my analysis. I did not factor my analysis between breakfast and lunch items. As a result, there are a lot of breakfast items in the highest calories graph, but not in the lower calories graph. One thing missing was considering the serving size. The number of calories may differ depending on the amount of the serving size. I believe that consumers care more about quantity since they want more food for less money, so the serving size was not a data point that I focused on for my analysis. This analysis may be biased since I’m making an assumption that people on lower income are more focused on quantity and not the healthiness of the food they are eating.

Here is a link to my GitHub repository that contains the Jupyter notebook that I used to create the two graphs. The GitHub repository also contains the original CSV file of the nutrition facts for the McDonald’s food items.

Link: https://github.com/pvijay2024/module1

Sources:

Maddie. (2023, March 29). The Truth Behind Fast Food. Chefs for Seniors. https://chefsforseniors.com/blog/truth-behind-fast-food/

McCain, A. (2023, April 19). The 10 Largest Fast Food Chains in the United States. Zippia. https://www.zippia.com/advice/largest-fast-food-chains/

--

--