Read and write GTFS feeds

read_gtfs()

Read and validate GTFS files

write_gtfs()

Write a tidygtfs object to a zip file

Travel time calculations

travel_times()

Calculate shortest travel times from a stop to all reachable stops

raptor()

Calculate travel times from one stop to all reachable stops

filter_stop_times()

Filter a stop_times table for a given date and timespan.

Filter GTFS objects

filter_feed_by_date()

Filter a gtfs feed so that it only contains trips running on a given date

filter_feed_by_area()

Filter a gtfs feed so that it only contains trips that pass a given area

filter_feed_by_stops()

Filter a gtfs feed so that it only contains trips that pass the given stops

filter_feed_by_trips()

Filter a gtfs feed so that it only contains a given set of trips

filter_stops()

Get a set of stops for a given set of service ids and route ids

Analyse GTFS objects

validate_gtfs()

Validate GTFS feed

set_servicepattern()

Calculate service pattern ids for a GTFS feed

get_route_frequency()

Get Route Frequency

get_stop_frequency()

Get Stop Frequency

summary(<tidygtfs>)

GTFS feed summary

Find and fix inconsistencies in feeds

interpolate_stop_times()

Interpolate missing stop_times linearly

cluster_stops()

Cluster nearby stops within a group

stop_group_distances()

Calculates distances among stop within the same group column

stop_distances()

Calculate distances between a given set of stops

Geospatial functions (sf)

gtfs_as_sf()

Convert stops and shapes to Simple Features

gtfs_transform()

Transform coordinates of a gtfs feed

shapes_as_sf()

Convert shapes into Simple Features Linestrings

stops_as_sf()

Convert stops into Simple Features Points

get_trip_geometry()

Get all trip shapes for given trip ids

get_route_geometry()

Get all trip shapes for a given route and service

sf_as_tbl()

Convert stops and shapes from sf objects to tibbles

Helpers

as_tidygtfs()

Convert another gtfs like object to a tidygtfs object

na_to_empty_strings()

Convert NA values to empty strings ("")

empty_strings_to_na()

Convert empty strings ("") to NA values in all gtfs tables

plot(<tidygtfs>)

Plot GTFS stops and trips

print(<tidygtfs>)

Print a GTFS object

Datasets

gtfs_duke

Example GTFS data

route_type_names

Dataframe of route type id's and the names of the types (e.g. "Bus")