- Author: Hankun Xiao, Yasmin Hassan, Jiaxin Zhang, Zhiwei Zhang
This project aims to build a menu recommendation pipeline for Heymate's restaurant partners. By analyzing internal product, store, and category data along with external datasets we seek to provide insights into menu item popularity, pricing, and restaurant-specific recommendations. Our recommendations help partners optimize their offerings through data driven insights.
We conduct comprehensive data validation, enrichment, and exploratory analysis on restaurant menu data. Key steps include:
- Cleaning inconsistent menu item names using LLMs
- Merging external datasets (e.g. Kaggle)
- Scoring menu item popularity
- Building a pipeline to deliver actionable insights to restaurant clients
To get started, clone the repository to your local machine link to the repository:Heymate Repo You can use the following command in your terminal:
git clone git@github.com:UBC-MDS/heymate-report.git
cd heymate-report
Important: Due to NDA agreements with Heymate, we cannot share the actual API keys publicly. However, the credentials have been privately shared with the course instructor. Follow these steps to set up your credentials:
-
Rename the credentials_template folder to credentials:
mv credentials_template credentials
-
Navigate to the credentials folder:
cd credentials
-
Rename the environment(.env.example) template to .env:
mv .env.example .env
-
Edit the credential files:
- Open
.env
file and replace the placeholder values with actual database credentials - Open
open_ai_token.txt
and replace the placeholder with your actual OpenAI API token
Example of what to fill in
.env
:SQL_SERVER=your_sql_server_here SQL_USER=your_sql_user_here SQL_PASSWORD=your_sql_password_here SQL_DATABASE=your_sql_database_here
- Open
-
Go back to the main directory:
cd ..
To install the conda environment:
conda env create -f environment.yml
To activate the conda environment:
conda activate heymate-mds-data-clean-pipeline
If you want to load and clean additional data, you can activate the local server and make HTTP requests to invoke the tasks.
cd script
python flask_deploy.py
you can find more details in knowledge_base_update notebook.
Follow these steps to test the recommender module locally.
cd script
conda activate heymate-mds-data-clean-pipeline
python menu_recommender.py
Follow these steps to generate and view interactive bar charts showing menu recommendations:
cd script
conda activate heymate-mds-data-clean-pipeline
open visualization_demo.ipynb
- Run all cells in the notebook to generate the popularity-based recommendations
- The output will display as an interactive bar chart showing the top recommended menu items for selected restaurant types
To visualize recommendations for different cuisines:
- Locate the second cell in the notebook
- Modify the function parameters to select up to three restaurant types:
recommender_menu_items(type1="Italian", type2="Mexican", type3="Chinese")
- Re-run the cell to generate updated recommendations
Some of the available Restaurant Types:
Parameter | Available Options |
---|---|
type1, type2, type3 | "Italian", "Mexican", "Chinese", "Japanese", "American", "Indian", "Mediterranean", "French", "Korean", "Vietnamese", "Greek", "Lebanese", "Spanish" |
Example combinations:
# Compare Asian cuisines
recommender_menu_items(type1="Chinese", type2="Japanese", type3="Thai")
# Compare Mediterranean options
recommender_menu_items(type1="Italian", type2="Greek", type3="Mediterranean")
# Mix different cuisine types
recommender_menu_items(type1="Mexican", type2="Korean", type3="French")
- Interactive bar charts comparing menu item popularity across selected restaurant types
- Restaurant-specific recommendations with popularity scores
- Visual comparison of menu performance metrics
Note: Ensure you're in the correct conda environment (
heymate-mds-data-clean-pipeline
) before running the notebook. For detailed instructions and examples, refer to the visualization_demo notebook.
To generate the final report in PDF format using Quarto, follow these steps:
Remember to cd out of the script
directory if you are still in it.
cd ..
cd final_report
quarto render final-report.qmd --to pdf
You can find the generated PDF file in the final_report/
directory.
To open the pdf report, double-click final-report.pdf in your file system or run:
open final-report.pdf
Similarly, you can reproduce the technical report using
cd technical_report
quarto render technical_report.qmd --to pdf
Ensure you have Quarto installed on your system if you haven't already. You can install it by following the instructions on the Quarto website: Link If you use conda, you can use this command:
conda install -c conda-forge -c quarto
This project was developed as part of the UBC Master of Data Science (MDS) Capstone and is intended for academic purposes only. Some components, including API credentials and internal datasets from Heymate!, are subject to Non-Disclosure Agreements (NDAs) and are not open-sourced. Please do not reuse or redistribute any part of this project without written permission from the authors and Heymate!.
We would like to thank our project partner, Heymate!, for providing the data and support necessary to complete this project. We also appreciate the guidance and feedback from our course instructors and peers throughout the project.
For any questions or inquiries about this project, please contact the authors: