sfo_passengers.Rd
Monthly summary of number of passengers in San Francisco International Airport (SFO)
sfo_passengers
A data frame with 12 variables.
Activity year and month in YYYYMM format
Airline name for the aircraft operator
The International Air Transport Association (IATA) two-letter designation for the Operating Airline
Airline name that issues the ticket and books revenue for passenger activity
The International Air Transport Association (IATA) two-letter designation for the Published Airline
The flights’ classification by domestic for flights that arrived from or departed to a destination within the United States and international for destinations outside the United States
The flight origin/destination geographic region details
A description of the physical action a passenger took in relation to a flight, which includes boarding a flight (“enplanements”), getting off a flight (“deplanements”) and transiting to another location (“intransit”)
A categorization of whether a Published Airline is a low-cost carrier or not a low-cost carrier
The airport’s terminal designations at SFO where passenger activity took place
The airport’s boarding area designations at SFO where passenger activity took place
The number of monthly passengers associated with the above attribute fields
San Francisco data portal (DataSF) website.
The dataset contains the monthly summary of number of passengers in San Francisco International Airport (SFO)
data(sfo_passengers)
require(dplyr)
# Get summary of total number of passengers by activity type
# in most recent month
sfo_passengers %>%
filter(activity_period == max(activity_period)) %>%
group_by(activity_type_code) %>%
summarise(total = sum(passenger_count), .groups = "drop")
#> # A tibble: 3 × 2
#> activity_type_code total
#> <chr> <int>
#> 1 Deplaned 1830374
#> 2 Enplaned 1907342
#> 3 Thru / Transit 8442
# Get summary of total number of passengers by
# activity type and geo region in most recent month
sfo_passengers %>%
filter(activity_period == max(activity_period)) %>%
group_by(activity_type_code, geo_region) %>%
summarise(total = sum(passenger_count), .groups = "drop")
#> # A tibble: 19 × 3
#> activity_type_code geo_region total
#> <chr> <chr> <int>
#> 1 Deplaned Asia 147461
#> 2 Deplaned Australia / Oceania 45950
#> 3 Deplaned Canada 53237
#> 4 Deplaned Central America 12749
#> 5 Deplaned Europe 124301
#> 6 Deplaned Mexico 64121
#> 7 Deplaned Middle East 28921
#> 8 Deplaned US 1353634
#> 9 Enplaned Asia 166684
#> 10 Enplaned Australia / Oceania 44286
#> 11 Enplaned Canada 57280
#> 12 Enplaned Central America 15475
#> 13 Enplaned Europe 135635
#> 14 Enplaned Mexico 73971
#> 15 Enplaned Middle East 31446
#> 16 Enplaned US 1382565
#> 17 Thru / Transit Australia / Oceania 2817
#> 18 Thru / Transit Europe 2496
#> 19 Thru / Transit US 3129