Skip to content

About

Machine learning project for analyzing Saudi aviation data and predicting passenger demand.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

Repository files navigation

Saudi Aviation Intelligence

An end-to-end machine learning and data analytics project for exploring historical aviation activity and predicting passenger traffic using Saudi aviation data.

The project covers the full data science workflow, including dataset auditing, data preprocessing, exploratory data analysis, feature engineering, model development, model evaluation, and deployment through an interactive Streamlit application.

Live Application

The trained model is deployed through an interactive Streamlit application

Live App:
https://saudi-aviation-intelligence.streamlit.app

The application includes two main components:

  • Historical Aviation Overview: Summarizes passenger and flight activity across the dataset.

  • Passenger Traffic Prediction: Allows users to define an aviation scenario and estimate passenger traffic using the trained machine learning model.

  • Historical Aviation Overview

Historical Aviation Overview

Passenger Traffic Prediction

Passenger Traffic Prediction


Project Overview

The objective of this project is to analyze patterns in Saudi aviation traffic and develop a machine learning model capable of estimating passenger volume from operational flight information.

The project was designed as a complete applied machine learning workflow rather than only a modeling exercise. It includes:

  • Dataset inspection and auditing
  • Data cleaning and preprocessing
  • Exploratory data analysis
  • Feature preparation
  • Model development and comparison
  • Model evaluation
  • Feature importance analysis
  • Model serialization
  • Interactive application development
  • Cloud deployment

Dataset

The processed dataset contains 6,128 observations describing aviation traffic from 2021 to 2026.

Features used for passenger prediction include:

  • Direction (IN / OUT)
  • Flight type (Domestic / International)
  • Year
  • Month
  • Destination city
  • Total number of flights

The prediction target is:

  • Total Passengers

Categorical variables are transformed using one-hot encoding, while numerical variables are passed directly to the regression models.

Exploratory Data Analysis

Exploratory analysis was conducted to examine:

  • Passenger traffic over time
  • Flight volume
  • Domestic and international aviation activity
  • Inbound and outbound traffic
  • Destination-level patterns
  • Monthly and yearly trends
  • Relationships between flight volume and passenger volume

The analysis showed a particularly strong relationship between total flight volume and passenger traffic.

Machine Learning

The modeling task is formulated as a supervised regression problem.

Three regression approaches were evaluated:

  1. Baseline model
  2. Linear Regression
  3. Random Forest Regression

The dataset was divided into:

  • 80% training data: 4,902 observations
  • 20% testing data: 1,226 observations

Model performance was evaluated using:

  • Mean Absolute Error (MAE)
  • Root Mean Squared Error (RMSE)
  • R² score

Model Results

Model MAE RMSE R²
Baseline 40,061.65 110,384.57 -0.0004
Linear Regression 4,157.50 13,506.95 0.9850
Random Forest 3,077.61 12,875.56 0.9864

Random Forest achieved the best overall test performance and was selected as the final model.

Its R² score of 0.9864 indicates that the model explains approximately 98.64% of the variation in passenger traffic within the held-out test data.

Feature Importance

Random Forest feature importance analysis identified Total Number of Flights as the dominant predictive feature.

Other features, including year, month, flight type, and destination, contributed additional information to the model.

This result is consistent with the strong relationship between flight activity and passenger volume observed during exploratory analysis.

Interactive Application

The project includes a Streamlit application that provides an interface for interacting with the analysis and trained model.

Historical Aviation Overview

The dashboard displays:

  • Total passengers
  • Total flights
  • Number of destinations
  • Dataset period
  • Historical passenger traffic over time

Passenger Traffic Prediction

Users can provide:

  • Direction
  • Flight type
  • Year
  • Month
  • Destination city
  • Total number of flights

The application processes these inputs through the same preprocessing and Random Forest pipeline used during model development and returns an estimated passenger count.

Project Structure

Saudi-Aviation-Intelligence/
│
├── app/
│   └── app.py
│
├── models/
│   └── passenger_random_forest.joblib
│
├── notebooks/
│   ├── 01_dataset_audit.ipynb
│   ├── 02_data_preprocessing.ipynb
│   ├── 03_exploratory_analysis.ipynb
│   └── 04_modeling.ipynb
│
├── processed/
│   └── flights_clean.csv
│
├── screenshots/
│   ├── overview.png
│   └── prediction.png
│
├── raw_data/
├── reports/
├── src/
│
├── .gitignore
├── README.md
└── requirements.txt

Technologies

  • Python
  • pandas
  • NumPy
  • scikit-learn
  • Matplotlib
  • Streamlit
  • joblib
  • Jupyter Notebook
  • Git
  • GitHub

Running the Application

1. Clone the repository

git clone https://github.com/R33m0/Saudi-Aviation-Intelligence.git
cd Saudi-Aviation-Intelligence

2. Install the required packages

pip install -r requirements.txt

3. Run the Streamlit application

pip install -r requirements.txt

Run the Streamlit application locally:

streamlit run app/app.py

Reproducibility

The notebooks are organized sequentially:

01_dataset_audit.ipynb
        ↓
02_data_preprocessing.ipynb
        ↓
03_exploratory_analysis.ipynb
        ↓
04_modeling.ipynb
        ↓
app/app.py

Technologies Used

  • Python
  • pandas
  • NumPy
  • scikit-learn
  • Matplotlib
  • Streamlit
  • Jupyter Notebook
  • joblib

Model Limitations

The model's predictions are based on patterns present in the historical dataset. Predictions for scenarios substantially different from the training data should therefore be interpreted cautiously.

Feature importance analysis also showed that total flight volume accounts for the majority of the Random Forest model's predictive importance. As a result, predictions are strongly influenced by the number of flights provided.

The model should be considered a data-driven estimation tool rather than a real-time aviation forecasting system.

Future Development

Potential extensions of the project include:

  • Integration of additional aviation and airport-level features
  • Incorporation of external factors that may affect passenger demand
  • Time-series forecasting for future passenger traffic
  • Additional model comparison and hyperparameter optimization
  • Expanded interactive visualizations
  • Deployment of the application for public access

Disclaimer

This project was developed for educational, research, and portfolio purposes.

The passenger estimates generated by the application should not be interpreted as official aviation statistics or operational forecasts.

Author

Reem Abdulrahman Independent machine learning and data analytics project

About

Machine learning project for analyzing Saudi aviation data and predicting passenger demand.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages