Compare Current Period to Previous Period
On the Statistics Dashboard Screen, period-based comparisons are displayed alongside the primary statistics. When a date range filter is selected, the Statistics Calculation Service computes both the current period total and the equivalent prior period total, returning both values to the client. The UI renders a simple comparison indicator — such as '+3 activities vs last month' or '−1 hour vs last week' — alongside the primary metric. This comparison is subtle enough not to add cognitive load but provides meaningful context for interpreting the current period's numbers. Negative comparisons are displayed neutrally (not alarmingly) to avoid demotivating volunteers.
User Story
Acceptance Criteria
- Given I am on the Statistics Dashboard Screen with 'this month' selected, when the data loads, then I see a comparison label showing the difference in activity count compared to last month
- Given the current period has more activities than the previous period, when the comparison renders, then the difference is shown as a positive number or upward indicator
- Given the current period has fewer activities than the previous period, when the comparison renders, then the difference is shown neutrally without alarming colour or negative language
- Given the previous period has no data, when the comparison would be calculated, then the comparison label is hidden rather than showing a zero-division or misleading value
- Given I switch date range filters, when the new filter is applied, then the comparison updates to compare the newly selected period against its equivalent prior period
Business Value
Period comparisons are a proven motivational tool — seeing that you did more this month than last creates positive reinforcement. This is a lightweight implementation of the Spotify Wrapped concept NHF and HLF requested, providing ongoing period-over-period awareness rather than a single annual review. It also reduces coordinator effort by making peer mentors self-aware about their engagement levels.