Skip to main content

A tool for transportation big data

Project description

TransBigData 针对交通时空大数据处理的Python包

Build Status Documentation Status PyPI bilibili

TransBigData工具针对时空大数据处理而开发,依托于GeoPandas,集成了交通时空大数据处理过程中常用的方法。包括栅格化、预处理、集计、轨迹、近邻匹配、地图底图、坐标与距离等通用方法,以及出租车GPS、共享单车数据等各类数据处理方法。更多细节请查看:TransBigData的说明文档

安装

pip install -U transbigdata

使用

下面例子展示如何使用TransBigData工具快速地从出租车GPS数据中提取出行OD:

#导入TransBigData包
import transbigdata as tbd
#读取数据    
import pandas as pd
data = pd.read_csv('TaxiData-Sample.csv',header = None) 
data.columns = ['VehicleNum','time','slon','slat','OpenStatus','Speed'] 
data

使用transbigdata.taxigps_to_od方法,传入对应的列名,即可提取出行OD:

#从GPS数据提取OD
oddata = tbd.taxigps_to_od(data,col = ['VehicleNum','time','slon','slat','OpenStatus'])
oddata

对提取出的OD进行OD的栅格集计:

#定义研究范围
bounds = [113.6,22.4,114.8,22.9]
#输入研究范围边界bounds与栅格宽度accuracy,获取栅格化参数
params = tbd.grid_params(bounds = bounds,accuracy = 1500)
#栅格化OD并集计
od_gdf = tbd.odagg_grid(oddata,params)
od_gdf.plot(column = 'count')

相关链接

引用

而如果你想要引用这个 GitHub 仓库,可以使用如下的 bibtex:

@misc{transbigdata,
  author = {Qing Yu},
  title = {TransBigData},
  year = {2021},
  publisher = {GitHub},
  journal = {GitHub Repository},
  howpublished = {\url{https://github.com/ni1o1/transbigdata}},
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

transbigdata-0.1.8.tar.gz (15.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page