# Reducing data set resolution

Do you know what it's called when you want to take a high resolution data set and reduce it to a smaller data set by averaging points?

I have GPS data and need to take an average elevation over every 0.1 miles and store it. I'm using brute force looping in JavaScript but thought maybe there's a named function for it or a smarter mathematical procedure I should try?

Objective: create a clean data set of elevation points I can display as an elevation profile line.

Challenge: the GPS data point distances (x axis) are non-uniform. I need to average them into 0.1 mile samples and return an array of elevation points that are each an average of a 0.1 mile sample, however many source data points contributed only matters when averaging per point.

• Perhaps binning ? – Henry Jul 4 '17 at 18:52
• Do you have an example of this? The term seems to fit the task. – clayperez Jul 4 '17 at 20:14

If the true elevation is not extremely variable from one bin to another, but you suspect the GPS readings might be a bit noisy, then you might revise these average bin elevations by some sort of running average. Maybe for the $i$th bin in a sequence, give weight $1/2$ to the $i$th elevation and weights $1/4$ to each of the neighboring bins, $(i-1)$st and $(i+1)$st. If you feel uneasy about arbitrary divisions into 0.1-mile bins, some such moving average would tend to decrease the effect of the arbitrary choice.