transbigdata.traj_sparsify
- transbigdata.traj_sparsify(data, col=['Vehicleid', 'Time', 'Lng', 'Lat'], timegap=15, method='subsample')
Trajectory sparsify. When the sampling frequency of trajectory data is too high, the amount of data is too large, which is not convenient for the analysis of some studies that require less data frequency. This function can expand the sampling interval and reduce the amount of data.
- 参数:
data (DataFrame) – Data
col (List) – The column name, in the sequence of [Vehicleid, Time, lng, lat]
timegap (number) – Time gap between trajectory point
method (str) – ‘interpolate’ or ‘subsample’
- 返回:
data1 – Sparsified trajectory data
- 返回类型:
DataFrame