Installation
The package is installable from mattwigway.r-universe.dev. Run the following at your R prompt:
install.packages('gtfsrealtime', repos = c('https://mattwigway.r-universe.dev', 'https://cloud.r-project.org'))If you want to build from source, this package contains compiled extendr Rust code to efficiently read GTFS-realtime. You will need a Rust development environment; you can build the Rust code by running rextendr::document().
Usage
See this vignette for a walkthrough of working with vehicle position feeds. Working with alerts and trip updates is similar; see the documentation for the relevant functions in the Reference tab.
GTFS-realtime is a hierarchical format, and R data frames are flat tables. Thus, a single trip update or alert will become multiple rows in the output, with a common id. See the individual function documentation for details.