The Flight Tracking App is a real-time flight visualisation platform built with Python and Streamlit. It utilises live data from the OpenSky API to display current flight information and geographical positions on an interactive map. This app is designed for aviation enthusiasts, researchers, and professionals to monitor flights with ease.
FlightTrackingApp
├── assets/
│ ├── data/
│ │ └── airports.csv
│ ├── dataCleaning/
│ │ └── flightTrackingAppLogicFlow.ipynb
│ ├── gifs/
│ │ └── flights.gif
│ └── images/
│ ├── airplane.png
│ └── flights.png
├── streamlit_app/
│ ├── modules/
│ │ ├── styles.py
│ │ └── utils.py
│ └── app.py
├── LICENSE
├── README.md
└── requirements.txt
The Flight Tracking App is developed using the following tools and frameworks:
- Streamlit - To create a seamless and user-friendly web interface.
- Folium - To render an interactive map for visualising flight data.
- Pandas - To handle and process live flight and airport data.
- OpenSky API - To retrieve real-time flight information.
- Geopy - To compute distances and identify nearby airports.
- GitHub - To store assets like images and manage project files.
- Custom Modules -
styles.py
andutils.py
for background styling and data processing.
The Flight Tracking App leverages the following data sources:
-
- Provides real-time flight states (latitude, longitude, altitude, callsign, etc.) for active flights.
- Supplies data used to filter and track flights based on the airline and location.
-
- A static dataset containing details of global airports (latitude, longitude, names, and identifiers).
- Enables nearest airport computation for flights.
-
- A dataset containing airline names and ICAO codes.
- Helps in identifying and filtering flights by airline callsigns.
- Airline Selection: Users select an airline from a dropdown menu populated with active airlines using their ICAO codes (e.g., RYR for Ryanair).
- Data Processing:
- Real-time flight data is fetched using the OpenSky API.
- Flights are filtered based on the selected airline and geographical coordinates.
- Nearest airports are computed using geopy for flights close to the ground.
- Visualisation:
- The filtered flights are displayed on an interactive Folium map.
- A detailed table of flight data (callsign, altitude, speed, position, and estimated arrival) is presented below the map.
- Map Interaction:
- Users can hover, zoom, or pan the map to explore flight positions dynamically.
- Each flight marker displays additional details like callsign and destination on hover.
- Clone the repository:
git clone https://github.com/josericodata/FlightTrackingApp.git
Hint: Replace user
with josericodata
in the URL above. I am deliberately asking you to pause here so you can support my work. If you appreciate it, please consider giving the repository a star or forking it. Your support means a lot—thank you! 😊
- Navigate to the project directory:
cd FlightTrackingApp
- Create a virtual environment:
python3 -m venv venvFlightTrackingApp
- Activate the virtual environment:
source venvFlightTrackingApp/bin/activate
- Install requirements:
pip install -r requirements.txt
- Navigate to the app directory:
cd streamlit_app
- Run the app:
streamlit run app.py
The app will be live at http://localhost:8501
The Flight Tracking App is built and tested using the following software environment:
- Operating System: Ubuntu 22.04.5 LTS (Jammy)
- Python Version: Python 3.10.12
Ensure your environment matches these specifications to deploy the app successfully.
- API Keys: Ensure that the OpenSky API is reachable and has sufficient capacity for data retrieval.
- Assets: Background and map marker images are hosted on GitHub. The URLs must be valid and accessible in the deployment environment.
Planned improvements include:
- Flight Path Prediction: Integrate machine learning models to predict flight paths.
- Custom Filters: Allow users to filter by altitude, speed, or specific regions.
- Historical Data Analysis: Incorporate historical flight data for trend analysis.
- Callsign: Unique identifier for the flight.
- Departing From: Country of origin.
- Estimated Arrival: Airport where the flight is heading (if close to descent).
- Time Position: Time when the position was recorded (UTC).
- Altitude (m): Barometric altitude in meters.
- Speed (km/h): Current velocity of the aircraft.
- Longitude/Latitude: Geographical position of the flight.
- ICAO24: Unique identifier for the aircraft.
To better understand the logic and data processing pipeline used in the Flight Tracking App, a Jupyter Notebook has been created. It provides a detailed walkthrough of the data cleaning, exploration, and preparation steps, ensuring transparency and reproducibility in the app's development.
You can explore the notebook here: FlightTrackingAppLogicFlow.ipynb
This notebook covers:
- Loading and inspecting OpenSky Network data.
- Filtering flights based on airline codes (callsigns).
- Deriving attributes like departure and estimated arrival.
- Data transformation for real-time visualisation.
The Flight Tracking App relies on real-time flight data from the OpenSky Network API. Occasionally, the OpenSky API may experience downtime, returning a 503 Service Temporarily Unavailable error.
If you encounter this issue, please wait a few minutes and try again. You can also check the OpenSky Network website:
🔗 https://opensky-network.org
We appreciate your patience! 🚀
If you find any bug, feel free to contact me by opening a pull request on GitHub or via email at maninastre@gmail.com.
This app is a personal project designed to demonstrate data visualisation and real-time processing capabilities. It should not be used for operational flight tracking or aviation safety purposes.
Enjoy exploring the skies with the Flight Tracking App!