-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Feature
1 / 11 of 1 issue completed
Copy link
Description
Expected Behavior
The API should provide averaged traffic data based on historical patterns stored in the library_traffic_history table. Users should be able to query typical occupancy levels at different times to help plan their study sessions.
Examples:
- Average traffic for Langson Library 4th Floor on Wednesdays at 2pm
- Average afternoon traffic for Gateway Study Center across all weekdays
- Daily average traffic for Science Library during finals week
Current Behavior
The library traffic feature currently:
- Scrapes traffic data every 15 minutes when libraries are open ("active" status)
- Scrapes traffic data every 60 minutes when libraries are closed ("idle" status)
- Stores current snapshot in
library_traffictable - Accumulates historical data in
library_traffic_historytable with timestamps
The API only returns the most recent snapshot via /library-traffic endpoint. Historical data is being collected but not exposed or aggregated for analysis.
Possible Solution
Add new API endpoints that leverage the historical data to provide averaged traffic patterns:
Averaging Approaches/Features to Consider
- Hourly Averages: Average traffic per hour of the day (e.g. 2pm on Mondays)
- Daily Averages: Average traffic per day of the week (e.g. Tuesdays)
- Time-of-Day Averages: Average traffic across different time blocks (e.g. morning, afternoon, evening)
- Day-Specific Averages: Average traffic on a specific Calendar day (e.g. Wednesday of finals week)
- Custom Time Ranges: Allow users to specify date ranges for custom averaging
Sub-issues
Metadata
Metadata
Assignees
Labels
No labels