Factored out data smoothing into transform method