I have a time series of hourly measurements for a duration of one year:
time <- 1:(365*24)/24 set.seed(1) x <- rnorm(length(time))
The measurements are taken at hourly intervals. The main periodicity for the time series is that of a diurnal cycle i.e. the temperature follows a daily pattern. However, I would like to show that the 'power' of this expected frequency varies in time, i.e. being greater during some days in comparison to others. To achieve this I was thinking of running a window over the time series, computing a periodogram for each day (i.e. each 24 rows) showing that the periodicity of 1/24 explains less of the variation in the data during certain times of the year. I am new to R so have a rather basic knowledge of how to produce a script for this.