Skip to content

Commit

Permalink
fix: memberactivities analytics range!
Browse files Browse the repository at this point in the history
As the analytics for a specific date should be a range of `window_size` before, we should've go always `window_size` days back to compute that day analytics.
The condition here is for the time when we're computing daily analytics and loading the previous analytics in memory.
  • Loading branch information
amindadgar committed Feb 14, 2024
1 parent 287c3a0 commit 6430ec8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion discord_analyzer/analysis/compute_member_activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def compute_member_activity(
# no analytics for the days would be computed
# so make it as a window_d lenght to have the computations
new_date_range_interval = (new_date_range[1] - new_date_range[0]).days
if new_date_range_interval < window_param["period_size"] - 1:
if load_past_data is True:
interval_before = (new_date_range_interval) + (
window_param["period_size"] - 1
)
Expand Down

0 comments on commit 6430ec8

Please sign in to comment.