cancel
Showing results for 
Search instead for 
Did you mean: 

How to interpret detailed activity data from activity streams?

tamasbence
Shkhara

Dear Moderators and Forum Readers,

We are using the Strava API since years in our product. We are utilizing the detailed activity streams as well. In the API reference the structure of the response of activity streams are described in good detail, however there is nothing said on how the data shall be interpreted (e.g. an entry in the ,,velocity_smooth'' is 1.0m/s what does it mean, is it the actual speed on a given time or an average of a longer time period?...). We see a lot of various ,,formats'' for these streams: for some users and activities, there is a data record for each second, in some cases, we have records for every few seconds. We can see also sparse formats, with only a few record for the entire activity, or even having data records for every second, except a few, large periods without any data record. This makes implementing a general solution for interpreting the data really hard.

My question is, that is there any good and detailed description about how to interpret the data in the streams? Or could somebody write some in this thread, please?

Specifically I will post here a few JSON response snippets and ask a few very specific questions:

1. The i-th record in each stream corresponds for the same second? So if in the time stream the 100th element is 205, and in the distance stream the 100th element is 300, we can say, that the user covered 300m in total in the first 205 sec of the workout? (Our assumption was always that this is the case, however this is not mentioned in the documentation.)

2. For one swim activity we have a time and distance stream of:

[0,28,57,85,113,140,167,195,222,248,276,303,330,357,384,404,446,479,507,537,564,595,...,4275,4287,4299]

[0,25,50,75,100,125,150,175,200,225,250,275,300,325,350,375,400,412.5,425,450,475,500,...,3175,3200,3200]

I would interpret this, as she was at 375m@6:44, 400m@7:26 and 412.5m@7:59. The lap data for the same activity file suggests, however, that he was at 400m @ 7:17 and then had 41 second rest. So the streaming and lap data are conflicting. Why is that? Which one is the correct? (Or I'm making a mistake interpreting the streaming data?)

3. In another swim activity we are seeing very huge ,,jumps'' in distance in a few seconds. E.g. at 1461 second the distance is 1108.2m, while on the next second, 1462 distance is 1125m. That is too big difference. How should we interpret that?

4. In a bike activity there is one data record for each second, except a 745 second ,,hole'' in the middle of the stream. The stream looks like this: [... 2700,2701,2702,2703,2704,2705,3450,3451,3452,3453,3454,3455,3456...]. How should we interpret this stream? What does the ,,hole'' mean?

I would be happy to share more details about these activities in a private conversation with a Strava developer.

I really appreciate every answer! Thank you in advance for help!

Bence Tamas

1 ACCEPTED SOLUTION

SkippyVasquez
Moderator Moderator
Moderator

Hey @tamasbenceYou can find the measurements for each stream in the docs. for example, distance is in meters: https://developers.strava.com/docs/reference/#api-models-DistanceStream, or HR stream is beats per minute: https://developers.strava.com/docs/reference/#api-models-HeartrateStream

 

Skippy
STRAVA | Developer Hub Team


View solution in original post

2 REPLIES 2

Jan_Mantau
Denali

Hi @tamasbence, because of the complete lack of documentation for the interpration of streams I can only speak from experience:

1) You're right, if you get the streams with the parameter "series_type=time" then every entry in the time stream is a second and its index correspondes with the same index in the other streams.

2) That's more a question of how the device for recording the swim measures laps and distances and not really about streams as it isn't Strava who decides at what second a lap starts and ends.

3) Outdoor swims are notorious for their abysmal bad GPS reception (because there isn't one with the hand underwater) and that leads to these jumps.

4) The "hole" means a pause.

SkippyVasquez
Moderator Moderator
Moderator

Hey @tamasbenceYou can find the measurements for each stream in the docs. for example, distance is in meters: https://developers.strava.com/docs/reference/#api-models-DistanceStream, or HR stream is beats per minute: https://developers.strava.com/docs/reference/#api-models-HeartrateStream

 

Skippy
STRAVA | Developer Hub Team