Project - Proposed Analytics Approach

Updated 14 Oct 2026

5 Proposed Analytics Approach

5.1 Tools and Platform

With approximately 54.7 million flight records, the dataset is too large for efficient analysis on a single machine with tools such as pandas. The project therefore uses a cloud-based big data pipeline on Amazon Web Services (AWS), which separates storage, cataloguing, querying, and distributed processing.

ComponentRole in the project
Amazon S3Central data lake. Holds the raw CSV files (raw zone), the cleaned and converted data (curated zone), and analysis outputs (results zone).
AWS GlueGlue Crawlers scan the S3 data and register table schemas in the Glue Data Catalog. Glue ETL jobs (PySpark) clean the data and convert it from CSV to Parquet, partitioned by YEAR and MONTH.
Amazon AthenaServerless SQL engine over the catalogued Parquet tables. Used for exploratory analysis and large aggregations such as flight counts and delay rates by airport, carrier, route, and time period.
Amazon EMR (Apache Spark)Distributed processing for heavier and iterative workloads: feature engineering, clustering and classification with Spark MLlib, and time-series preparation.
Python (matplotlib / seaborn)Visualization of aggregated results exported from Athena and EMR.

Pipeline overview:

Kaggle (CSV) → S3 raw zone → Glue Crawler → Glue ETL (clean, CSV → Parquet, partition by YEAR/MONTH)
    → S3 curated zone → Athena (SQL exploration & aggregation)
                      → EMR / Spark MLlib (clustering, classification, time series)
    → S3 results zone → Visualization

Converting to columnar Parquet and partitioning by time means Athena and Spark read only the columns and partitions each query needs. This reduces query time and cost, since Athena charges by the amount of data scanned. The shared Glue Data Catalog lets Athena and EMR work on the same tables without duplicating schema definitions.

5.2 Data Preparation

Data preparation is performed in AWS Glue ETL jobs and consists of the following steps:

  • Missing values: Weather attributes are missing for about 0.03% of records. These records are excluded from weather-related analysis but kept for all other analyses. Airports with 100% missing weather data (GUM, PPG) are excluded from the weather analysis.
  • Time conversion: Time fields stored as HHMM (CRS_DEP_TIME, DEP_TIME, WHEELS_OFF, WHEELS_ON, CRS_ARR_TIME, ARR_TIME) are converted to minutes after midnight, with handling for flights that cross midnight.
  • Derived features:
    • Hour-of-day bins
    • Weekend and U.S. holiday flags
    • A COVID-period flag
    • Total taxi time (TAXI_OUT + TAXI_IN)
    • Schedule padding (ACTUAL_ELAPSED_TIME − CRS_ELAPSED_TIME)
    • In-air delay recovery (DEP_DELAY − ARR_DELAY)
    • Categorical weather severity levels for precipitation and wind speed
  • Delay definition: Following the U.S. Department of Transportation standard, a flight is considered delayed if ARR_DELAY ≥ 15 minutes. Because delay distributions are heavily right-skewed, delay severity is reported using the median and 90th percentile alongside the mean.

5.3 Analytical Techniques

Analysis areaTechniquePlatform
Flight volume and schedulesDescriptive aggregation by year, month, day of week, and hour, across airports, routes, and carriers; hour × day-of-week heatmapsAthena
Operational performanceComparison of scheduled vs. actual times; distributions of schedule padding, taxi time, and in-air recovery by airport and carrierAthena
Delay locations and timingDelay rate and severity rankings (with minimum-volume thresholds); K-means clustering of airports by delay profileAthena, EMR (MLlib)
Weather impactDelay rates compared across weather severity levels at origin and destination; weather feature importance from the classification modelAthena, EMR (MLlib)
Trends and anomaliesTime series decomposition (trend, seasonality, residual) of daily flight volume and delay rate; anomaly detection using residual z-scoresEMR (Spark + Python)

Clustering. Airports are grouped with K-means using features such as flight volume, delay rate, 90th-percentile delay, and average taxi time. The goal is to identify groups of airports with similar operational behaviour, for example high-volume punctual hubs versus chronically congested airports. The number of clusters is chosen with the elbow method and silhouette score.

Classification. A model predicts whether a flight will be delayed (≥ 15 minutes) using only information available before departure: carrier, origin, destination, scheduled hour, day of week, month, distance, and origin/destination weather. Logistic regression serves as a baseline, and gradient-boosted trees are the main model, both trained with Spark MLlib. Several design decisions apply:

  • Leakage prevention: Fields only known after departure (DEP_TIME, DEP_DELAY, TAXI_OUT, WHEELS_OFF, and so on) are excluded.
  • Class imbalance: About 18% of flights are delayed. This is handled with class weighting.
  • Evaluation: Models are evaluated with F1-score and area under the precision–recall curve.
  • Train/test split: A time-based split is used, with earlier years for training and later years for testing, to reflect real-world use.

The model's feature importances also indicate which factors are most strongly associated with delays.

Time series analysis and anomaly detection. Daily and monthly series of flight volume and delay rate are decomposed into trend, seasonal, and residual components. Days or months whose residuals deviate strongly from normal (|z| > 3) are flagged as anomalies and cross-checked against known events such as holidays, major weather events, and the COVID-19 period.

5.4 Expected Results and Insights

Based on the initial exploration in Section 4, the project expects the following findings:

  1. Time-of-day effect: Delays accumulate over the day, so evening flights show higher delay rates and longer delays than early-morning flights.
  2. Seasonality: Delay rates peak in summer (June–August) and around December, consistent with the seasonal pattern already visible in the monthly "% late" series.
  3. Airport groups: Clustering reveals distinct groups of airports. Several large hubs are expected to form a high-volume, high-delay group.
  4. Weather impact: Higher precipitation and wind speed are associated with higher delay rates, although weather is expected to be a weaker predictor than time of day, airport, and carrier.
  5. Anomalies: The 2020 COVID-19 collapse in flight volume appears as the dominant structural anomaly, followed by a distinct recovery period. Shorter anomalies are expected around major holidays and severe weather events.

Deliverables:

  • A cloud data pipeline on AWS (S3, Glue, Athena, EMR)
  • A set of visualizations describing flight volume, performance, and delay patterns
  • Airport clusters and their characteristics
  • A delay classification model with feature importance analysis
  • A list of detected anomalous periods with explanations