Walter Anderson
2011-May-27 13:28 UTC
[R] How to process raw trip records to get number of persons per trip by vehicle
I have a large data set containing travel records for a para-transit system. There is one record for each person transported, that contains the following information: Vehicle.Id Customer.Id Trip.Date TimeOn TimeOff Fare W36 1 2009.07.01 09:15 09:53 3.75 W36 2 2009.07.01 09:23 09:57 3.75 W36 3 2009.07.01 11:40 13:06 5.45 W35 1 2009.07.08 09:19 09:58 3.75 W36 2 2009.07.09 09:43 10:07 3.75 ... And I need to process it to end up one record per "trip" the vehicle makes, determining the number of passengers transported that trip. Something like the following: Trip.Date Vehicle.Id Trip.Start Trip.End Number.of.passengers Total.Revenue 2009.07.01 W36 09:15 09:57 2 7.50 2009.07.01 W36 11:40 13:06 1 5.45 2009.07.08 W35 09:19 09:58 1 3.75 2009.07.09 W36 09:43 10:07 1 3.75 I can think of a procedure to process the data that is a very traditional algorithm type, but it doesn't make use of any of the R features. Does anyone have any suggestions for how they would implement this analysis in R? Walter Anderson
Apparently Analagous Threads
- [LLVMdev] [llvm-testresults] cfarm-x86-64 x86_64 nightly tester results
- R code to reproduce (while studying) Bates & Watts 1988
- CFP VEHITS 2018 - 4th Int.l Conf. on Vehicle Technology and Intelligent Transport Systems (Funchal, Madeira/Portugal)
- CFP VEHITS 2018 - 4th Int.l Conf. on Vehicle Technology and Intelligent Transport Systems (Funchal, Madeira/Portugal)
- CFP VEHITS 2018 - 4th Int.l Conf. on Vehicle Technology and Intelligent Transport Systems (Funchal, Madeira/Portugal)