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()
Project points to linear distances along a route
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()
Generate a Leaflet viewer of GTFS routes and stops

AVL Cleaning

Functions to clean AVL data.

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

Trajectory Construction

Functions to build trajectory objections.

get_trajectory_fun()
Fit continuous trajectory interpolating curves from AVL data
get_gtfs_trajectory_fun()
Fit continuous trajectory interpolating curves from GTFS schedule data
group_trajectories()
Group existing trajectory objects or split them apart

Trajectory Plotting

Functions to plot trajectories.

plot(<avltrajectory_group>) plot(<avltrajectory_single>)
Quickly plot 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 an animation at a desired quality

Methods for Trajectories

Functions for using trajectories.

predict(<avltrajectory_group>)
Interpolate time or distance points using AVL trajectories
print(<avltrajectory_group>) print(<avltrajectory_single>)
Print an AVL trajectory object
summary(<avltrajectory_group>) summary(<avltrajectory_single>)
Summarize an AVL trajectory object
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 AVL data meets TIDES standards
validate_monotonicity()
Check if AVL data satisfies assumptions of monotonicity

Supporting Datasets

Datasets to test with.

lacmta_avl
LA Metro AVL Data
lacmta_gtfs
LA Metro GTFS
new_transittraj_data()
Retrieve an object from a particular step of transittraj's workflow