Title: | San Francisco International Airport Monthly Air Passengers |
---|---|
Description: | Provides monthly statistics on the number of monthly air passengers at SFO airport such as operating airline, terminal, geo, etc. Data source: San Francisco data portal (DataSF) <https://data.sfgov.org/Transportation/Air-Traffic-Passenger-Statistics/rkru-6vcg>. |
Authors: | Rami Krispin [aut, cre] |
Maintainer: | Rami Krispin <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.2 |
Built: | 2024-11-14 04:29:20 UTC |
Source: | https://github.com/cran/sfo |
Sankey Plot with Plotly
sankey_ly(x, cat_cols, num_col, title = NULL)
sankey_ly(x, cat_cols, num_col, title = NULL)
x |
A data.frame input, must have at least two categorical columns and one numeric column |
cat_cols |
A vector of at least two categorical columns names |
num_col |
A single numeric column name |
title |
Optional, string to pass to plotly layout title function |
A customized function for data transformation and plotting sankey plot with Plotly
data("sfo_passengers") library(dplyr) d <- sfo_passengers %>% filter(activity_period >= 202201 & activity_period < 202301) head(d) d %>% filter(operating_airline == "United Airlines") %>% mutate(terminal = ifelse(terminal == "International", "international", terminal)) %>% group_by(operating_airline,activity_type_code, geo_summary, geo_region, terminal) %>% summarise(total = sum(passenger_count), .groups = "drop") %>% sankey_ly(cat_cols = c("operating_airline", "terminal","geo_summary", "geo_region", "activity_type_code"), num_col = "total", title = "Distribution of United Airlines Passengers at SFO During 2022")
data("sfo_passengers") library(dplyr) d <- sfo_passengers %>% filter(activity_period >= 202201 & activity_period < 202301) head(d) d %>% filter(operating_airline == "United Airlines") %>% mutate(terminal = ifelse(terminal == "International", "international", terminal)) %>% group_by(operating_airline,activity_type_code, geo_summary, geo_region, terminal) %>% summarise(total = sum(passenger_count), .groups = "drop") %>% sankey_ly(cat_cols = c("operating_airline", "terminal","geo_summary", "geo_region", "activity_type_code"), num_col = "total", title = "Distribution of United Airlines Passengers at SFO During 2022")
Monthly summary of number of passengers in San Francisco International Airport (SFO)
sfo_passengers
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
The dataset contains the monthly summary of number of passengers in San Francisco International Airport (SFO)
San Francisco data portal (DataSF) website.
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") # 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")
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") # 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")
Monthly statistics on San Francisco International Airport (SFO) landings
sfo_stats
sfo_stats
A data frame with 14 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 designation for three types of aircraft that landed at SFO, which includes passenger aircraft, cargo-only aircraft (“freighters”), or combination aircraft (“combi”)
A designation that is independent from Landing Aircraft Type, which determines whether commercial aircraft landed at SFO is a wide body-jet, narrow-body jet, regional-jet or a propeller operated aircraft
Manufacturer name for the aircraft that landed at SFO
Model designation of aircraft by the manufacturer
Variations of the Aircraft Model, also known as the “dash number”, designated by the manufacturer to segregate unique versions of the same model
The number of aircraft landings associated with General and Landings Statistics attribute fields
The aircraft landed weight (in pounds) associated with General and Landings Statistics attribute fields
The dataset contains the monthly statistics on the air traffic landings in San Francisco International Airport (SFO)
San Francisco data portal (DataSF) website.
data(sfo_stats) require(dplyr) # Get summary of total landing and weight by geo region # in most recent month sfo_stats %>% filter(activity_period == max(activity_period)) %>% group_by(geo_region) %>% summarise(total_landing = sum(landing_count), total_weight = sum(total_landed_weight), .groups = "drop")
data(sfo_stats) require(dplyr) # Get summary of total landing and weight by geo region # in most recent month sfo_stats %>% filter(activity_period == max(activity_period)) %>% group_by(geo_region) %>% summarise(total_landing = sum(landing_count), total_weight = sum(total_landed_weight), .groups = "drop")