10/19/2018

Introduction

  • This app is for Developing Data Products Course Week 4 Assignment in the Data Sciecne Specialization by the John Hopkins University
  • The app uses the nycfligths13 data loaded using the nycflights13 package
  • This is the on-time data for all flights that departed NYC (i.e. JFK, LGA or EWR) in 2013.

The Data

  • The user is able to input a range of the months using the slider
  • The user is able to select one out of the three NYC airports to determine the mean delay timings for flights that departed from these airports
  • The ouput produced is a ggplot plot with months on the x-axis and average delay timings on the y-axis
  • The output also produces the average delay timings (both arrival and departure delay) for flights that departed from the selected airport for the selected time period

The Sample Code

  • This sample code explores the nycflights 13 dataset
dat <- as.data.frame(nycflights13::flights, row.names = NULL)
head(dat[,c(1:7,13)]) #Getting only the relevant columns
##   year month day dep_time sched_dep_time dep_delay arr_time origin
## 1 2013     1   1      517            515         2      830    EWR
## 2 2013     1   1      533            529         4      850    LGA
## 3 2013     1   1      542            540         2      923    JFK
## 4 2013     1   1      544            545        -1     1004    JFK
## 5 2013     1   1      554            600        -6      812    LGA
## 6 2013     1   1      554            558        -4      740    EWR

The Result

  • The shiny application can be found here
  • The source code can be found here