Plotting a moving average

We're going to be expanding on our knowledge of average by introducing the moving average. The moving average is simply the average of a subset of the data, where we have a small window in which we compute the average and then we move that window, and then we compute the average again. We keep repeating this until we've expended our data. So, in this section, we're going to take a look at creating line plots. We're going to introduce the moving average, and then we're going to plot a moving average. Let's go back to our notebook and continue from where we left off.

In the last section, the plot that we saw had a lot of + signs, and that doesn't make for an elegant graph. So, what we're going to do is to use a line ...

Get Getting Started with Haskell Data Analysis now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.