Products

Activity Score

The Activity Score offers a holistic measure of physical activity and fitness levels. By weaving together different aspects of daily movement, it provides insights into overall physical engagement and its impact on health. This score helps users identify areas for improvement, promoting a healthier and more active lifestyle.

At-a-Glance: Activity Score

Aspect Details
Score type activity
score range 0.0 - 1.0
Possible states minimal, low, medium, high
Contributing factors steps, active_hours, active_calories, intense_activity_duration, extended_inactivity, floors_climbed
Supported dataSources age, gender, activity, exercise
Latest version 1.0
Status PRODUCTION

Example JSON Response

{
"id": "a1b2c3d4-e5f6-1234-efgh-ij1234567892",
"profileId": "p1q2r3s4-t5u6-7890-vwxy-z1234567890",
"accountId": "x1y2z3a4-b5c6-7890-dfgh-i1234567890",
"externalId": "e1f2g3h4",
"type": "activity",
"score": 0.85,
"state": "high",
"factors": [
{ "name": "steps", "value": 9000, "goal": 10000, "unit": "count", "score": 0.93, "state": "high" },
{ "name": "active_hours", "value": 9, "goal": 12, "unit": "hour", "score": 0.83, "state": "high" },
{ "name": "active_calories", "value": 450, "goal": 500, "unit": "kcal", "score": 0.92, "state": "high" },
{ "name": "intense_activity_duration", "value": 5, "goal": 30, "unit": "minute", "score": 0.67, "state": "medium" },
{ "name": "extended_inactivity", "value": 500, "goal": 240, "unit": "hour", "score": 0.80, "state": "high" },
{ "name": "floors_climbed", "value": 6, "goal": 10, "unit": "floor", "score": 0.79, "state": "medium" }
],
"dataSources": ["age", "gender", "activity", "exercise"],
"scoreDateTime": "2023-11-11T00:00:00+02:00",
"createdAt": "2023-11-11T11:05:41.644Z",
"version": 1.0
}

For a breakdown of each field in the JSON response, please refer to the output schema on the health scores homepage.


Understanding the Activity Score

The Activity Score measures the overall physical activity levels of an individual. It evaluates factors like daily steps, active hours, and calories burned to provide a comprehensive assessment of physical engagement.

Important Note

For a detailed explanation of how the Activity Score works and recommendations to improve it, please refer to Activity Score Explained .


Interpreting the Score

The higher the Activity Score, the better the physical activity levels and adherence to fitness goals.

  • 0.76 - 1.00 (High) : Excellent physical activity levels.
  • 0.61 - 0.75 (Medium) : Moderate activity levels with room for improvement.
  • 0.46 - 0.60 (Low) : Insufficient physical activity; attention needed to enhance activity levels.
  • 0.00 - 0.45 (Minimal) : Very low activity levels; significant changes required for health improvement.

Factors in Activity Score

The Activity Score is calculated using several factors, each representing different aspects of physical activity:

Factor Description Data Sources Requires Wearable
Steps Total number of steps taken throughout the day. Activity No
Active Hours Number of hours with recorded activity or exercise. Activity, Exercise No
Active Calories Total calories burned during active periods. Activity, Exercise No
Intense Activity Duration Duration of moderate to vigorous physical activity. Activity, Exercise No
Extended Inactivity Amount of time spent sedentary without breaks. Activity No
Floors Climbed Number of floors climbed throughout the day. Activity No

Data Requirements

The Activity Score calculation relies on activity and exercise data. Below are the detailed requirements:

Full Data Types Needed:

  • Activity Data: Steps, floors climbed.
  • Exercise Data: Active calories, intense activity duration.

Minimum Data Required:

A minimum of three contributing factors are required to compute a reliable Activity Score. The essential data includes:

  • Activity Data: Steps.

Permissions Needed:

Platform Permissions
Apple HealthKit (HK) stepCount, HKWorkout, flightsClimbed
Google Health Connect (HC) steps, ExerciseSession, floorsClimbed

Handling Missing Data:

  • If certain data points are missing (e.g., no exercise data), the related factors will be returned as null.
  • The Activity Score adjusts for missing data when possible. However, if there aren’t enough factors to compute a reliable score (less than three factors available), the score itself will be returned as null.

Integrating the Activity Score

To start receiving the Activity Score, set up webhooks (recommended) or use the API. You can also display the score in your application using the UI widgets.

Webhooks

  1. In the dashboard , navigate to Webhooks > Create new Webhook > Health Scores > tick the Activity Score box > paste in your destination URL.
  2. Once an Activity Score is generated, the webhook will automatically forward the event to your data store.

API

Retrieve Activity Scores for a profile within a specific time window:

  • Endpoint : GET /api/v1/profile/score

  • Authorization : Bearer token

  • Parameters :

    • types: list of types (e.g., activity)
    • startDateTime: Start date-time (ISO format)
    • endDateTime: End date-time (ISO format)
    • version: version of the score algorithm (default: 1)
  • Responses :

    • 200 : Returns Activity Scores with details like id, type, state, score, factors, dataSources, scoreDateTime.
    • 400 : Invalid profile ID.
    • 401 : Invalid token.
  • Example Request :

    curl -X GET "https://api.sahha.ai/v1/profile/score?types=activity&startDateTime=2024-08-01T00:00:00Z&endDateTime=2024-08-31T23:59:59Z" \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

For further details, refer to the API reference .


UI Widgets

You can also make use of UI Widgets to display the Activity Score.

  1. Configure your app to utilize the widgets using the UI Widgets Guide .

  2. Once configured, simply paste the URL for the widget of your choice, which can be any of:

    /arc − displays the score as an arc.

    /factors − displays a list of the factors.

    /chart − displays the scores over time.


Best Practices

Follow these best practices to ensure accurate interpretation and effective use of the Activity Score:

  1. Data Accuracy : Encourage users to keep their activity tracking devices calibrated and worn consistently.
  2. Wearable Devices : While not mandatory, wearables can provide more detailed activity data, enhancing the accuracy of the score.
  3. Personalized Feedback : Use the factors to provide personalized recommendations to users for increasing their activity levels.
  4. Holistic Approach : Encourage users to consider the Activity Score alongside other health indicators like sleep and readiness scores for a comprehensive view of their well-being.

Frequently Asked Questions (FAQs)

Q: Can I use the Activity Score without a wearable device?

A: Yes, the Activity Score can be calculated using data from a smartphone, such as steps and active hours. However, some factors like floors climbed may require wearable data for accurate measurement.

Q: How can I improve my Activity Score?

A: Enhance your Activity Score by achieving daily activity goals, increasing your active hours, incorporating intense activity, and minimizing sedentary periods. Regularly track and adjust your activity levels for continuous improvement.

Q: What does a high Activity Score indicate?

A: A high Activity Score indicates robust physical activity levels, good adherence to fitness goals, and limited sedentary behavior, contributing positively to overall health and fitness.

Q: Can the Activity Score help in weight management?

A: Yes, the Activity Score provides insights into your daily physical activity and caloric expenditure, which are crucial factors in weight management. However, it should be complemented with dietary considerations for effective weight management.

Previous
Wellbeing
Next
Sleep