Part 1: Read the data
# reading external data and storing into a dataframe called "airline.df"
airline.df <- read.csv("BOMDELBOM.csv")
Part 2: Column names
# Display the column names
colnames(airline.df)
## [1] "FlightNumber" "Airline" "DepartureCityCode"
## [4] "ArrivalCityCode" "DepartureTime" "ArrivalTime"
## [7] "Departure" "FlyingMinutes" "Aircraft"
## [10] "PlaneModel" "Capacity" "SeatPitch"
## [13] "SeatWidth" "DataCollectionDate" "DateDeparture"
## [16] "IsWeekend" "Price" "AdvancedBookingDays"
## [19] "IsDiwali" "DayBeforeDiwali" "DayAfterDiwali"
## [22] "MarketShare" "LoadFactor"
Part 3: Data Dimensions
# Display the Data Dimensions
dim(airline.df)
## [1] 305 23
str(airline.df)
## 'data.frame': 305 obs. of 23 variables:
## $ FlightNumber : Factor w/ 63 levels "6E 129","6E 155",..: 25 32 62 4 61 45 57 16 59 17 ...
## $ Airline : Factor w/ 4 levels "Air India","IndiGo",..: 3 3 4 2 4 3 4 2 4 3 ...
## $ DepartureCityCode : Factor w/ 2 levels "BOM","DEL": 2 1 2 2 1 1 2 2 1 1 ...
## $ ArrivalCityCode : Factor w/ 2 levels "BOM","DEL": 1 2 1 1 2 2 1 1 2 2 ...
## $ DepartureTime : int 225 300 350 455 555 605 635 640 645 700 ...
## $ ArrivalTime : int 435 505 605 710 805 815 850 855 855 915 ...
## $ Departure : Factor w/ 2 levels "AM","PM": 1 1 1 1 1 1 1 1 1 1 ...
## $ FlyingMinutes : int 130 125 135 135 130 130 135 135 130 135 ...
## $ Aircraft : Factor w/ 2 levels "Airbus","Boeing": 2 2 2 1 2 2 2 1 2 2 ...
## $ PlaneModel : Factor w/ 9 levels "738","739","77W",..: 1 1 1 6 1 1 1 6 1 2 ...
## $ Capacity : int 156 156 189 180 189 156 189 180 189 138 ...
## $ SeatPitch : int 30 30 29 30 29 30 29 30 29 30 ...
## $ SeatWidth : num 17 17 17 18 17 17 17 18 17 17 ...
## $ DataCollectionDate : Factor w/ 7 levels "Sep 10 2018",..: 2 4 6 7 6 4 6 7 6 4 ...
## $ DateDeparture : Factor w/ 20 levels "Nov 6 2018","Nov 8 2018",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ IsWeekend : Factor w/ 2 levels "No","Yes": 1 1 1 1 1 1 1 1 1 1 ...
## $ Price : int 4051 11587 3977 4234 6837 6518 3189 4234 8623 6833 ...
## $ AdvancedBookingDays: int 54 52 48 59 48 52 48 59 48 52 ...
## $ IsDiwali : Factor w/ 2 levels "No","Yes": 2 2 2 2 2 2 2 2 2 2 ...
## $ DayBeforeDiwali : Factor w/ 2 levels "No","Yes": 2 2 2 2 2 2 2 2 2 2 ...
## $ DayAfterDiwali : Factor w/ 2 levels "No","Yes": 1 1 1 1 1 1 1 1 1 1 ...
## $ MarketShare : num 15.4 15.4 13.2 39.6 13.2 15.4 13.2 39.6 13.2 15.4 ...
## $ LoadFactor : num 83.3 83.3 94.1 87.2 94.1 ...