Overview
Analytics provides insights into your spending across all groups. See where your money goes, how much you’ve contributed, and identify spending trends.Accessing Analytics
Tap the Analytics tab in the bottom navigation to view your spending dashboard.Total Group Spending
The top card displays your aggregate spending across all groups:Key Metrics
Two stat cards show your personal financial breakdown:Your share
The total amount of all expenses that you’re responsible for (your portion of split costs).Example: $432.80
You paid
The total amount you’ve actually paid out-of-pocket for expenses (regardless of split).Example: $485.20
Understanding the Difference
- Your share: What you should pay based on splits
- You paid: What you actually paid upfront
- Difference: The gap between these determines if you’re overpaying or underpaying
Overpaid/Underpaid Summary
This card shows the net difference between what you paid and your actual share:- Overpaid (Green)
- Underpaid (Red)
“You’ve overpaid by $52.40”
- Displayed in green
- Means you fronted more money than your share of expenses
- Others owe you to balance things out
- Subtitle: “You fronted more than your share”
~/workspace/source/app/src/main/java/com/example/divvy/ui/analytics/Views/AnalyticsScreen.kt:207
Spending by Group
This section breaks down your expenses by each group you belong to.Group Spending Cards
Each group displays:- Group icon: Visual identifier
- Group name: “Roommates”, “Weekend Trip”, etc.
- Your share: Your portion of expenses in this group
- Group total: Total spending across all members
- Progress bar: Visual representation of your share relative to the highest-spending group
~/workspace/source/app/src/main/java/com/example/divvy/ui/analytics/Views/AnalyticsScreen.kt:252
Visual Scaling
The progress bars are normalized to the group with the highest spending:- The group where you’ve spent the most shows a full bar (100%)
- Other groups scale proportionally
- Bars animate smoothly when the screen loads
Sorting
Groups are displayed in order of your total share (highest to lowest).Data Breakdown
Analytics aggregates data from:- All expenses across your groups
- Your splits within those expenses
- Who paid for each expense
- Settlement history (reduces outstanding balances)
Activity Feed Reference
While analytics shows aggregate numbers, you can see individual transactions in:- Group activity feeds: Shows recent expenses per group
- Ledger: Complete transaction history across all groups
Analytics Data Model
The analytics view model calculates:- Total spent: Sum of all
Expense.amountCentsacross groups - Your share: Sum of all
Split.amountCentswhereuserId= you - You paid: Sum of all
Expense.amountCentswherepaidByUserId= you - Overpaid:
(You paid) - (Your share)
~/workspace/source/app/src/main/java/com/example/divvy/ui/analytics/ViewModels/AnalyticsViewModel.kt
Use Cases
Budget Tracking
Monitor your total group spending to stay within budget:- Set personal spending limits
- Track monthly group expenses
- Identify which groups cost the most
Expense Patterns
Understand where your money goes:- See if one group dominates your spending
- Compare spending across roommates, trips, or events
- Analyze personal vs. group spending habits
Settlement Planning
Use overpaid/underpaid metrics to:- Identify who to settle up with
- See if you need to request money or send payments
- Balance out-of-pocket costs with actual obligations
Future Enhancements
Planned analytics features:- Date range filters: View spending for specific time periods
- Category breakdown: Expenses by type (food, travel, utilities)
- Export options: Download spending reports as CSV/PDF
- Charts and graphs: Visual spending trends over time
Empty State
If you have no expenses yet:- Analytics will show $0.00 for all metrics
- The spending by group section will be empty
- Add expenses to start seeing analytics
Analytics update in real-time as you add expenses and settle balances.