Time Series: Predict the Web Traffic

Here are some approaches for predicting the time series:

  1. Periodic Cycles in the Data
    Think in terms of periodicity of the waveform of the data. There are two cycles. The first one is the cycle over the week. It is generally a hump, lowest on the weekends, and reaching a peak on Tuesday or Wednesday.

  2. Fourier Series Based Solution This involves using the fast fourier transform (FFT) available in numpy, if you're using Python. The idea is to transform the data into the frequency domain and then obtain a polynomial to obtain the next 30 values in the series. This discussion on Stackoverflow might help you understand and implement this approach.

  3. AutoRegressive Integrated Moving Averages This is the ARIMA Model popularly used for predicting time series involving a forecasting equation based on a linear (regression-style) equation. This is a useful slide deck about time series methods in Python. You may use the "arma_generate_sample" from "statsmodels.tsa.arima_process".

  4. Series Based Approaches
    This might not be as effective as more complex statistical methods. It simply estimates the week to week percentage change over the last couple of weeks. Then, it repeats the last 30 datapoints of the input data, multiplied by the percentage increase computed on a week to week basis.


  1. Challenge Walkthrough
    Let's walk through this sample challenge and explore the features of the code editor.1 of 6
  2. Review the problem statement
    Each challenge has a problem statement that includes sample inputs and outputs. Some challenges include additional information to help you out.2 of 6
  3. Choose a language
    Select the language you wish to use to solve this challenge.3 of 6
  4. Enter your code
    Code your solution in our custom editor or code in your own environment and upload your solution as a file.4 of 6
  5. Test your code
    You can compile your code and test it for errors and accuracy before submitting.5 of 6
  6. Submit to see results
    When you're ready, submit your solution! Remember, you can go back and refine your code anytime.6 of 6
  1. Check your score