read_gtfs: Read GTFS file

View source: R/read_gtfs.R

read_gtfsR Documentation

Read GTFS file

Description

Reads GTFS files from a .zip file.

Usage

read_gtfs(file.path, files = NULL, quiet = TRUE, ...)

Arguments

file.path

A path to a .zip GTFS file.

files

A character vector containing the text files to be read from the GTFS zip (without the .txt extension). Defaults to NULL, which reads all files.

quiet

Logical. If TRUE, suppresses messages from gtfsio::import_gtfs(). Defaults to TRUE.

...

Additional arguments to pass to gtfsio::import_gtfs().

Details

If no specific files are indicated, all GTFS files within the zip archive are read. After importing, the function converts the GTFS data into a 'wizardgtfs' object, which is tailored for efficient handling and analysis of transit data.

Value

A 'wizardgtfs' object: a list of tibbles representing each text file in the .zip and a tibble for services by date.

Note

Additional notes can be added here if needed.

See Also

[GTFSwizard::as_wizardgtfs()]

Examples

## Not run: 
gtfs_data <- read_gtfs("path/to/gtfs.zip")

## End(Not run)


GTFSwizard documentation built on April 4, 2025, 4:10 a.m.