Learn R Programming

GTFSwizard (version 1.1.0)

read_gtfs: Read GTFS file

Description

Reads GTFS files from a .zip file.

Usage

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

Value

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

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.

See Also

[GTFSwizard::as_wizardgtfs()]

Examples

Run this code
if (FALSE) {
gtfs_data <- read_gtfs("path/to/gtfs.zip")
}

Run the code above in your browser using DataLab