This project leverages Apache Spark to process and analyze flight data from JSON files. Using Jupyter Notebook, we load, clean, transform, and analyze the data to compute key performance indicators (KPIs) for flights and airports.
├── adsb.json # JSON file containing ADS-B flight data
├── oag.json # JSON file containing OAG flight data
├── Flight_Data_Analysis.ipynb # Jupyter Notebook for data processing and analysis
└── README.md # Project documentation
adsb.json: Contains ADS-B data with flight information likeAircraftId,Latitude,Longitude,Speed,Altitude, etc.oag.json: Contains OAG data with nested fields detailing scheduled departure and arrival times, delays, and flight status.
- Apache Spark
- Python 3.x
- Jupyter Notebook
- JSON files (
adsb.jsonandoag.json)
-
Install Apache Spark: Follow this guide to set up Apache Spark.
-
Install required Python packages:
pip install pyspark notebook
-
Launch Jupyter Notebook:
jupyter notebook
-
Open
Flight_Data_Analysis.ipynband follow the steps inside the notebook to execute the data processing and analysis.
The notebook performs the following tasks:
- Data Loading: Load
adsb.jsonandoag.jsondata into Spark DataFrames. - Data Cleaning: Remove null values and ensure consistent data types across columns.
- Data Transformation: Flatten nested data, convert types as necessary, and apply aggregations.
- Analysis: Calculate key metrics like average speed per airport, delayed flights, and the latest flight entry per flight ID.
The notebook produces tables and charts that summarize:
- Average Speed per airport
- Total Delayed Flights, categorized into arrival and departure delays
- Latest Flight Information for each flight ID
- The notebook contains code comments explaining each step in detail.
- Ensure that the JSON files (
adsb.jsonandoag.json) are in the same directory as the notebook.