Canadian Aviation Data
Aviation incidents in Canada: 80 years of data
As stated by the International Civil Aviation Organization (ICAO), safety is the highest priority of all involved in aviation. The shared goal is for every flight to take-off and land safely, as happens more than 126,000 times every day. In 2018, the fatal accident rate was 0.28 per 1 million flights, the equivalent of one fatal accident for every 4.2 million flights.
The aviation industry is a complex collaboration of multiple fields, from manufacturers to commercial airlines. The air traffic is regulated and managed by different agencies, and service providers.
Data collection and analysis is a key factor in the safety management systems. It helps investigations and defines efficient regulations and procedures.
Content of this notebook
In this notebook, we will analyze aviation occurrence data provided by Transport Canada. We will download the data, and after some cleaning and organizing, we will show plots of multiple aspects of these events.
We will investigate the following points:
- Where did the incidents happen?
- What are the principal causes of aviation events?
- When did the incidents happen?
- What are the categories and consequences of accidents and incidents?
- What is the impact of environmental factors on aviation safety?
- Which flight phases are more dangerous?
- Which aircraft are more likely to be involved in events?
- How do flight plans, search and rescue operations impact aviation safety?
Before diving into the data, let's define some terminology:
Occurrence: Any event which is irregular, unplanned, or non-routine, including any aircraft accident, incident, or other occurrences.
Accident: An occurrence associated with the operation of an aircraft which takes place between the time any person boards the aircraft with the intention of flight until all such persons have disembarked, in which:
1- a person is fatally or seriously injured
2- the aircraft sustains damage or structural failure
3- the aircraft is missing or is completely inaccessible.
INCIDENT: An occurrence, other than an accident, associated with the operation of an aircraft that affects or could affect the safety of operation.
SERIOUS INCIDENT: An incident involving circumstances indicating that an accident nearly occurred.
# importing python libraries import urllib.request import pandas as pd import matplotlib.pyplot as plt import matplotlib import seaborn as sns import os import numpy as np import plotly.express as px # Setting plots parameters %matplotlib inline sns.set_style('darkgrid') matplotlib.rcParams['font.size'] = 18 matplotlib.rcParams['figure.figsize'] = (18, 10) matplotlib.rcParams['figure.facecolor'] = '#00000000' # import warnings warnings.filterwarnings("ignore")
Datasets used in this study
The data is divided into five (5) data frames:
- Occurrence table: This table contains data on the occurrence summary, including the date, time, and location of the occurrence, the occurrence type and category, the occurrence classification, the aircraft involved, the number of injuries/or fatalities, the weather conditions, and data relating to the landing and takeoff aerodrome or operating surface.
- Aircraft table: This table contains data about the involved aircraft, including its type, make, model, registration, and country of registration, aircraft’s engine(s), propellers, and rotors, data relating to an explosion, fire, fumes and/or smoke, operator information including the type of operator, type of flight plan, flight number, departure and destination, and air traffic service involvement.
- Injuries table: This table contains data on the number and severity of injuries resulting from the occurrence.
- Events and phases table: This table contains data about the phases of the occurrence flight and the events during the flight.
- Survivability table: This table contains data relating to the evacuation of the occurrence aircraft, the effectiveness of survival devices, and the systems for locating the occurrence aircraft.
All these tables are available as
data_dictionary table contains the definitions for each column in the data frames.
1st step: download the datasets
We use the
urllib library to download the
csv files. We start by defining the different URLs used in this project:
ref_url = 'https://www.bst-tsb.gc.ca/eng/stats/aviation/data-5.html' data_dictionary_url = 'https://www.bst-tsb.gc.ca/eng/stats/aviation/csv/ASISdb-dd.csv' occurence_table_url = 'https://www.bst-tsb.gc.ca/includes/stats/csv/Air/ASISdb_MDOTW_VW_OCCURRENCE_PUBLIC.csv' aircraft_table_url = 'https://www.bst-tsb.gc.ca/includes/stats/csv/Air/ASISdb_MDOTW_VW_AIRCRAFT_PUBLIC.csv' injuries_table_url = 'https://www.bst-tsb.gc.ca/includes/stats/csv/Air/ASISdb_MDOTW_VW_INJURIES_PUBLIC.csv' events_phases_table_url = 'https://www.bst-tsb.gc.ca/includes/stats/csv/Air/ASISdb_MDOTW_VW_EVENTS_AND_PHASES_PUBLIC.csv' survivability_table_url = 'https://www.bst-tsb.gc.ca/includes/stats/csv/Air/ASISdb_MDOTW_VW_SURVIVABILITY_PUBLIC.csv'