GeriLife / caregiving

GeriLife is a comprehensive toolkit designed to empower caregivers in elder-care communities, promoting wellness and ensuring equitable engagement in life-enriching activities. This project, rooted in real-world insights and collaborative innovation, aims to transform elder care by making quality-of-life activities visible and coordinated.
European Union Public License 1.2
7 stars 7 forks source link

Implement Stacked Bar Chart for Activity Counts by Resident and Activity Type #43

Closed brylie closed 11 months ago

brylie commented 11 months ago

Objective

To introduce a stacked bar chart on the Home profile template that displays activity counts grouped by resident and activity type. This visualization aims to provide a clear overview of each resident's participation in different activities, enhancing the understanding of individual engagement patterns.

Chart Details

Data Calculation and Aggregation

Aggregation Summary for Activity Counts by Resident and Activity Type Chart

This chart requires a multi-level aggregation approach:

  1. Resident Identification: For each resident, compile all their activity records.
  2. Activity Type Grouping: Within each resident's data, group the activities by type.
  3. Count Aggregation: For each group (resident-activity type combination), count the total number of activities.
  4. Bar Segment Representation: Represent each activity type count as a segment in the resident's bar, with the segment's length corresponding to the activity count.
  5. Color Coding: Assign a unique color to each activity type and use this color consistently across all residents' bars.
  6. Data Structuring for Visualization: Organize the aggregated data to fit the stacked bar chart format, ensuring clarity in representing each resident's activity engagement.

Design Considerations

Technical Requirements

Reference Image

Desired Chart Output

Acceptance Criteria

adrienneli104 commented 11 months ago

Hi could I be assigned to this issue? My teammate Tanay has decided to handle the data fixtures by himself

brylie commented 11 months ago

Thanks, @adrienneli104! I’ve assigned you to the issue.

brylie commented 11 months ago

@adrienneli104, before working on the data aggregations, I realized we should create a database table that would make it easier to query and aggregate chart data. Please look at the following issue, which would serve as a foundation for this and other data visualization tasks.