Stream Resolution Units

246 views
Skip to first unread message

Sante Kotturi

unread,
Nov 19, 2016, 4:34:05 PM11/19/16
to Strava API
Hey all, 

Quick question about the "resolution" parameter for Streams. 

from the docs:
resolution: string optional
low (100), medium (1000) or high (10000), default is all,
indicates desired number of data points, streams will only be down sampled

"number of desired data points" is throwing me off. What are the units used ? I'm guessing its one of two cases: 

Case 1:
Units = data points / minute. 
As in low = 100 recordings per minute, medium = 1000 recordings per minute, high = 10000 recordings per minute. 
These don't feel right, 100 recordings per minute is still much higher than I expected. 1Hz or 60 recordings per minute seems like the high end for most GPS devices. 

Case 2: 
Units = recording intervals
as in:  low = a data point every 100ms, medium = a data point every 1000ms, high = a data point every 10000 ms
This is obviously wrong as low would lead to 10x more data than high, however, the idea of records per X time period seems logical. 

I've tried trying to figure out with some of my own data:
When I look at the data for a run this week and when I pull the streams for it, it says the resolution="high". I've set the GPS recording interval on my SUUNTO watch to 1 second. Does this mean that Strava is interpolating my 60Hz data to 166Hz? (10000 data points per minute / 60 seconds = 166.6667 Hz)

I tried using the "time" thinking it would return datatime's but instead it's just an array of ints: 

 {
    "type": "time",
    "data": [
      0,
      1,
      2,
      3,
      4,
      5,
      6,
      7,
      8,
      9,
      10,
      11,
      .... 
    ], 
    "series_type": "distance",
    "original_size": 2431,
    "resolution": "high"
  }


The relevant section of the docs: http://strava.github.io/api/v3/streams/#activity
I search "stream resolution" but none of the returned topics covered this, if its been answered somewhere, please let me know where. 

Thanks in advance, 
Sante

Ben Lowe

unread,
Nov 20, 2016, 2:26:38 AM11/20/16
to Strava API
One data point per second is the most detail you'll get from the streams as this is what is recorded by the GPS devices (although some will skip points if using smart recording).
If you choose the low (100) option then the stream arrays will only return 100 points evenly spread from the original stream arrays.
Just try out the options and look at the time stream and see what data points are returned.

Ben

Sante Kotturi

unread,
Nov 20, 2016, 2:19:38 PM11/20/16
to Strava API
Ah I see, its the resolution of the entire activity, not the sampling rate. 
I tried this for an activity that lasted 12 hours which lead to some follow up questions. 

Two follow up questions: 

1)
10,000 seconds = 2hr 46 min 40 seconds. 
So for any activity longer than 2hr46min40sec, I will see downsampled data if I pull resolution = high? 
Be extension, for activities shorter than this, i will see the raw data 


2) 
For the time series, the units are seconds? 
    "type": "time",
    "data": [
      0,
      10,
      13,
      16,
      19,
      22,
      26,

Thanks! 
-Sante

Sante Kotturi

unread,
Nov 20, 2016, 3:00:53 PM11/20/16
to Strava API
Found: 
time:integer seconds
which answers question #2 above. 

Ben Lowe

unread,
Nov 20, 2016, 3:13:57 PM11/20/16
to Strava API
"indicates desired number of data points, streams will only be down sampled" - http://strava.github.io/api/v3/streams/#activity
Reply all
Reply to author
Forward
0 new messages