I have a low-frequency time series of data on wind direction, originating from measurements three times a day (at 06, 12 and 18). I would like to match this time series on a high-frequency series of temperatures applying any kind of circular interpolation for the missing values. Could someone point me in the right direction how to achieve this?
The code below generates some sample data.
# create high-freq time series of temperature data
zw1 <- textConnection("datetime, temperature
01.01.2015 00:00, 1.1
01.01.2015 02:00, 0.8
01.01.2015 04:00, 0.7
01.01.2015 06:00, 0.5
01.01.2015 08:00, 0.2
01.01.2015 10:00, 0.6
01.01.2015 12:00, 2.3
01.01.2015 14:00, 2.7
01.01.2015 16:00, 2.4
01.01.2015 18:00, 1.5
01.01.2015 20:00, 0.4
01.01.2015 22:00, -0.5
02.01.2015 00:00, -0.8")
temps <- read.csv(zw1)
temps$datetime <- as.POSIXct(temps$datetime, format="%d.%m.%Y %H:%M")
# create low-freq time series of wind direction (circular data) to be interpolated
# onto the temperature data time series
zw2 <- textConnection("datetime, wind.direction
01.01.2015 06:00, 273
01.01.2015 12:00, 195
01.01.2015 18:00, 182
02.01.2015 06:00, 171")
wind <- read.csv(zw2)
wind$datetime <- as.POSIXct(wind$datetime, format="%d.%m.%Y %H:%M")