Aviation Trends#
The dataset used for this update is from Aviation Stack. We used their API layer to extract arrivals and departures from BEY. We plan on validating this data with aviation data from OAG. The data has already been validated with a dataset from FlightRadar for the 16th of August 2024. The numbers on both datasets align.
Define a function to get a range of dates for the desirable date range
end_date
datetime.datetime(2024, 11, 3, 13, 14, 47, 201324)
The following dates are not available in the data. The reasons are unknown.: DatetimeIndex(['2024-01-29', '2024-01-30', '2024-04-29', '2024-04-30',
'2024-06-07', '2024-06-08', '2024-06-09', '2024-09-02'],
dtype='datetime64[ns]', freq=None)
Analysing Number of Departures from Beirut International Airport in 2024#
Data is available from 2024-01-01 00:00:00 to 2024-11-03 00:00:00
# departures_exploded[departures_exploded['airport_arr']=='Beirut Rafic Hariri Airport']
Flight Status Legend#
Scheduled: A flight that we have a schedule or flight plan for that hasn’t departed or has been canceled.
Active: A flight that either left the gate or the runway and is on its way to its destination.
Landed or Arrived: A flight that landed on the runway or arrived at the gate at the destination.
Canceled: A flight that one or more data sources have indicated is canceled.
Redirected: The flight is being redirected to another airport.
Diverted: A flight that has landed or arrived at the gate of an airport where it wasn’t scheduled to arrive.
Unknown: We were unable to detect the final arrival status.
Findings#
On 14th April 2024, there was a temporary shutdown on Lebanese airspace between 7AM and 1PM. On that day, there were 17 flights that reported as landed. All the flights in the ‘Active’ status also donot have an ‘actual departure time’ recorded which could lead us to assume that some of them were either cancelled or never took off.
There is no flight data on 29th and 30th of January, 29th and 30th of April and 7th to 9th of June 2024.
Findings#
The airport with the most number of diversions is Amman. Flights to Cairo were scheduled but were either cancelled or diverted.
Flights to Frankfurt were cancelled the most. This could be because the Lufthansa group suspended flight to Lebanon in July.
Findings#
On 14th April 2024, there was a temporary shutdown on Lebanese airspace between 7AM and 1PM. On that day, there were 15 flights that reported as landed. All the flights in the ‘Active’ status also donot have an ‘actual arrival time’ recorded which could lead us to assume that some of them were either cancelled or never took off.
There is no flight data on 29th and 30th of January, 29th and 30th of April and 7th to 9th of June 2024.
Findings#
The number of departures than arrivals from the BEY airport
The number of cancellations, divertions and scheduled flights that were either cancelled or diverted increased since June 2024.
output_notebook()
from bokeh.layouts import column
from bokeh.models import Div
# Example datasets stored in a dictionary
datasets = {
"Most Changed Arrivals": most_changed_arrivals,
"Most Cancelled Arrivals": most_cancelled_arrivals,
"Most Scheduled Arrivals": most_scheduled_arrivals,
"Most Diverted Arrivals": most_diverted_arrivals
}
# Initialize an empty list to store the tabs
# List of colors to use for each dataset
colors = ["lightblue", "orange", "#023436", "#00BFB3"]
# Initialize an empty list to store the tabs
tabs = []
# Loop through each dataset and its corresponding color
for (title, data), color in zip(datasets.items(), colors):
# Convert data to ColumnDataSource for Bokeh plotting
source = ColumnDataSource(data)
# Create a figure for each dataset
p = figure(y_range=data['airportcity'], width=600, height=400, title=title + " in 2024", tools="save", toolbar_location="above")
p.hbar(y='airportcity', right='count', height=0.5, color=color, alpha=0.7, source=source)
# Add text inside the bars (5 points inside the bar)
p.text(x='count', y='airportcity', text='count', source=source,
x_offset=-5, # This places the text 5 units inside the bar
y_offset=-3, # Vertical alignment
text_align='right', text_baseline='middle', text_color="black", text_font_size="10pt")
# Customize plot (optional)
p.xaxis.visible = False
p.ygrid.visible = False
p.xgrid.visible = False
p.yaxis.major_tick_line_color = None # No major ticks
p.yaxis.minor_tick_line_color = None # No minor ticks
p.yaxis.axis_line_color = None
p.outline_line_color = None
subtitle = Div(text=f"<p style='font-size:12px; color:gray;'>Source: AviationStack. Acessed October 7th 2024.</p>", width=600)
layout = column(p, subtitle)
# Create a panel with the plot and the corresponding title
tab = TabPanel(child=layout, title=title)
# Append the panel to the list of tabs
tabs.append(tab)
# Arrange the tabs in a Tabs layout
tabs_layout = Tabs(tabs=tabs)
main_title = Div(text="<h2>Top 10 Destinations with Changes in Arrivals to BEY in 2024</h2>", width=800)
# Use column layout to stack the title on top of the tabs
layout = column(main_title, tabs_layout)
# Show the tabs
show(layout)
Findings#
Flights from Frankfurt were also cancelled the most potentially because of Lufthansa.
There were far fewer flights from Dubai, potentially because Emirates also shut down their services to Lebanon temporarily.