Using Gtfs Sydney Buses Data With Dplyr
General Transit Feed Specification (GTFS) data is freely available for Sydney Buses. I thought I would go through and see how easy it is to query and create something meaningful.
Reading the files in was rather trivial and required the work of the very common eval(parse()) combination:
tables <- c("trips", "stops", "stop_times", "routes") for(tbl in tables) { eval(parse(text=paste0(tbl, " <- read.csv(unz('./sydney_buses_gtfs_static.zip','", tbl, ".txt'), row.names=NULL)") )) } My first attempt made use of plyr library, but I ended up finding that slightly messy.
[Read More]