extract_gtfs | R Documentation |
Extract data from a GTFS zip
archive.
extract_gtfs(filename = NULL, quiet = FALSE, stn_suffixes = NULL)
filename |
Name of GTFS archive |
quiet |
If |
stn_suffixes |
Any values provided will be removed from terminal
characters of station IDs. Useful for feeds like NYC for which some stations
are appended with values of "N" and "S" to indicate directions. Specifying
|
List of several data.table objects corresponding to the tables present in the nominated GTFS data set.
Column types in each table of the returned object conform to GTFS
standards (https://developers.google.com/transit/gtfs/reference),
except that "Time" fields in the "stop_times" table are converted to integer
values, rather than as character or "Time" objects ("HH:MM:SS"). These can be
converted back to comply with GTFS standards by applying the hms::hms()
function to the two time columns of the "stop_times" table.
Other extract:
berlin_gtfs_to_zip()
,
gtfs_timetable()
berlin_gtfs_to_zip () # Write sample feed from Berlin, Germany to tempdir
f <- file.path (tempdir (), "vbb.zip") # name of feed
gtfs <- extract_gtfs (f)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.