A Python program that loads gym workout records, computes fitness metrics for an individual member, and runs cohort-level analytics and visualizations on top of the dataset.
| Name | Stevens ID | |
|---|---|---|
| Saanie Naqvi | snaqvi3@stevens.edu | 20045913 |
| Aaron Nathans | anathans@stevens.edu | 20040170 |
| Azizul Haque | ahaque3@stevens.edu | 20036646 |
Course: AAI/CPE/EE 551 WS/WS1 Submission: May 6, 2026
Athletic performance depends on a lot of moving pieces: training intensity, recovery, body composition, and experience all factor in. Most people who track their workouts end up with a spreadsheet they never really analyze. We wanted to build something that takes that kind of data and turns it into actual insights, like which workout types burn the most calories, how often you're training in each heart rate zone, and how you compare to other people at your level.
The program runs on a synthetic dataset of 1,800 gym sessions (15 columns covering things like age, weight, BMI, workout type, calories burned, heart rate, etc.). After cleaning we end up with around 1,629 usable rows. The program then computes per-member metrics (BMI category, max HR, target HR zones using the Karvonen formula), cohort statistics, and saves five matplotlib charts to the outputs/ folder.
The main program is a Jupyter notebook (max_performance.ipynb) that walks through everything step by step. There's also a pytest suite with 70 tests covering the public functions and methods.
We split the code into a few focused modules so each one has a clear job:
athlete.py-GymMemberclass. Holds one person's profile and computes their per-member metrics.performance_tracker.py-PerformanceTrackerclass. Composes aGymMember(a tracker has-a member, it isn't a kind of member) and runs cohort analytics on top of the cleaned dataset.analytics.py- Standalone statistical functions (ACWR, recovery labeling, trend analysis, calorie aggregation, descriptive stats, plus a generator).data_loader.py- Reads the CSV, cleans it, and provides a factory function for building aGymMemberfrom a row.visualizer.py- Five matplotlib chart functions that save PNGs tooutputs/.
We went with composition rather than inheritance because a tracker uses a member to scope its analysis; it isn't a specialized type of member.
Quick naming note: the class is called GymMember in the code. The proposal used the word "Athlete" but we settled on GymMember since it matches the dataset terminology, and we kept it consistent across all the modules and tests.
- Python 3.12+ (we tested on 3.13)
- pandas
- numpy
- matplotlib
- pytest
- jupyter
pip install pandas numpy matplotlib pytest jupyterMax_Performance/
├── athlete.py
├── performance_tracker.py
├── analytics.py
├── data_loader.py
├── visualizer.py
├── test_max_performance.py
├── max_performance.ipynb
├── README.md
├── Project_instruction.txt
├── PyCrew - Project Proposal.docx
├── PyCrew_Task_Delegation.docx
├── data/
│ └── gym_members_exercise_tracking_synthetic_data.csv
└── outputs/
├── calories_by_workout_type.png
├── hr_zone_distribution.png
├── bmi_by_experience.png
├── calories_vs_duration.png
└── workout_type_counts.png
From the project root:
jupyter notebook max_performance.ipynbThen go to Kernel > Restart & Run All. The notebook walks through loading the data, building a member, running the cohort analytics, demoing the generator, rendering all five charts, showing the exception handling, and running the full pytest suite at the end.
pytest test_max_performance.py -vShould give you 70 passed.
Each .py file has an if __name__ == "__main__": block:
python athlete.py
python performance_tracker.py
python analytics.py
python data_loader.py
python visualizer.py| Member | Contributions |
|---|---|
| Saanie Naqvi (snaqvi3@stevens.edu, 20045913) | athlete.py - GymMember class with input validation, BMI / max-HR / HR-reserve calculations, Karvonen target HR zone, weekly volume estimate, and operator overloads (__str__, __eq__, __repr__). Notebook narrative scaffolding and the inline pytest runner. |
| Aaron Nathans (anathans@stevens.edu, 20040170) | analytics.py - ACWR, recovery status labeling, exercise distribution, trend analysis with numpy.polyfit, reduce + lambda calorie aggregation, describe_series using statistics, and the yield_high_calorie_sessions generator. TestAnalytics and TestDataLoader test classes. GitHub repo setup. |
| Azizul Haque (ahaque3@stevens.edu, 20036646) | performance_tracker.py - PerformanceTracker class composing GymMember, with cohort analytics methods and __len__ / __str__ / __getattr__ overloads. data_loader.py - CSV ingestion, cleaning, column rename, and the GymMember factory. visualizer.py - five matplotlib chart functions. data/ and outputs/ folder setup, dataset selection. |
Each member made at least 5 meaningful commits to the repo across logic, design, testing, data handling, and documentation.