Resampling time series data