Lesson 20. Capstone: Time series
This capstone covers
- Learning the basics of time-series analysis
- Combining multiple time series with Monoid and Semigroup
- Using Map to solve problems of duplicate values in a time series
- Avoiding errors involving missing values by using Maybe
In this capstone, you’ll model time-series data by using tools you’ll build in Haskell. Time-series data is, in theory, relatively simple: it’s a series of values and dates for each piece of data. Figure 20.1 presents sales data from the Box & Jenkins data set that’s commonly used to demonstrate a time series (the data used in this capstone is also a subset of the first 36 months of this same data).
Although conceptually easy to work with, in practice time-series data presents many interesting challenges. Often you’re missing data, need to combine multiple incomplete data sets, and then need to perform analytics on this messy data, which often requires other transformations to make sense of. In this capstone, you’ll use the techniques covered in this unit to make tools for working with time-series data. You’ll explore how to combine multiple time series into one, take summary statistics (such as the average) of time-series data with missing values, and conclude by performing transformations on your data such as smoothing to eliminate noise.