read_gtfs: Read a GTFS Feed

View source: R/read_gtfs.R

read_gtfsR Documentation

Read a GTFS Feed

Description

Imports a GTFS zip archive and converts it to wizardgtfs.

Usage

read_gtfs(
  file_path = NULL,
  files = NULL,
  quiet = TRUE,
  repair = c("legacy", "none"),
  ...
)

Arguments

file_path

Optional path to a GTFS .zip archive. When omitted in an interactive session, a file-selection window opens.

files

Optional character vector of table names without .txt.

quiet

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

repair

Reference cleanup policy passed to as_wizardgtfs().

...

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

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.

Value

A validated wizardgtfs object.

See Also

write_gtfs(), as_wizardgtfs()

Examples

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


GTFSwizard documentation built on Nov. 18, 2026, 1:07 a.m.