UConn Rec Center Occupancy Analysis by David Matos & Emmet Spaeth
This project analyzes occupancy data collected from the UConn Rec Center over the Fall Semester (October - December 2025), correcting for time zone differences and daylight saving time (DST). The goal of this project is to better understand usage patterns of the Rec Center.
- Hosted python script on a cloud server to periodically (every 15 minutes) grab the occupancy value from the UConn Rec website (https://app.safespace.io/api/display/live-occupancy/86fb9e11)
- Used Selenium to grab occupancy value and applied a timestap by using time library
- Wrote collected data to a CSV file
- Read CSV data using pandas
- Remove error rows where data was missing or invalid
- Convert separate date and time columns into a single datetime object
The collected data timestamps are 3 hours and 45 minutes ahead of Eastern Time.
- Subtract 3:45 from raw timestamps
- Localize to
America/New_Yorktimezone using pytz - Handle DST transition (November 2, 2025)
- Extract weekday names and hours
- Create
within_hourshelper function to identify timestamps within operational hours:- Weekdays (Mon-Fri): 6 AM - 10 PM
- Weekends (Sat-Sun): 10 AM - 5 PM
- Create
day_typefield (Weekday/Weekend) for comparative analysis
- Convert weekday column to Categorical type to preserve natural order (Mon → Sun)
- Group by weekday and hour to compute average occupancy
- Use matplotlib to create different graph types (view in graphs directory)
- Format axes and gridlines for readability
- Maintain consistent ordering for clear interpretation
- Added console statistics (Total Data Points, Mean Occupancy, etc.)
Based on the analysis, typical patterns observed include:
- As the week goes on, less people are at the UConn Rec Center on Average, with the most people at the Rec Center on Wednesday
- On average, the highest rates where people enter the Rec Center are from 6-8 AM, 10AM-12PM, and 3-5 PM, with this pattern mosty applying on the Weekdays and somewhat on the Weekends
- On average, the lowest rates where people enter the Rec Center are from 8-10 AM, 1-3 PM, and anytime after 6PM (for the Weekdays), indicating that these are the less crowded periods and the best times to go
- The busiest times at the Rec Center are at 1 PM and 5 PM on the Weekdays and 12 PM and 4 PM on the Weekends due to the peaks in occupancy at those times
- DST Handling: The DST transition on November 2, 2025 is handled by assuming the times have been standardized to EST
- Time Zone Offset: The 3hr and 45min offset appears to be constant across before and after DST change
- Operational Hours: Data outside operational hours is filtered out to focus on actual gym usage and prevent issues with mean calculation
- Fixed interval sampling may smooth out short-term peaks, underestimating maximum occupancy
- The occupancy on the website doesn't truly reflect how full the Rec center feels. For example, a fitness class may inflate the occupancy, but because classes are hosted in studios, that actual population won't affect regular occupants on the gym floor.
- Make a ML algorithm from this data
- Collect more data to compare patterns with the spring semester
- Collect data at random intervals