You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the get_trip_speed() function, the code currently considers the lenght of the entire trip (see below). However, it's quite common that the trip geometry stretches longer the the 1st and last stops. To get more accurate results, we would need to tweak the code to consider only the distanceANDduration between the1st and last stops.
# generate desired geometries - checking for required files/fields is done
# pretty early into get_trip_geometry code
trips_geometries <- get_trip_geometry(gtfs, trip_id, file)
# calculate the length of each geometry
trips_length <- sf::st_length(trips_geometries)
if (unit == "km/h") trips_length <- units::set_units(trips_length, "km")
trips_length <- as.numeric(trips_length)
The text was updated successfully, but these errors were encountered:
In the
get_trip_speed()
function, the code currently considers the lenght of the entire trip (see below). However, it's quite common that the trip geometry stretches longer the the 1st and last stops. To get more accurate results, we would need to tweak the code to consider only the distance AND duration between the1st and last stops.The text was updated successfully, but these errors were encountered: