Learn R Programming

r511 (version 0.1.1)

get_511_url: Use the trread import_gtfs function to import an MTC 511 GTFS zip file into a list of R dataframes

Description

Use the trread import_gtfs function to import an MTC 511 GTFS zip file into a list of R dataframes

Usage

get_511_url(privatecode)

Arguments

privatecode

this is the shortcode used by 511 to refer to operators. you can find these on the tibble returned from get_511_metadata

Value

a list of GTFS dataframes

Examples

Run this code
# NOT RUN {
#set your api key as an environmental variable
Sys.setenv(APIKEY511="yourkeyhere")
#if you don't have a key, you can get one here:
#https://511.org/developers/list/tokens/create
operator_df <- xml511_to_tibble()
bart_code <- df1[df1$name=='Bay Area Rapid Transit',]$privatecode
bart_gtfs_data <- get_mtc_511_gtfs(bart_code)
# }

Run the code above in your browser using DataLab