AirRoute AI is a lightweight personal project to simulate and predict the best airline routes globally, using price data, route information, and load factor estimation. It supports both local execution and cloud-based notebooks (like Kaggle).
airroute-ai/
├── data/ # Raw datasets (e.g. OpenFlights routes)
├── notebooks/ # Jupyter/Kaggle notebooks for exploration
├── src/ # Source code
│ ├── api_clients/ # Mock or real API integration
│ ├── models/ # Prediction model logic
│ ├── processing/ # Data loading and transformation
│ └── utils/ # Optional helpers
├── tests/ # Test cases (to be added)
├── config/ # Configs or secrets (optional)
├── requirements.txt # Project dependencies
└── README.md # This file
Requires Python 3.8+
(Recommended) Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
Install all required packages:
pip install -r requirements.txt
Main dependencies:
- requests
- pandas
- numpy
- scikit-learn
- matplotlib
- openpyxl
- streamlit
Download routes.csv
from OpenFlights on Kaggle and place it at data/routes.csv
.
Run the ingestion script to generate mock pricing data:
python src/processing/ingest_daily.py
This will create data/daily_prices.csv
.
Launch the interactive web tool:
streamlit run app.py
This opens the app in your browser for flight price exploration.
Start Jupyter:
jupyter notebook
Open notebooks/explore_openflights.ipynb
. The notebook will auto-detect the environment.
For mock/demo mode, no environment variables are needed. If you plan to use real APIs or sensitive data, create a .env
file or add configs under config/
as required.
Upload your src/
, notebooks/
, and requirements.txt
to a new Kaggle Notebook. Add the OpenFlights airline-route-database dataset as a Dataset in the notebook settings.
The notebook notebooks/explore_openflights.ipynb
will detect if running on Kaggle and set correct paths automatically.
If any required package is missing, install it with:
!pip install scikit-learn matplotlib openpyxl
Execute notebook cells step by step to explore data, generate mock prices, and train models.
jupyter notebook
Navigate to notebooks/explore_openflights.ipynb
.
Ensure data/routes.csv
exists as described above. The notebook will auto-detect and use the local data path.
Execute cells to explore airline routes, simulate prices, and train predictive models.
- Simulates pricing using a mock API
- Loads global airline routes
- Trains a simple predictive model using scikit-learn
- Future support for real APIs and better load factor proxies
- If you see import errors, ensure you're in the project root and your virtual environment is active.
- If
streamlit
orjupyter
are not found, double-check that installation succeeded (pip install -r requirements.txt
). - For Windows, use
venv\Scripts\activate
to activate your virtual environment.
Created for experimentation and learning.