Fix workouts per week graph, it was erroneously showing sets per week (perhaps add sets/number of exercises per week)
This commit is contained in:
3
utils.py
3
utils.py
@@ -338,7 +338,8 @@ def get_workout_counts(workouts, period='week'):
|
|||||||
for period_start in person_data["PRCounts"]:
|
for period_start in person_data["PRCounts"]:
|
||||||
period_end = period_start + pd.DateOffset(weeks=1) if period == 'week' else period_start + pd.DateOffset(months=1)
|
period_end = period_start + pd.DateOffset(weeks=1) if period == 'week' else period_start + pd.DateOffset(months=1)
|
||||||
period_workouts = person_df[(person_df['StartDate'] >= period_start) & (person_df['StartDate'] < period_end)]
|
period_workouts = person_df[(person_df['StartDate'] >= period_start) & (person_df['StartDate'] < period_end)]
|
||||||
person_data["PRCounts"][period_start] = len(period_workouts)
|
period_workout_count = period_workouts['WorkoutId'].unique()
|
||||||
|
person_data["PRCounts"][period_start] = len(period_workout_count)
|
||||||
|
|
||||||
return workout_counts
|
return workout_counts
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user