File size: 1,222 Bytes
1fa53ff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Provide core cards, viz categories, and mock data utilities

CATEGORIES = [
    "Finance", "Education", "Family", "Friends", "Weekend/Vacation"
]

def get_dashboard_cards(profile):
    # Simulate dashboard cards data for given profile (expand as needed)
    return [
        {"title": "This Month's Budget", "progress": profile["spend"]/profile["budget"], "details": f"{profile['spend']}/{profile['budget']}"},
        {"title": "12% less study time today", "details": "Stay focused! Important milestone for PM program."},
        {"title": "My Goals For Today", "goals": profile["goals_today"]},
        {"title": "Today's Tip", "details": "Registering for Selective Service may get you aid."},
        {"title": "Savings Goal", "progress": 0.68, "details": "+$300 from last month"},
    ]

def get_category_data(category, profile):
    # Simulate breakdowns for each category, return chart data
    if category == "Finance":
        return {"labels": ["Savings", "Food", "Leisure"], "values": [1000, 400, 176]}
    elif category == "Education":
        return {"labels": list(profile["last_scores"].keys()), "values": list(profile["last_scores"].values())}
    return {"labels": [], "values": []}