← Back to all sparks
G

gtfstools

ANALYTICS
Velocity0.0

General Transit Feed Specification (GTFS) Editing and Analysing Tools

gtfstools stopped guarding its own object model and started accepting everyone else's.

gtfspublic-transportgeospatialr-packageinteroperability
Current state
gtfstools reads, edits, filters and validates GTFS public transport feeds in R on a data.table backend. Since 1.3.0 it accepts GTFS objects produced by other packages such as gtfsio and tidytransit, converting them through an as_dt_gtfs() generic. Validation runs MobilityData's canonical validator, now supported through v6.0.0.
Where it's heading
The package built out a wide function surface first — filters, geometry conversion, speed and duration calculations — then turned outward. Delegating validation to MobilityData's validator and accepting other packages' objects both trade self-sufficiency for a position inside the wider GTFS ecosystem. Deprecations are handled slowly, with old behaviour left as the default for a release or more.
Prediction
Expect continued validator version tracking and further completion of the deprecation cycle around filter_by_stop_id()'s full_trips behaviour.

Recent moves

  1. 1y ago

    Supports canonical GTFS validator v5 and v6

    Adds support for MobilityData validator v5.0.0, v5.0.1 and v6.0.0, and drops local copies of cpp11 functions now that upstream releases fix the underlying issues. Routine tracking of the validator the package delegates to.

    View source ↗
  2. 1y ago

    Accepts GTFS objects from gtfsio and tidytransit

    ⚡ SPARK

    Opens the package to GTFS objects created by gtfsio and tidytransit through a new as_dt_gtfs() generic, alongside convert_sf_to_shapes(), extended route type support and sequence-sorting arguments. It changes what gtfstools is: a set of operations usable on the ecosystem's objects rather than a closed stack.

    View source ↗
  3. 3y ago

    Validation delegated to MobilityData's canonical validator

    Repurposes validate_gtfs() to run MobilityData's canonical validator and adds download_validator() with a dedicated vignette. Handing validation to the reference implementation rather than maintaining rules in R is the first of the package's outward moves.

    View source ↗
  4. 4y ago

    Adds time-of-day, weekday and frequency filtering functions

    Adds seven functions covering time conversion, weekday and time-of-day filtering, frequency expansion, children stops and trip length, plus segment numbering fixes. A broad expansion of the filtering and querying surface.

    View source ↗
  5. 4y ago

    Establishes the core GTFS filtering and sf conversion family

    Establishes the core filtering family — by route, shape, stop, trip and spatial object — plus sf conversion, read and write parameters and a filtering vignette. The foundation the later interoperability work was layered onto.

    View source ↗