# How to downsample too much data?

Question asked by jpbarna on Jan 22, 2018
Latest reply on Jan 24, 2018 by fmpdude

Hi!

I have an Excel file that has sample data from a GPS. It tracks several variables that store 10 to 12 times per second. This is a lot of data for my needs, and I want to reduce the number of samples.

I have two questions:

1. In a long list of records (one file has more than  60000 rows), how can I calculate the average of each second and get rid of the original data? I know how to calculate an average, for sure... but I'd like to do it in a efficient manner in FileMaker Pro for the sake of speed.
2. Other way to eliminate data would be to keep the first sample for each second and delete the followers until the first one in the next second).

I did something calculating the seconds value of the timestamp (to detect the first integer second for each set of records) and then store the value in a variable looping down until the second value in the filed changes, store the value in the variable and repeating, but it was WAYYYY slow...

Thanks!

JP

The Excel data (is CSV really) comes like this (this is for the first 2 seconds)

 Timestamp Seconds Velocity Acceleration Odometer Latitude Longitude Heart Rate Body Load 19/01/2018 22:17 0 0,01 -0,17 0 -38,0183607 -57,58196 0 0 19/01/2018 22:17 0,1 0,01 -0,13 0 -38,0183605 -57,5819599 0 0 19/01/2018 22:17 0,2 0,01 -0,1 0 -38,0183607 -57,5819602 0 0 19/01/2018 22:17 0,36 0,01 -0,08 0 -38,0183608 -57,5819601 0 0 19/01/2018 22:17 0,49 0 -0,05 0 -38,018361 -57,5819602 0 0 19/01/2018 22:17 0,6 0 -0,04 0 -38,0183612 -57,5819602 0 0 19/01/2018 22:17 0,6 0 -0,04 0 -38,0183612 -57,5819602 0 0 19/01/2018 22:17 0,7 0 -0,03 0 -38,0183611 -57,5819599 0 0 19/01/2018 22:17 0,86 0 -0,02 0 -38,018361 -57,5819594 0 0 19/01/2018 22:17 1 0 -0,01 0 -38,018361 -57,5819585 0 0 19/01/2018 22:17 1 0 -0,01 0 -38,018361 -57,5819585 0 0 19/01/2018 22:17 1,11 0 -0,01 0 -38,018361 -57,5819582 0 0 19/01/2018 22:17 1,26 0 -0,01 0 -38,018361 -57,5819579 0 0 19/01/2018 22:17 1,3 0 -0,01 0 -38,0183612 -57,581958 0 0 19/01/2018 22:17 1,4 0 0 0 -38,0183611 -57,581958 0 0 19/01/2018 22:17 1,51 0 0 0 -38,0183612 -57,5819582 0 0 19/01/2018 22:17 1,67 0 0 0 -38,0183614 -57,581958 0 0 19/01/2018 22:17 1,7 0 0 0 -38,0183616 -57,5819579 0 0 19/01/2018 22:17 1,8 0 0 0 -38,0183617 -57,5819579 0 0 19/01/2018 22:17 1,9 0 0 0 -38,0183617 -57,5819576 0 0 19/01/2018 22:17 2,07 0 0 0 -38,018362 -57,5819577 0 0