Skip to contents

Input/output

read_gtfs()
Read GTFS files
write_gtfs()
Write GTFS files

Query information from GTFS feeds

get_active_services()
Get active services
get_calendar_overlap()
Get calendar overlap
get_children_stops()
Get children stops recursively
get_dates()
Get service dates
get_dwell_time()
Get dwell time
get_parent_station()
Get parent stations recursively
get_route_frequency()
Get route frequency
get_route_speed()
Get route speed
get_route_timetable()
Get route timetable
get_shape_length()
Get shape length
get_start_and_end_times()
Get start and end times
get_stop_distances()
Get distances between stops
get_stop_frequency()
Get stop frequency
get_stop_times_patterns()
Get stop times patterns
get_stop_timetable()
Get stop timetable
get_stops()
Get stops
get_summary()
Get a summary of a GTFS feed
get_trip_duration()
Get trip duration
get_trip_length()
Get trip length
get_trip_segment_duration()
Get trip segments' duration
get_trip_speed()
Get trip speed
get_vkt()
Get vehicle-kilometres travelled
get_vmt()
Get vehicle-miles travelled

Filter GTFS feeds

filter_by_agency_id()
Filter GTFS object by agency_id
filter_by_date()
Filter GTFS object by date
filter_by_period()
Filter GTFS object by period
filter_by_route_id()
Filter GTFS object by route_id
filter_by_route_type()
Filter GTFS object by route_type (transport mode)
filter_by_service_id()
Filter GTFS object by service_id
filter_by_shape_id()
Filter GTFS object by shape_id
filter_by_spatial_extent()
Filter a GTFS object using a spatial extent
filter_by_stop_id()
Filter GTFS object by stop_id
filter_by_time_of_day()
Filter GTFS object by time of day
filter_by_trip_id()
Filter GTFS object by trip_id
filter_by_weekday()
Filter GTFS object by weekday

Spatial operations

convert_sf_to_shapes()
Convert a simple feature object into a shapes table
crop_gtfs()
Crop a GTFS object to a spatial extent
filter_by_spatial_extent()
Filter a GTFS object using a spatial extent
get_trip_geometry()
Get trip geometry
get_route_geometry()
Get route geometry
get_shapes_geometry()
Get the shapes table with spatial geometry
get_stops_geometry()
Get the stops table with spatial geometry

Editing GTFS feeds

interpolate_stop_times()
Interpolate missing stop times
interpolate_shape_dist_traveled()
Interpolate the distances travelled along shapes
merge_gtfs()
Merge GTFS files
combine_nearby_stops()
Combine nearby stops
remove_duplicates()
Remove duplicated entries
remove_unused_ids()
Remove unused ids
fix_gtfs()
Fix common problems in GTFS feeds
fix_overnight_times()
Fix times after midnight written as early morning times
set_dwell_time()
Set dwell time
set_min_dwell_time()
Set a minimum dwell time
set_max_speed()
Set trip maximum speed
set_min_speed()
Set trip minimum speed
set_route_frequency()
Set route frequency
set_trip_speed()
Set trip average speed
set_route_speed()
Set route average speed
stop_times_to_frequencies()
Convert stop times to frequencies
frequencies_to_stop_times()
Convert frequencies to stop times

Validate GTFS feeds

download_validator()
Download MobilityData's GTFS validator
list_validator_versions()
List MobilityData's GTFS validator versions
validate_gtfs()
Validate GTFS feed

Support functions

convert_stops_to_shapes()
Convert stops into shapes
convert_time_to_seconds()
Convert time fields to seconds after midnight
convert_seconds_to_time()
Convert seconds after midnight to time strings

Network analysis

build_graph()
Build a transit network graph

Interoperability between GTFS packages

as_dt_gtfs()
Coerce lists and GTFS objects from other packages into gtfstools-compatible GTFS objects

Deprecated and defunct

convert_shapes_to_sf()
Convert shapes table to simple feature object (deprecated)
convert_stops_to_sf()
Convert stops table to simple feature object (deprecated)
filter_by_sf()
Filter a GTFS object using a simple features object (defunct)