Package: gtfstools 2.0.0

Rafael H. M. Pereira

gtfstools: General Transit Feed Specification (GTFS) Editing and Analysing Tools

Utility functions to read, manipulate, analyse and write transit feeds in the General Transit Feed Specification (GTFS) data format.

Authors:Daniel Herszenhut [aut], Rafael H. M. Pereira [aut, cre], Pedro R. Andrade [aut], Joao Bazzo [aut], Mark Padgham [ctb], Christopher Higgins [ctb], Gonçalo F. Matos [ctb], Yigit Han Eroglu [ctb], Arthur Bazolli [ctb], Marcus Saraiva [ctb], Ipea - Institute for Applied Economic Research [cph, fnd]

gtfstools_2.0.0.tar.gz
gtfstools_2.0.0.zip(r-4.7-x86_64)gtfstools_2.0.0.zip(r-4.7-arm64)gtfstools_2.0.0.zip(r-4.6-x86_64)gtfstools_2.0.0.zip(r-4.6-arm64)
gtfstools_2.0.0.tar.gz(r-4.7-arm64)gtfstools_2.0.0.tar.gz(r-4.7-x86_64)gtfstools_2.0.0.tar.gz(r-4.6-arm64)gtfstools_2.0.0.tar.gz(r-4.6-x86_64)
gtfstools_2.0.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
gtfstools/json (API)

# Install 'gtfstools' in R:
install.packages('gtfstools', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/ipea/gtfstools/issues

Pkgdown/docs site:https://ipea.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library

On CRAN:

Conda:

cppopenmp

5.86 score 3 packages 203 scripts 748 downloads 69 exports 37 dependencies

Last updated from:b564b97dac. Checks:10 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-arm64OK214
linux-devel-x86_64OK166
source / vignettesOK321
linux-release-arm64OK120
linux-release-x86_64OK171
windows-devel-arm64OK248
windows-devel-x86_64OK176
windows-release-arm64OK227
windows-release-x86_64OK157
wasm-releaseOK157

Exports:as_dt_gtfsbuild_graphcombine_nearby_stopsconvert_seconds_to_timeconvert_sf_to_shapesconvert_shapes_to_sfconvert_stops_to_sfconvert_stops_to_shapesconvert_time_to_secondscrop_gtfsdownload_validatorfilter_by_agency_idfilter_by_datefilter_by_periodfilter_by_route_idfilter_by_route_typefilter_by_service_idfilter_by_sffilter_by_shape_idfilter_by_spatial_extentfilter_by_stop_idfilter_by_time_of_dayfilter_by_trip_idfilter_by_weekdayfix_gtfsfrequencies_to_stop_timesget_active_servicesget_calendar_overlapget_children_stopsget_datesget_dwell_timeget_parent_stationget_route_frequencyget_route_geometryget_route_speedget_route_timetableget_shape_lengthget_shapes_geometryget_start_and_end_timesget_stop_distancesget_stop_frequencyget_stop_times_patternsget_stop_timetableget_stopsget_stops_geometryget_summaryget_trip_durationget_trip_geometryget_trip_lengthget_trip_segment_durationget_trip_speedget_vktget_vmtinterpolate_shape_dist_traveledinterpolate_stop_timeslist_validator_versionsmerge_gtfsread_gtfsremove_duplicatesremove_unused_idsset_dwell_timeset_max_speedset_min_dwell_timeset_route_frequencyset_route_speedset_trip_speedstop_times_to_frequenciesvalidate_gtfswrite_gtfs

Dependencies:askpassbackportscheckmateclassclassIntclicpp11curldata.tableDBIe1071fsgeometriesgluegtfsiohttr2jsonliteKernSmoothlifecyclemagrittropensslparallellyprocessxproxypsR6Rcpprlangs2sfsfheaderssysunitsvctrswithrwkzip

Building transit network graphs
Preparing the feed | Building a GMNS network | Building and igraph and Calculating the centrality of stops | Plotting the network with tidygraph, sfnetworks and ggraph

Last update: 2026-10-28
Started: 2026-10-28

Checking the calendar overlap of GTFS feeds
Trips per day | Overlap periods

Last update: 2026-10-28
Started: 2026-10-28

Editing GTFS feeds
Setting route frequencies | Setting trip speeds | Converting stop times to frequencies | Interpolating stop times | Fixing common problems

Last update: 2026-10-28
Started: 2026-10-28

Filtering GTFS feeds
Filtering by agency_id, route_id, service_id, shape_id, stop_id, trip_id or route_type: | Filtering by day of the week or time of the day: | Filtering using a spatial extent

Last update: 2026-10-28
Started: 2021-11-16

Introduction to gtfstools
GTFS feeds | Basic usage | Read feeds | Analyse feeds | Manipulate feeds | Write feeds

Last update: 2026-10-28
Started: 2021-02-23

Mapping GTFS feeds
Mapping the transit network | Mapping routes by speed | Mapping stops by frequency

Last update: 2026-10-28
Started: 2026-10-28

Querying GTFS feeds
Frequencies and timetables | Trip lengths, durations and speeds | Summarising a feed

Last update: 2026-10-28
Started: 2026-10-28

Validating GTFS feeds

Last update: 2026-10-28
Started: 2022-11-24

Readme and manuals

Help Manual

Help pageTopics
Coerce lists and GTFS objects from other packages into gtfstools-compatible GTFS objectsas_dt_gtfs as_dt_gtfs.gtfs as_dt_gtfs.list as_dt_gtfs.tidygtfs
Build a transit network graphbuild_graph
Combine nearby stopscombine_nearby_stops
Convert seconds after midnight to time stringsconvert_seconds_to_time
Convert a simple feature object into a 'shapes' tableconvert_sf_to_shapes
Convert 'shapes' table to simple feature object (deprecated)convert_shapes_to_sf
Convert 'stops' table to simple feature object (deprecated)convert_stops_to_sf
Convert stops into shapesconvert_stops_to_shapes
Convert time fields to seconds after midnightconvert_time_to_seconds
Crop a GTFS object to a spatial extentcrop_gtfs
Download MobilityData's GTFS validatordownload_validator
Filter GTFS object by 'agency_id'filter_by_agency_id
Filter GTFS object by datefilter_by_date
Filter GTFS object by periodfilter_by_period
Filter GTFS object by 'route_id'filter_by_route_id
Filter GTFS object by 'route_type' (transport mode)filter_by_route_type
Filter GTFS object by 'service_id'filter_by_service_id
Filter a GTFS object using a simple features object (defunct)filter_by_sf
Filter GTFS object by 'shape_id'filter_by_shape_id
Filter a GTFS object using a spatial extentfilter_by_spatial_extent
Filter GTFS object by 'stop_id'filter_by_stop_id
Filter GTFS object by time of dayfilter_by_time_of_day
Filter GTFS object by 'trip_id'filter_by_trip_id
Filter GTFS object by weekdayfilter_by_weekday
Fix common problems in GTFS feedsfix_gtfs
Convert frequencies to stop timesfrequencies_to_stop_times
Get active servicesget_active_services
Get calendar overlapget_calendar_overlap
Get children stops recursivelyget_children_stops
Get service datesget_dates
Get dwell timeget_dwell_time
Get parent stations recursivelyget_parent_station
Get route frequencyget_route_frequency
Get route geometryget_route_geometry
Get route speedget_route_speed
Get route timetableget_route_timetable
Get shape lengthget_shape_length
Get the 'shapes' table with spatial geometryget_shapes_geometry
Get start and end timesget_start_and_end_times
Get distances between stopsget_stop_distances
Get stop frequencyget_stop_frequency
Get stop times patternsget_stop_times_patterns
Get stop timetableget_stop_timetable
Get stopsget_stops
Get the 'stops' table with spatial geometryget_stops_geometry
Get a summary of a GTFS feedget_summary
Get trip durationget_trip_duration
Get trip geometryget_trip_geometry
Get trip lengthget_trip_length
Get trip segments' durationget_trip_segment_duration
Get trip speedget_trip_speed
Get vehicle-kilometres travelledget_vkt
Get vehicle-miles travelledget_vmt
Interpolate the distances travelled along shapesinterpolate_shape_dist_traveled
Interpolate missing stop timesinterpolate_stop_times
List MobilityData's GTFS validator versionslist_validator_versions
Merge GTFS filesmerge_gtfs
Read GTFS filesread_gtfs
Remove duplicated entriesremove_duplicates
Remove unused idsremove_unused_ids
Set dwell timeset_dwell_time
Set trip maximum speedset_max_speed
Set a minimum dwell timeset_min_dwell_time
Set route frequencyset_route_frequency
Set route average speedset_route_speed
Set trip average speedset_trip_speed
Convert stop times to frequenciesstop_times_to_frequencies
Validate GTFS feedvalidate_gtfs
Write GTFS fileswrite_gtfs