export_gtfs | R Documentation |
Writes GTFS objects to disk as GTFS transit feeds. The object must be
formatted according to the standards for reading and writing GTFS transit
feeds, as specified in get_gtfs_standards
(i.e. data types are
not checked). If present, does not write auxiliary tables held in a sub-list
named "."
.
export_gtfs(
gtfs,
path,
files = NULL,
standard_only = FALSE,
compression_level = 9,
as_dir = FALSE,
overwrite = TRUE,
quiet = TRUE
)
gtfs |
A GTFS object. |
path |
A string. Where the resulting |
files |
A character vector. The name of the elements to be written to the feed. |
standard_only |
A logical. Whether only standard files and fields should
be written (defaults to |
compression_level |
A numeric, between 1 and 9. The higher the value, the best the compression, which demands more processing time. Defaults to 9 (best compression). |
as_dir |
A logical. Whether the feed should be exported as a directory,
instead of a |
overwrite |
A logical. Whether to overwrite an existing |
quiet |
A logical. Whether to hide log messages and progress bars
(defaults to |
Invisibly returns the same GTFS object passed to gtfs
.
get_gtfs_standards
Other io functions:
import_gtfs()
gtfs_path <- system.file("extdata/ggl_gtfs.zip", package = "gtfsio")
gtfs <- import_gtfs(gtfs_path)
tmpf <- tempfile(pattern = "gtfs", fileext = ".zip")
export_gtfs(gtfs, tmpf)
zip::zip_list(tmpf)$filename
export_gtfs(gtfs, tmpf, files = c("shapes", "trips"))
zip::zip_list(tmpf)$filename
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.