This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Section 1. Multiple Journey Days | |
# this section generates a report of the to,from and days that have more | |
# journeys than days travelled (i.e. there was on average more than 1 trip per day) | |
# select the days/to/from that have more journeys than journey days | |
out.m <- which(journey.count.x>pred.journey.x, arr.in=TRUE) | |
# select the journey count for the multi-trip dates | |
journey.count <- journey.count.x[journey.count.x>pred.journey.x] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Section 1. Load the data from journey file | |
# this section takes in the dataframes (reads them in first from CSV files) | |
l.journeys <- list.files(pattern = "*_journey.csv") | |
# select a particlar car and day to examine | |
x.journey.number <- 4 | |
df.x <- read.csv(l.journeys[x.journey.number] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# select a particlar car and day to examine | |
x.journey.number <- 4 | |
x.day <- "Monday" | |
# Big look to process all the records | |
#for (x.journey.number in 1:length(l.journeys)) { | |
#} # end big loop | |
df.x <- read.csv(paste(x.results.dir,"pattern_",l.journeys[x.journey.number] |