Skip to main content
Solved

Power Curve with Strava API


Forum|alt.badge.img+4

 

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!

Best answer by ActivityFix

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.

View original
Did this topic help you find an answer to your question?

2 replies

ActivityFix
Superuser
Forum|alt.badge.img+24
  • Superuser
  • 227 replies
  • Answer
  • June 26, 2024

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.


Forum|alt.badge.img+4
  • Author
  • Hub Rookie
  • 7 replies
  • June 27, 2024

Thank you @ActivityFix


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept, you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings