transittraj 0.1.4
Release: 6/7/2026
More substantial improvements to trajectory prediction via predict(), with some smaller bug fixes related to visualization.
-
Trajectory prediction:
Vectorization of
derivinput fornew_timesanddistance_lims/timestepapproach to prediction (#14). Now, apredict()output with either input type will include a columnderiv, indicating the derivative that row corresponds to. If a vector of length > 1 is input toderiv(e.g.,deriv = c(0, 1)), then each time & trip pair will have multiple rows (e.g., a row withderiv = 0followed by a row withderiv = 1, where for each row,interpwill correspond to distance or speed, respectively).By default,
predict()will interpolate at the times or distances provided for all trips in the trajectory object. Even if an input dataframe (vianew_distancesornew_times) already had point-trip pairs (i.e., had atrip_id_performedcolumn), each row would be duplicated for all trips in the trajectory object (#14). This has been changed, so that ifnew_distancesornew_timesalready has a columntrip_id_performed, that row will only be interpolated for that trip.
-
Visualization:
plot_animated_line()would throw an error when setting up the x-axis of the ggplot iffeature_distanceswas not provided (#16). This has been resolved, and a plot can now be created without features.plot_interactive_gtfs()’scolor_paletteinput is now case-insensitive when set to"gtfs"(#13).
transittraj 0.1.3
Release: 4/14/2026
Trajectory grouping: new function
group_trajectories()allows the user to group together a list of single trajectory objects, or split apart a single grouped trajectory object. Read more athelp(group_trajectories).-
predict()for trajectories:New input parameters for trajectory
predict()methods includedistance_limsandtimestep. These allow the user to interpolate at a specific time interval over a specific region of space. Read more atvignette("articles/intro-trajectories-la").Substantial refactoring of internal functions to improve cleanliness and readability.
transittraj 0.1.2
Release: 3/25/2026
Added examples to all function documentation
-
GTFS helper functions:
New function
get_gtfs_service_dates(): Returns a dataframe of dates and theirservice_ids, built from a GTFS feed’scalendar.txtand/orcalendar_dates.txtfile, depending on how the agency has structured these files. Read more athelp(get_gtfs_service_dates).get_gtfs_trajectory_fun()now works for both methods of constructingcalendar.txtandcalendar_dates.txt(#2), with refactoring through the newget_gtfs_service_dates(). Read more athelp(get_gtfs_trajectory_fun).get_stop_distances()will now return all columns instops.txt(#4)
Plotting functions now include input parameters
feature_legend,veh_legend, andtraj_legendto override whether a layer’s legend will appear on the plot. Read more athelp(plot_trajectory)andhelp(plot_animated_line).
transittraj 0.1.1
Release: 3/13/2026
-
Refactoring of
plot_trajectory(), and redesign of how the function chooses points to interpolate over (#3).If the user specifies a
distance_lim, the function will attempt to use an inverse trajectory function to find appropriate starting and ending timepoints for interpolation; if an inverse function does not exist, the user will be informed that interpolation must occur over the entire trip.Performance is improved substantially, and performance scales well with
plot_tripslength,distance_limrange, andtimestepresolution. Most everyday trajectory plots generate in less than 1 second, and large plots (with hundreds, or even thousands, of trajectories) generate in just a few seconds.Improved error handling in
plot_trajectory(). Error messages should now better inform the user if filtering (i.e.,plot_tripsanddistance_lim) does not contain any data points.
-
Refactoring of
predict().New exported function
get_trip_extremes()for extracting the time and distance range of each trip stored in a trajectory object. Primarily used bypredict()and plotting functions, but may be useful for users. Users can filter the output dataframe to desired trips. Check outhelp(get_trip_extremes)for more information.Improved performance through restructured table operations when pairing new interpolating points with individual trips (#3).
New dedicated internal validating function for
new_timesandnew_distancesto reduce code duplication and improve error messages (#2).
