In this chapter, we will use the temperature dataset of Massachusetts; this public dataset was downloaded from http://cdiac.ornl.gov/. This dataset holds the maximum temperature recorded at Massachusetts on a daily basis from 1980 to 2010. The temperature in this dataset is rounded off to an integer and the missing values are represented as NA. We will use this dataset to learn about the techniques involved in the forecasting algorithm.
Note
Note that changes in terms of representation of the data have been made to make the dataset more R-friendly in terms of reading and computing.
Let's have a look at the dataset by reading the dataset to the R environment:
# reading the dataset data <- read.csv("Data/msdata.csv") head(data, 10)
The output of the preceding code is as follows:
The preceding dataset needs some modifications, such as the date
format has to be changed to one that will be supported for the time series analysis and the missing values in the dataset have to be replaced...