Package for resampling of an unevenly spaced time series to an evenly spaced time series

Does somebody know a package, which can convert an unevenly spaced time series to an evenly spaced time series ?

Example:

from

time = [0.0, 0.03, 0.08, 1.1, 1.4, 1.7, 2.0]
u = [1.0, 1.2, 2.5, 7.8, 10.0, 12.0, 12.5]

to

time = [0.0,0.01, 0.02, 0.03, ..., 1.97, 1.98, 1.99, 2.0]
u = [1.0, ...]

Interpolations.jl?
https://github.com/JuliaMath/Interpolations.jl

2 Likes

I also have thought about interpolation, when I would implent it myself, but I thought there would be maybe a package, which I can use on DataFrames. So that I just hand the unevenly spaced dataframe and the method returns the evenly spaced dataframe.

For example:

julia> using Interpolations

julia> LinearInterpolation(time, u).(0.0:0.01:2.0)
2 Likes