It is valid, but you must recognize that the variability will differ from week to week due to the varying sample size. Another approach is to scale the data for each week by the sqrt(sample size) to stabilize the variance. In either case, consider the assumptions required for the type of analysis you plan to do after you have the time series.