Skip to content

Manishms18/Air-Passengers-Time-Series-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Air-Passengers-Time-Series-Analysis

Forecasting number of passengers for airlines using ARIMA model in python. You can view the project demo on YouTube.

Table of contents

General info

Project was Time Series Analysis, used ARIMA method to build the model. Major steps involved were as follow :

  • STEP: 1 - Data Cleaning and Analysis
  • STEP: 2 - Checking Stationarity (ADF Test)
  • STEP: 3 - Transformation
  • STEP: 4 - Differencing
  • STEP: 5 - Time Series Components
  • STEP: 6 - Finding ACF and PACF
  • STEP: 7 - ARIMA Modeling
  • STEP: 8 - Forecast

Demo

Example screenshot

The entire demo of the project can be found on YouTube.

Screenshots

Example screenshot Example screenshot Example screenshot Example screenshot

Methods and Tools

  • Python
  • Advanced Excel
  • ARIMA
  • Augmented Dickey-Fuller Test
  • ACF and PACF
  • Statsmodels

Code Examples

# Code for Augemneted Dickey-Fuller Test and Rolling Mean to check stationarity  

def stationarity(timeseries):
    
    rolmean=timeseries.rolling(window=12).mean()
    rolstd=timeseries.rolling(window=12).std()
    
    plt.figure(figsize=(20,10))
    actual=plt.plot(timeseries, color='red', label='Actual')
    mean_6=plt.plot(rolmean, color='green', label='Rolling Mean') 
    std_6=plt.plot(rolstd, color='black', label='Rolling Std')
    plt.legend(loc='best')
    plt.title('Rolling Mean & Standard Deviation')
    plt.show(block=False)
    
    print('Dickey-Fuller Test: ')
    dftest=adfuller(timeseries['Passengers'], autolag='AIC')
    dfoutput=pd.Series(dftest[0:4], index=['Test Statistic','p-value','Lags Used','No. of Obs'])
    for key,value in dftest[4].items():
        dfoutput['Critical Value (%s)'%key] = value
    print(dfoutput)

Status

Project is: finished.

Contact

If you loved what you read here and feel like we can collaborate to produce some exciting stuff, or if you just want to shoot a question, please feel free to connect with me on email or LinkedIn

Reference

  • Edureka

About

TIME SERIES ANALYSIS : Forecasted number of passengers for next 10 years of airlines using ARIMA model in python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published