Skip to content

Instantly share code, notes, and snippets.

@tbuckl
Created May 22, 2017 17:58
Show Gist options
  • Select an option

  • Save tbuckl/3aadbe18ea12f3e99de1512b2c4f0b5b to your computer and use it in GitHub Desktop.

Select an option

Save tbuckl/3aadbe18ea12f3e99de1512b2c4f0b5b to your computer and use it in GitHub Desktop.
p1 <- "C:/projects/RTD/RegionalTransitDatabase/data/05_2017_511_GTFS"
p2 <- "C:/projects/RTD/RegionalTransitDatabase/data/05_2017_511_GTFS"
library(readr)
setwd(p2)
df1 = NULL
for (txt in dir(pattern = "_peak_bus_routes.csv$",full.names=TRUE,recursive=TRUE)){
print(txt)
df1 = rbind(df1, read_csv(txt))
}
setwd(p1)
df2 <- read_csv("Weekday_Peak_Bus_Routes_Stops_Builder.csv")
r1 <- table(df1$Route_Pattern_ID)
r2 <- table(df2$Route_Pattern_ID)
r2[!(r2 %in% r1)]
r2
r1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment