This project analyzes McDonald's menu items to uncover nutritional insights and build a predictive model to classify high-calorie items. The dataset includes detailed nutritional information for various food and beverage items.
- Dataset Description
- Project Objective
- Exploratory Data Analysis (EDA)
- Feature Engineering
- Machine Learning Model
- Visualizations
- Instructions for Replication
- Future Work
- Acknowledgments
The dataset, McDonalds_menu_data.csv, contains nutritional information for menu items across categories like Breakfast, Beef & Pork, Chicken & Fish, Salads, Desserts, Beverages, etc.
Category: The type of menu item (e.g., Breakfast, Desserts).Item: Name of the menu item.Calories: Total calories in the item.Total Fat,Sodium,Carbohydrates, etc.: Nutritional breakdown.
The primary goals of this project are:
- Conduct exploratory data analysis to identify trends and patterns in McDonald's menu items.
- Engineer new features to enhance data insights.
- Build a machine learning model to classify menu items as high-calorie or low-calorie based on nutritional data.
Key findings from EDA include:
- High-Calorie Categories: Items in the "Smoothies & Shakes" category have the highest average calorie count.
- Sodium Levels: Many items exceed recommended daily sodium intake levels.
- Correlation Insights: Calories are strongly correlated with Total Fat and Carbohydrates.
New features created include:
Calories_from_Fat_Percentage: Percentage of calories derived from fat.- One-hot encoding for the categorical variable
Category.
A Random Forest Classifier was used to predict whether an item is high-calorie (>500 calories).
- Accuracy: 85%
- Precision: 0.88
- Recall: 0.82
Key visualizations include:
- Distribution of Calories across categories.
- Correlation heatmap of numerical features.
To replicate this project locally:
- Clone this repository:git clone https://github.com/yourusername/McDonalds_Menu_Analysis.git
- Navigate to the project directory: cd McDonalds_Menu_Analysis
- Install required dependencies:pip install -r requirements.txt
- Run the Jupyter notebooks in the
/notebooksfolder for EDA and modeling.
Potential improvements include:
- Adding more advanced machine learning models like XGBoost or Neural Networks.
- Exploring additional datasets with customer preferences or sales data.
Dataset provided by McDonald's Nutrition Information (publicly available). Special thanks to contributors who inspired this analysis.

