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

**URL:** <https://discourse.julialang.org/t/package-for-resampling-of-an-unevenly-spaced-time-series-to-an-evenly-spaced-time-series/28110>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [August 28, 2019, 2:01pm UTC](https://discourse.julialang.org/t/package-for-resampling-of-an-unevenly-spaced-time-series-to-an-evenly-spaced-time-series/28110 "2019-08-28T14:01:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Volker](https://avatars.discourse-cdn.com/v4/letter/v/77aa72/32.png) [@Volker](https://discourse.julialang.org/u/Volker)\
**Post date:** [August 28, 2019, 2:01pm UTC](https://discourse.julialang.org/t/package-for-resampling-of-an-unevenly-spaced-time-series-to-an-evenly-spaced-time-series/28110/1 "2019-08-28T14:01:14Z")

</div>

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

Example:

from

```julia
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

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

```

---

<div class="post-metadata">

**Author:** ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Post date:** [August 28, 2019, 2:04pm UTC](https://discourse.julialang.org/t/package-for-resampling-of-an-unevenly-spaced-time-series-to-an-evenly-spaced-time-series/28110/2 "2019-08-28T14:04:28Z")

</div>

Interpolations.jl?  
[https://github.com/JuliaMath/Interpolations.jl](https://github.com/JuliaMath/Interpolations.jl)

---

<div class="post-metadata">

**Author:** ![Volker](https://avatars.discourse-cdn.com/v4/letter/v/77aa72/32.png) [@Volker](https://discourse.julialang.org/u/Volker)\
**Post date:** [August 28, 2019, 2:13pm UTC](https://discourse.julialang.org/t/package-for-resampling-of-an-unevenly-spaced-time-series-to-an-evenly-spaced-time-series/28110/3 "2019-08-28T14:13:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [August 28, 2019, 3:00pm UTC](https://discourse.julialang.org/t/package-for-resampling-of-an-unevenly-spaced-time-series-to-an-evenly-spaced-time-series/28110/4 "2019-08-28T15:00:18Z")

</div>

For example:

```julia
julia> using Interpolations

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

```
