Inspiration 🥪

Our inspiration mainly came from our newly acquired passion for weightlifting. As we became better lifters, we realized how hard it was to find cost-effective items which provided a "bang for your buck". As college students, we did not have the time, nor the money to experiment with the overwhelming food options.

What it does 🥪

LunchMoney takes your budget and a category of interest with three nutrients you want to maximize and three nutrients that you want to minimize in a search. It then goes through Target's engine and assigns products within the price range with a nutrition score. It then goes through this list of items and returns the item with the highest calculated nutrition score.

How we built it 🥪

The application driver is built on the Flask framework, which allows the python backend to absorb user input and compute the result that we are interested in. A scraper class is used to generate a list containing data entries for all the search results that were parsed off the site for a given user query (using Selenium and BS4). These individual items are then fed into a mathematical model to optimize the items with respect to the available nutrition info. The item determined to be "optimal" is displayed on the webpage.

Challenges we ran into 🥪

Issues with the web-scraper not digging deep enough into the html code to parse the information that we were interested in. We circumvented this by using Selenium to invoke the html code that was hidden by javascript embeds within the webpage. Several basic debugging issues were encountered with handling regex, version compatibility for the web driver, setting up flask application, integrating the mathematical model with the data model (the output of the scraper) because the python IDE could not properly distinguish variable scopes, developing an accurate math algorithm (still a work-in-progress). There were also enormous run-time constraints we had to settle for because of the Selenium library that we did not find a work-around for that we are incredibly willing to address later on (even for just loading a single browser page for one search).

Accomplishments that we're proud of 🥪

One of the things we are most proud of is how professional the application looked. We were able to implement a modern design with a complex idea on the backend. On top of this, we were proud of the scraping aspect of the program, this took the most time to implement as we had to find workarounds to find data on the main search page and did this in less than a day. We also are proud that we were able to finish the program as we had to find workarounds at almost every step of the development process. As this was also Usman and Kevin's first hackathon and we felt we accomplished a lot for our first go!

What we learned 🥪

Our learning had taken many forms during our development. One of the first few areas of learning came with discovering new libraries and solidifying our current knowledge. Another aspect of learning came with patience since we had experienced a lot of roadblocks. We had to learn to stay calm and keep trying to solve our problems or find the best possible solution due to time constraints. When it came to teamwork, we had learned that coding is always better with multiple people as different people can provide different ideas or outlooks that we have never thought of before.

What's next for LunchMoney 🥪

Because of the time constraint, the scope of our program was rather limited in virtue of getting a functional program. For instance, we may work to include data that is broader (target was a good placeholder because it contained huge scores of data that we could immediately grab and establish the premise of our application with). Our initial idea was to create a meal plan based on many item preferences (not just one) and create a combination that would fit within the budget and maximize food and nutrition volume. Many simplifications made in the code for time's sake could be made much more robust, making the final product scalable and usable. Perhaps most importantly, finding an adequate math model with big data and machine learning or a more well-structured (researched) algorithm would be far more suitable for this application.

Share this project: