Created
June 27, 2016 23:00
-
-
Save dantonnoriega/41be8cb0165a5b536e1e81762c74b1c5 to your computer and use it in GitHub Desktop.
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
library(gtfsr) | |
library(magrittr) | |
library(dplyr) | |
set_api_key('2ec1ae29-b8c2-4a03-b96e-126d585233f9') # input your API key here | |
chi_feeds <- get_feedlist() %>% | |
filter(grepl('chicago', loc_t, ignore.case=TRUE)) | |
cta_url <- chi_feeds$url_d[8] # get the GTFS feed url for CTA | |
gtfs_obj <- cta_url %>% import_gtfs # THIS TAKES FOREVER | |
agency <- gtfs_obj$agency_df$agency_name[1] # get agency name | |
map_gtfs_agency_routes(gtfs_obj) # if no agency, assumes only one agency | |
map_gtfs_agency_routes(gtfs_obj, agency) # can also be explicit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment