Skip to content

About

Python project for analyzing airport departure CSV data with validation, reporting, and histogram visualization.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

Airport Data Analysis Project

A Python-based airport departure analysis system that processes CSV datasets from a 12-hour European airport survey period.

Overview

This project allows the user to load airport flight data by entering a valid airport code and year.
The program then analyzes the selected dataset, displays the required results in the shell, saves them to a text file, and generates a histogram for a selected airline using graphics.py.

Features

  • Validates airport code input
  • Validates year input
  • Loads correctly named CSV files
  • Analyzes airport departure data
  • Displays key results in the shell
  • Saves results to results.txt
  • Draws a histogram for a selected airline
  • Allows repeated analysis of multiple CSV files in one run

Analysis Performed

The program calculates:

  • Total number of flights
  • Total number of Terminal 2 departures
  • Total number of flights under 600 miles
  • Total number of Air France departures
  • Total number of flights in temperatures below 15°C
  • Average number of British Airways departures per hour
  • Percentage of British Airways flights
  • Percentage of delayed Air France departures
  • Number of rainy hours
  • Least common destination(s)

Technologies Used

  • Python
  • CSV file handling
  • graphics.py

Project Files

  • airport_analysis.py – main Python program
  • graphics.py – graphics library used for the histogram
  • *.csv – airport datasets used as input
  • results.txt – output file generated by the program

How to Run

  1. Place the Python file, graphics.py, and the CSV files in the same folder
  2. Open the project in Python IDLE
  3. Run the Python file
  4. Enter a valid three-letter airport code
  5. Enter a valid year
  6. View the calculated results
  7. Enter a valid airline code to display the histogram
  8. Choose whether to process another file

Example Inputs

  • Airport code: LHR
  • Year: 2025
  • Airline code: BA

Notes

  • Airport and airline codes are validated before processing
  • Lowercase input is accepted and converted
  • Results are appended to results.txt instead of overwriting previous runs
  • The histogram is created using graphics.py only

Purpose

This project was developed as part of a Python programming coursework task focused on:

  • input validation
  • file handling
  • list processing
  • calculations
  • text file output
  • simple graphical visualization

Author

Tharush Ranasinghe
Software Engineering Undergraduate

About

Python project for analyzing airport departure CSV data with validation, reporting, and histogram visualization.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages