Download and upload activity streams CSV

All Intervals.icu users can download a CSV of the streams (power, heart rate, cadence etc.) for an activity for analysis in Excel, Google Sheets etc., on the activity data tab. Supporters can also upload the CSV to add or edit data.

Google Sheets

Do File → Import and select the CSV file. If the activity has any array valued streams (e.g. HRV or a custom stream using array values) then you need to untick the “Convert text to numbers, dates and formulas” box:

Once the data has loaded, select all the normal columns and do Format → Number and choose any number format. This will convert the text to numbers. Then do Format → Number and choose “Automatic” to restore automatic number formatting.

Do File → Download and choose .csv to get a file to upload to Intervals.icu.

Uploading a CSV

All stored (non-computed) streams can be edited, including custom streams. You can add rows to fill in missed data and remove rows to cleanup junk.

The column headers in the CSV need to match the names of built in streams or the code of custom activity streams. You can create a custom activity stream and use its code in the CSV to pull any data into Intervals.icu.

Blank cells are imported as null values. If all values for a stream are null then it is removed from the activity.

Array values must be packed into a single cell separated with colons:

hrv
635:646

The time column holds seconds since the start of the activity with the first row 0.

If you do not change the number of rows in the CSV then only columns you include are updated.

If you change the number of rows, then you need to supply all the columns. Any missing columns are removed from the activity.

21 Likes

Can these field parameters be exposed through API as well ?

Br

Clive

1 Like

Yes: PUT /api/v1/activity/{id}/streams.csv

This accepts multipart/form-data and the CSV must be called “file”.

4 Likes

Hi David and all,

Huge thanks for the “Download and upload activity streams CSV” feature—I use it constantly, and the Excel import works flawlessly!

I have a quick question about altitude.
When I sum up the delta (change in altitude) from the CSV stream (even after trying the 0.2 tolerance), the result is way off the total gain/loss Intervals.icu reports, as well as smartwatch apps.

What’s the best method/algorithm to process the raw altitude stream data from the CSV to get an elevation gain/loss figure more in line with the official figures?

Thanks again for all the amazing development and effort!

Cheers,

Is it possible to use PUT /api/v1/activity/{id}/streams using JSON similar to what’s returned by the GET request? Looking at adding a stream and would be neater to avoid round-tripping to CSV with the challenges that adds.

It tells me it’s only for premium users?

Yes you need to be a supporter to use this. It is quite advanced and took some effort to develop. And we need to add more premium features to increase subscription rates.

Yes that will be added. CSV was done first because that is more accessible to non-developers and this is tabular data.

Intervals.icu uses the info from the session message in the fit file if it can to match the device. Otherwise the change from one point to the next must be at least 1.2m to count towards gain/loss.

6 Likes

Understood, thank you!

1 Like

Would this be similar to editing the power/HR/cadence in the Actions menu on the activity? That’s a cool feature to be able to edit bad data when we have dual recoding available.

Yes it is similar to those features but easier if you need to fix a lot of stuff and allows editing of any stream, and you can add new streams.

2 Likes

Its possible download a .csv file, with all the columns i choose in the Fields? like “avg cadence " , lap_number” etc..

Yes, just click the “CSV” button on the end of the intervals toolbar:

Sorry, I thought the CSV file with the timestamp data, i.e., values ​​per second, was necessary for analysis. I’m now trying to pull it using the Python API, but the data for each second and its respective values ​​of bpm, smo2, etc., i.e., the temporal stream data, is missing.

Thankyou so much ! Now i get much better results. (2% difference, more than acceptable!)

1 Like

We have added a new endpoint that accepts JSON in the same format as the GET: Intervals.icu API docs

Otherwise it behaves in the same way as the CSV one.

2 Likes

Hi David, i am trying to upload https://storage.googleapis.com/intervals-icu-images/attachments/03f2e181-4b6e-4dbf-a7f2-8ffaeb33d50e the bar progresses but i allways getting Network error at the end. ps i have all the placeholder Custom Streams

@David Hi David,
Tried to reset to previous state by deleting those custom fields, reprocessing, then deleting last activities, now i cant upload the fit file with Calibre metrics from GIGANON_BASTIEN, getting the Network error. Same unusual thing happened after trying to upload above csv file. Am i some how locked out?

Please send me a link to the activity you are trying to upload the CSV to, tx.

I have sent you by PM

Hi David!, Is it, or would it be possible to download with the stream data other “calculated” data as the gradient or w’bal? (gradient is really the one im interested in, would be a “nice” feature for “supporters” :wink: )
I would love to know too, how do you do the “smoothing” of the gradient, cos looks really on “the spot”.
Thanks in advance for your answer and congrats for the awesome job you do. Its really amazing.