数据来源于transbigdata/docs/source/gallery/data/TaxiData-Sample.csv at main · ni1o1/transbigdata (github.com)
?输出数据集的一般信息
transbigdata.data_summary(
data,
col=['Vehicleid', 'Time'],
show_sample_duration=False,
roundnum=4)
data | 轨迹点数据 |
col | ?列名,顺序为[‘Vehicleid’, ‘Time’] |
show_sample_duration? | 是否输出采样间隔 |
roundnum | ?小数位数 |
读取数据:
import transbigdata as tbd
import pandas as pd
import geopandas as gpd
import matplotlib.pyplot as plt
data = pd.read_csv('Downloads/TaxiData-Sample.csv',
names=['VehicleNum', 'Time', 'Lng', 'Lat', 'OpenStatus', 'Speed'])
data
tbd.data_summary(data,col=['VehicleNum','Time'],show_sample_duration=True)
Amount of data
-----------------
Total number of data items: 544999
Total number of individuals: 180
Data volume of individuals(Mean): 3027.7722
Data volume of individuals(Upper quartile): 4056.25
Data volume of individuals(Median): 2600.5
Data volume of individuals(Lower quartile): 1595.75
Data time period
-----------------
Start time: 00:00:00
End time: 23:59:59
Sampling interval
-----------------
Mean: 27.995 s
Upper quartile: 30.0 s
Median: 20.0 s
Lower quartile: 15.0 s
'''
数据项总数:544999
个体总数:180
个体数据量(平均):3027.7722
个体数据量(上四分位数):4056.25
个体数据量(中位数):2600.5
个体数据量(下四分位数):1595.75
数据时间段
开始时间:00:00:00
结束时间:23:59:59
采样间隔
平均值:27.995秒
上四分位数:30.0秒
中位数:20.0秒
下四分位数:15.0秒
'''