Skip to contents

GTFS Helpers

Functions to manipulate tidygtfs objects.

filter_by_route()
Filter GTFS to a desired route(s) and direction(s).
get_shape_geometry()
Get the geometry of a route shape.
project_onto_route()
Projects points to linear distances along a route shape.
get_stop_distances()
Get the distances of stops along routes.
get_gtfs_service_dates()
Get a dataframe of all service dates and their service IDs from a GTFS.
plot_interactive_gtfs()
Generates a Leaflet viewer of GTFS routes and stops.

AVL Cleaning

Functions to clean AVL data.

get_linear_distances()
Linearizes latitude-longitude GPS points to a provided route shape.
clean_overlapping_subtrips()
Removes trips with multiple overlapping operators or vehicles assigned to the same trip number.
clean_jumps()
Applies median filters to detect large jumps (i.e., outliers) in the trajectories.
clean_incomplete_trips()
Filters out entire trips which do not meet distance or duration requirements.
trim_trips()
Removes observations occurring before a trip's minimum distance, or after a trip's maximum distance.
make_monotonic()
Corrects distance observations, and optionally speeds, to be weakly or strictly monotonic.

Trajectory Construction

Functions to build trajectory objections.

get_trajectory_fun()
Fits continuous trajectory interpolating curves from transit AVL data.
get_gtfs_trajectory_fun()
Fits continuous trajectory interpolating curves from GTFS schedule data.

Trajectory Plotting

Functions to plot trajectories.

plot(<avltrajectory_group>) plot(<avltrajectory_single>)
Quickly plots an AVL trajectory.
plot_animated_line() plot_animated_map()
Animate vehicle trajectory or AVL data.
plot_trajectory()
Plot vehicle trajectories or AVL data.
export_animation()
Save your animation at a desired quality.

Methods for Trajectories

Functions for using trajectories.

predict(<avltrajectory_group>) predict(<avltrajectory_single>)
Interpolate time or distance points using AVL trajectories.
print(<avltrajectory_group>) print(<avltrajectory_single>)
Print function for AVL trajectories
summary(<avltrajectory_group>) summary(<avltrajectory_single>)
Summary function for AVL trajectories.
get_trip_extremes()
Get the distance and time range of each trip in a trajectory object.

Data Validation

Functions for validating data.

validate_tides()
Check if an AVL dataframe meets TIDES standards.
validate_monotonicity()
Check if an AVL dataframe satisfies assumptions of monotonicity.

Supporting Datasets

Datasets to test with.

wmata_avl
WMATA Bus Automatic Vehicle Location Data
wmata_gtfs
WMATA Bus GTFS
new_transittraj_data()
Returns an object from a particular step of transittraj's workflow.