Recreation

Gym Data Tracker and Predictor

This one is for you, Andrew

3/4/24 update: disabled project as it was starting to cost very small amounts of money and my interest in it has waned.

The idea for this was inspired by a friend, who created an awesome application for tracking gym occupancy at RIT's gym. Naturally, I have decided to replicate this effort and one-up him as any friend should. My version scrapes for current gym data and stores this data as a historical record, and also predicts future occupancy based on historical data and current trends. This application began collecting data October 23rd, 2022, at 4:15 pm. It collects data every 30 minutes, and UI updates occur every 10 minutes (this may cause a brief slowdown of the page as the scheduler tells Heroku to restart the dyno).

To create this application, I first used an old friend, BeautifulSoup, to build the scraper to find the relevant information on RIT's website. Next, I used Google Cloud Run to automate the repeated scraping necessary to build and maintain a database. To store the scraping results, I created a Google Firebase NoSQL database that stores counts and datetimes. To display the results, I created a Flask app using Plotly Dash. This app is hosted with Heroku and periodically queries the database for current and historical gym occupancy data. Both the scraper and the renderer are automatically updated with continuous integration.

For prediction, I decided to try Facebook AI's Prophet, as I am always excited to try new technologies and solutions. Time series data is famously challenging to predict accurately (especially with a very small amount of data), and, based on my initial tests, it seems that Prophet is quite effective at this task. With only two weeks of collected data, Prophet was able to effectively capture the weekly and daily trends. As more data is collected, it will be interesting to see how Prophet handles longer-term trends.