daru icon indicating copy to clipboard operation
daru copied to clipboard

Resampling timeseries data

Open FourSeventy opened this issue 6 years ago • 0 comments

I want to resample a vector containing timeseries data into one with discrete time intervals. I'm having trouble figuring out if this is possible in daru.

For example if I have a data set like this

  [DateTime.new(2014,5,15,9), 56],
  [DateTime.new(2014,5,16,9,6), 57],
  [DateTime.new(2014,5,19,8,57), 61]

I want to resample it to look like this

2014-05-15T09:00:00+00:00: 56.0                 # exact value
2014-05-16T09:00:00+00:00: 56.995496729398646   # interpolated value
2014-05-17T09:00:00+00:00: 58.18937752978536    # interpolated value
2014-05-18T09:00:00+00:00: 59.55365781173006    # interpolated value
2014-05-19T09:00:00+00:00: 61.0030489943531     # extrapolated value

Thank you

FourSeventy avatar Jan 16 '19 19:01 FourSeventy