My First Hackathon Experience

4 minute read

Participating in My First Hackathon

I recently participated in General Assembly’s Small Business Hack-a-Thon that brought together over 120 GA graduates with different skills in software engineering, data science, and UX design. All groups were tasked with creating an e-commerce product or feature to help small businesses recover from the pandemic. My group consisted of 3 UX designers, 2 software engineers, and 1 other data scientist. Here is a list of my amazing teammates: Jamie Magruder, Jen Boyles, Michaela Griswold, Patrick O’Hern, Scott Solmonson, and Suzanne Mcdonnell. Our initial plan was to build a system that would make payments at restaurants much quicker by allowing customers to pay on their phone rather than waiting for a check from the waiter. After some research, we found that solid systems for this already exist, so intead we decided to build a sales forecasting model that is integrated into Toast’s POS system over the 3 days of the hackathon.

With a project idea set, we started figuring out what each team and each team member could contribute so we could have a working product at the end. I definitely learned the most during this part of the hackathon as I got exposed to the different tools that UX designers and software engineers use, as well as the different processes and challenges each group goes through. I will go into further detail on the process the data science team took below.

Data Science Process

Luckily, we were able to get historical sales data from a restaurant that Suzanne previously worked at and start building a model based on it. To incorporate local events into our model, we sarched for event dates on Google and generated a list of them. After we collected all our data, we loaded the datasets into a Jupyter notebook using Pandas. The sales dataset had some questionable values that had to be solved, as well as missing dates for when the restaurant had to close due to COVID-19. After cleaning the data to account for these issues in the dataset, we combined the sales dataset with the event data that we created. With this data, we were able to create a visual that clearly displayed that events play a big part in a restaurant’s sales as you can see below.


Knowing this, we decided to build 2 time series models to forcast sales with events as our predictor variables. The 2 models we decided to try were ARIMA and Recurrent Neural Networks. We started off with ARIMA as it’s a simple model that is understandable and is used widely for time series forecasting. However, while we were trying this model, we ran into a lot of errors where the code would crash and fitting the model took hours. As it was unlikely we were going to solve this issue given the time constraint of the hackthon, we moved on to testing a Recurrent Neural Network model. The neural network we used was LSTM as it has been shown to be very performant and generally has a lower error than ARIMA models. As we used Tensorflow to fit this model, we were also able to take advantage of GPU optimizations that our ARIMA package did not have. We also decided to keep the network simple with only 2 hidden layers to reduce fitting times. This decision was a good one as the models only took around 5-10 minutes to fit and our mean squared error was only $800, where most of the error was due to an outlier event known as Tales of the Cocktail which can be seen below.


One of the biggest challenges of using LSTM though is there is no built in forecasting tool to make predictions beyond the historical sales data, so we had to create code that would generate predictions beyond the data in order to pass on to the software engineering team. While I had experience doing this with a single feature LSTM model and there are many guides on how to generate predictions for single feature models, I could find no guides on how to do this for multivariate models. This was the most time consuming part of the hackathon where are tried many different matrix manipulations to make this work. Luckily, I was able to figure it out and generate predictions for the future that can be seen here.


After this was all finished, we passed the data onto the software engineering team where they would be able to turn this data into a web app that restaurant managers would be able to use in their POS system!

Hackthon Results

After all the hard work put in by our team, we presented our product to a panel of 3 judges along with the other teams participating in the hackathon. And to our team’s surprise, we came out as winners of General Assembly’s Small Business Hackthon - Restaurants and Retail Sector!

Overall Experience

Aside from actually winning the hackathon this was actually an amazing experience where I learned so much. Again, my teammates were absolutely amazing as well as our mentors: John Hazard, Matthew Johnson, and Scott Kutler. Our mentors were very helpful in guiding us in the right direction and giving us insights we otherwise wouldn’t have come to alone. While things did get stressful when things did not work and we definitely had moments when we weren’t sure if everything was going to come together, I definitely came out of the hackathon being able to solve problems much more efficiently. I definitely plan on participating in more hackathons when I have the time as they are a great way to meet awesome people and potentially learn new skills you wouldn’t have even considered learning alone.