### Temporal Disaggregation

1. Hi Shishir,
I have gone through through your ARIMA blog.It is awesome and worth reading.
I want you to please through some light on Temporal disaggregation as well.
As right now i am looking for it to convert my bimonthly sales data to monthly.
Your help would highly appreciate..Eagerly waiting for it :)

2. Try Check this matlab routines:
https://www.mathworks.com/matlabcentral/fileexchange/39770-temporal-disaggregation-library
Try see tempdisagg in R:
https://cran.r-project.org/web/packages/tempdisagg/tempdisagg.pdf

3. If you want a quick quaterization here is quick python code.:

def year2quarter(x,method):
x = np.matrix(x)
ny = x.shape[0]
nv = x.shape[1]
nq = ny * 4
y = np.zeros((nq,nv))
for i in range (0,ny-1):
for j in range (0,4):
d = (x[i+1,:]-x[i,:])/4
y[4*i+j,:]=x[i,:]+j*d
# treatment of the first year values if they are zeros
for k in range (0,nv):
if x[0,k]==0:
y[0:4,k]=0
# treatment of the last year
if method == 1:
d = (np.zeros((1,nv))-x[ny-1,:])/4
for j in range (0,4):
y[4*(ny-1)+j,:]=x[ny-1,:]+j*d
elif method == 2:
for j in range (0,4):
y[4*(ny-1)+j,:]=x[ny-1,:]
return y