transbigdata.dataagg
- transbigdata.dataagg(data, shape, col=['Lng', 'Lat', 'count'], accuracy=500)
Aggregate data to traffic zone
- Parameters:
data (DataFrame) – The origin DataFrame
shape (GeoDataFrame) – The shape of the traffic zone
col (List) – You can either choose to input two columns, i.e., [‘Lng’,’Lat’], or to input three columns, i.e., [‘Lng’,’Lat’,’count’]”, where count means the points count
accuracy (number) – The idea is to first implement data gridding and then the aggregation. Here, the grid size will be determined. The less the size is, the higher the accuracy will have.
- Returns:
aggresult (GeoDataFrame) – Traffic zone. The count column is the output result
data1 (DataFrame) – The zone-matched data