Time series processing

Merging this so that I can keep using the notebook with time series stuff.