transbigdata.traj_slice
- transbigdata.traj_slice(traj_data, slice_data, traj_col=['vid', 'time'], slice_col=['vid', 'stime', 'etime', 'tripid'])
Slice the trajectory data according to the slice data. This method extracts data from a given set of trajectory data(traj_data) based on a specified time period(slice_data).
- 参数:
traj_data (DataFrame) – Trajectory data, containing the trajectory of each vehicle
slice_data (DataFrame) – Slice data, containing the start time, end time and vehicleid of each slice
traj_col (List) – The column name of trajectory data, in the sequence of [VehicleNum, Time]
slice_col (List) – The column name of slice data, in the sequence of [VehicleNum_slice, Stime, Etime, SliceId]
- 返回:
data_sliced – The sliced trajectory data
- 返回类型:
DataFrame
示例
>>> tbd.traj_slice(GPSData, move, traj_col=['vid', 'time'], slice_col = ['vid','stime','etime','tripid'])