06-26-2024 01:29 AM
Hello, I am wondering if anyone has successfully created a power curve using the Strava API for multiple activities. I noticed that there is no API endpoint for multiple activities that includes data for the power curve. I am curious about what would be the best approach to tackle this. Thank you!
Solved! Go to Solution.
06-26-2024 05:34 AM
To calculate a power curve for an individual activity you need the full power stream (https://developers.strava.com/docs/reference/#api-Streams-getActivityStreams). The API call is only available for a single activity so you would need to call it for each activity individually, calculate the power curve on each, and then build the overall power curve from those results.
If you are calculating it over time, the most efficient way to handle it would be to save the power curve for each activity along with the activity date. With each new activity uploaded you only need to pull a single activity power stream and you can re-calculate the overall power using the new data + all of the saved data from previous activities.
06-26-2024 05:34 AM
To calculate a power curve for an individual activity you need the full power stream (https://developers.strava.com/docs/reference/#api-Streams-getActivityStreams). The API call is only available for a single activity so you would need to call it for each activity individually, calculate the power curve on each, and then build the overall power curve from those results.
If you are calculating it over time, the most efficient way to handle it would be to save the power curve for each activity along with the activity date. With each new activity uploaded you only need to pull a single activity power stream and you can re-calculate the overall power using the new data + all of the saved data from previous activities.
06-27-2024 08:27 AM
Thank you @ActivityFix
Welcome to the Community - here is your guide to help you get started!