Inspiration
The transition to university can be stressful. From midterms to budgeting, students experience a variety of newfound challenges in their day to day life. As a result, students often neglect their healthy eating habits due to lack of guidance and support. We all know a healthy body is a healthy mind, so who can replace the mom in our lives to ensure we eat healthy?
What it does
MunchMate is a Discord bot that provides users personalized food recommendations for a specified dining hall. It gives these recommendations based on a scale of 1 to 10 provided by the user, where 5 represents maintaining their weight, 10 being gaining the most weight, and 0 representing losing the most weight.
How we built it
The code is written in Python on Replit, which reads a local Excel file containing nutrition information from the Chestnut dining hall breakfast menu. From here, a score is calculated for each item illustrating the weight gain/loss from its consumption. The Discord bot asks the user for a number from 0-10, and the bot uses a function to pick the menu items with scores of food items, that when consumed, will have the desired weight change. This is done by remapping the calculated scores to a scale of 0-10, and the bot recommends menu items that fall within a margin of error of the chosen input score.
Challenges we ran into
One of the main challenges we ran into was trying to web scrape the food and services website at the University of Toronto. Due to the complex front-end coding structure of the website which was dynamic, we were unable to effectively use BeautifulSoup and Selenium to access the data about the meals on campus. As a result, we had to transfer all the data into a Excel file in the repository and accessed that file using Pandas. We aim to build a web scraping design in the future that will help us enable web scrape all the data from the website into a excel file.
Accomplishments that we're proud of
As this is our first hackathon, we are proud of being able to create an end to end product from scratch with minimal development experience. In addition, although many of the functions were coded individually within the group, the integration was less difficult that we initially thought.
What we learned
- Coding and implementing a Discord bot into a server
- Creating, accessing, and manipulating dataframes using Pandas library
- The applications and challenges of web scraping using BeautifulSoup and Selenium
What's next for MunchMate
As we move forward, we aim to include more filters based on dietary restrictions such as vegan, gluten-free and other allergies to improve the user experience and make the bot more applicable in real life. We also aim to build a web scraping design that will web scrape the data from the food and services website into a excel file which can then be accessed by our code to make the bot more self-reliant.
Log in or sign up for Devpost to join the conversation.