Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seat Matrix Generator Added #36

Merged
merged 1 commit into from
May 26, 2024

Conversation

dodedic
Copy link
Contributor

@dodedic dodedic commented May 25, 2024

@michaelweinold
So first of all: This is WIP, and still rough around the edges but this is so we can have the data ready to go for the poster. The code itself will be refined on Monday, and the next week. (like moving the API calls etc.)

We have 4 files which generate the matrices. All the matrices are on the OneDrive here.
They are saved in a matrix format and give the following number between the the airports:

Average Available Seats/flight in this week (AAS/week)

So there are 52 .csv files and they have numbers between 100-300 mostly.

I held off on using the Aircraft API for now with the exact numbers of each aircraft using its registration, since I noticed how little flights actually had the registration in the API response. Instead I made a missing_aircraft.py file which identifies all the aircraft models from the routes and then used ChatGPT to give me the average number of seats on those models. I spotchecked the aircraft and the numbers I got for the seats that ChatGPT gave me, and they look good. They are also combined with the benchmark list you gave me Michael.
Does this hold up for now?

Next the matrix_generator.py takes the info from the {airport}.json on the flights between cities and accesses the number of seats from the aircraft_seat_list.py to add them up over one week into one matrix and then divides them by the number of aircraft it added up.
Then it skips forward 7 days and makes the next matrix.

QUICK AND DIRTY DATA VALIDATION

So just as a sanity check I calculated the numbers for the route in a specific week.
KLAX-KSFO on 2023-06-01 gives us 136 AAS/flight in that week as per our matrix.
From our other API call I get 37.86 average daily flights in that week from KLAX to KSFO.

37.86*'136*'7 days = 36'043 AAS that week
36'043*'52 weeks*'2 directions=3'748'472 Available seats that year.
If we apply an average load factor of 83% from that time of the year. See this IATA metric..
Then we get: 3'111'232 PAX.

From OAG we get the following figure.
SEATS KLAX KSFO

To me that kinda doesn't look too bad to be honest. What do we think?

All files for generation of seat matrix added
@michaelweinold michaelweinold merged commit e3001a9 into sustainableaviation:main May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants