Software Open Access

gtfsio: Read and Write General Transit Feed Specification (GTFS) Files

Herszenhut, Daniel; Poletti, Flavio; Padgham, Mark

Other(s)
Pereira, Rafael H. M.; Buckley, Tom
Ipea - Institute for Applied Economic Research

gtfsio offers tools for the development of GTFS-related packages. It establishes a standard for representing GTFS feeds using R data types based on Google’s Static GTFS Reference. It provides fast and flexible functions to read and write GTFS feeds while sticking to this standard. It defines a basic gtfs class which is meant to be extended by packages that depend on it. And it also offers utility functions that support checking the structure of GTFS objects.

Bug fixes

• import_gtfs() would raise a {bit64}-related warning when the first row of any table included a 64-bit integer. This is now fixed - when reading the first row to figure out which fields are present, all columns are read as character vectors.

New features

• Added (internal) input assertion functions, which declutter the input checking sections quite a bit.
• Added new (internal) gtfsio_error() function, which raises a custom-classed error condition. All errors raised in gtfsio's exported functions inherit from gtfsio_error and <function_name>_error, which allows for easier and more clear error catching.

Potentially breaking changes

• Files and fields checking functions had their names changed. They now use the singular form, instead of the plural (i.e. check_fields_exist() was substituted by check_field_exists()). This shouldn't raise reverse dependencies concern, because as of now only {gtfstools} dev version uses such functions, which is an easy fix that doesn't concern CRAN release.
Files (47.2 kB)
Name Size
gtfsio_1.0.0.tar.gz
md5:f9448a3d41e9e7b4ecf8a0260313c143
47.2 kB
246
13
views