Skip to contents

Imports a GTFS zip archive and converts it to wizardgtfs.

Usage

read_gtfs(file_path = NULL, files = NULL, quiet = TRUE, ...)

Arguments

file_path

Path to a GTFS .zip archive.

files

Optional character vector of table names without .txt.

quiet

Logical. Suppress importer messages and UTF-16 conversion warnings.

...

Additional arguments passed to gtfsio::import_gtfs(), including the legacy argument file.path.

Value

A validated wizardgtfs object.

Details

UTF-16LE and UTF-16BE GTFS text files are converted to UTF-8 in a temporary copy before import. The original ZIP is not modified. When quiet = FALSE, a warning identifies the converted files. Other import arguments, including fields, extra_spec, and skip, are preserved.

Examples

path <- tempfile(fileext = ".zip")
write_gtfs(for_rail_gtfs, path)
gtfs <- read_gtfs(path)