Skip to content

Commit

Permalink
Fix small type transform error for total duration (now seconds)
Browse files Browse the repository at this point in the history
  • Loading branch information
luyuliu committed Oct 23, 2024
1 parent ed42dae commit 36041be
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ private void populateDataFrame(List<Trip> trips, RDataFrame travelTimesTable) {

travelTimesTable.set("option", tripId.incrementAndGet());
travelTimesTable.set("departure_time", Utils.getTimeFromSeconds(trip.getDepartureTime()));
travelTimesTable.set("total_duration", (trip.getTotalDurationSeconds() ));
travelTimesTable.set("total_duration", Utils.roundTo1Place(trip.getTotalDurationSeconds() ));
travelTimesTable.set("total_distance", trip.getTotalDistance());

if (hasFares())
Expand All @@ -100,8 +100,8 @@ private void populateDataFrame(List<Trip> trips, RDataFrame travelTimesTable) {
if (hasFares())
travelTimesTable.set("cumulative_fare", leg.getCumulativeFare() / 100.0);

travelTimesTable.set("segment_duration", leg.getLegDurationSeconds() );
travelTimesTable.set("wait", (leg.getWaitTime()));
travelTimesTable.set("segment_duration", Utils.roundTo1Place(leg.getLegDurationSeconds()) );
travelTimesTable.set("wait", Utils.roundTo1Place((leg.getWaitTime())));
travelTimesTable.set("distance", leg.getLegDistance());
travelTimesTable.set("route", leg.getRoute());
travelTimesTable.set("edge_id_list", leg.getEdgeIDList());
Expand Down

0 comments on commit 36041be

Please sign in to comment.