Dataset Preview
Full Screen
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed because of a cast error
Error code:   DatasetGenerationCastError
Exception:    DatasetGenerationCastError
Message:      An error occurred while generating the dataset

All the data files must have the same columns, but at some point there are 14 new columns ({'order_id', 'delivery_gps_lat', 'accept_gps_lng', 'delivery_gps_time', 'accept_gps_time', 'aoi_id', 'delivery_gps_lng', 'region_id', 'delivery_time', 'city', 'courier_id', 'accept_time', 'accept_gps_lat', 'aoi_type'}) and 2 missing columns ({'gps_time', 'postman_id'}).

This happened while the csv dataset builder was generating data using

hf://datasets/Cainiao-AI/LaDe/delivery/delivery_cq.csv (at revision be2cec02775cafc8d52230303f32134382bcc50b)

Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 2011, in _prepare_split_single
                  writer.write_table(table)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 585, in write_table
                  pa_table = table_cast(pa_table, self._schema)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2302, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2256, in cast_table_to_schema
                  raise CastError(
              datasets.table.CastError: Couldn't cast
              order_id: int64
              region_id: int64
              city: string
              courier_id: int64
              lng: double
              lat: double
              aoi_id: int64
              aoi_type: int64
              accept_time: string
              accept_gps_time: string
              accept_gps_lng: double
              accept_gps_lat: double
              delivery_time: string
              delivery_gps_time: string
              delivery_gps_lng: double
              delivery_gps_lat: double
              ds: int64
              -- schema metadata --
              pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 2289
              to
              {'ds': Value(dtype='int64', id=None), 'postman_id': Value(dtype='string', id=None), 'gps_time': Value(dtype='string', id=None), 'lat': Value(dtype='float64', id=None), 'lng': Value(dtype='float64', id=None)}
              because column names don't match
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1321, in compute_config_parquet_and_info_response
                  parquet_operations = convert_to_parquet(builder)
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 935, in convert_to_parquet
                  builder.download_and_prepare(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1027, in download_and_prepare
                  self._download_and_prepare(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1122, in _download_and_prepare
                  self._prepare_split(split_generator, **prepare_split_kwargs)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1882, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 2013, in _prepare_split_single
                  raise DatasetGenerationCastError.from_cast_error(
              datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
              
              All the data files must have the same columns, but at some point there are 14 new columns ({'order_id', 'delivery_gps_lat', 'accept_gps_lng', 'delivery_gps_time', 'accept_gps_time', 'aoi_id', 'delivery_gps_lng', 'region_id', 'delivery_time', 'city', 'courier_id', 'accept_time', 'accept_gps_lat', 'aoi_type'}) and 2 missing columns ({'gps_time', 'postman_id'}).
              
              This happened while the csv dataset builder was generating data using
              
              hf://datasets/Cainiao-AI/LaDe/delivery/delivery_cq.csv (at revision be2cec02775cafc8d52230303f32134382bcc50b)
              
              Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

ds
int64
postman_id
string
gps_time
string
lat
float64
lng
float64
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 00:01:04
2,375,270.941943
1,566,730.575129
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 00:16:04
2,375,280.057346
1,566,754.00207
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 00:31:04
2,375,272.989632
1,566,753.28294
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 00:46:04
2,375,285.822973
1,566,752.845665
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 01:01:04
2,375,268.153828
1,566,752.803221
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 01:16:04
2,375,287.123177
1,566,730.848048
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 01:31:04
2,375,276.522651
1,566,742.993203
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 01:46:04
2,375,296.796619
1,566,755.212527
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 02:01:04
2,375,284.891912
1,566,738.800399
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 02:16:04
2,375,292.516728
1,566,728.5205
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 02:31:04
2,375,297.352988
1,566,734.85147
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 02:46:04
2,375,296.796029
1,566,747.722905
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 02:50:33
2,375,294.935199
1,566,736.015915
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 03:01:04
2,375,297.911034
1,566,735.789011
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 03:16:04
2,375,294.378167
1,566,747.951149
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 03:31:04
2,375,289.72657
1,566,724.768997
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 03:46:04
2,375,277.266449
1,566,740.888536
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 04:01:04
2,375,275.221616
1,566,754.458555
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 04:16:04
2,375,274.105136
1,566,747.668405
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 04:31:04
2,375,292.519069
1,566,758.244913
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 04:46:04
2,375,285.636226
1,566,743.249144
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 05:01:04
2,375,309.628877
1,566,741.200306
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 05:16:04
2,375,291.402645
1,566,752.156914
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 05:30:41
2,375,312.603217
1,566,722.015329
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 05:45:43
2,375,290.98939
1,566,758.779775
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 06:01:04
2,375,300.330334
1,566,753.816708
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 06:16:04
2,375,283.590879
1,566,750.265747
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 06:31:04
2,375,293.261503
1,566,738.8205
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 06:46:04
2,375,286.380688
1,566,749.570296
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:01:04
2,375,283.776796
1,566,749.329991
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:02:04
2,375,283.776796
1,566,749.329991
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:03:04
2,375,283.776796
1,566,749.329991
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:04:04
2,375,283.776796
1,566,749.329991
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:05:04
2,375,273.361264
1,566,748.836871
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:06:04
2,375,273.361264
1,566,748.836871
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:07:04
2,375,273.361264
1,566,748.836871
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:08:06
2,375,291.964488
1,566,801.309
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:09:06
2,375,305.169265
1,566,794.085112
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:10:06
2,375,305.169265
1,566,794.085112
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:11:06
2,375,309.818591
1,566,788.479041
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:12:06
2,375,299.217412
1,566,792.198408
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:13:06
2,375,299.217541
1,566,793.836769
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:14:06
2,375,299.217541
1,566,793.836769
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:15:06
2,375,294.753724
1,566,793.357947
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:16:06
2,375,322.652813
1,566,799.510271
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:17:06
2,375,324.884903
1,566,802.090196
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:18:06
2,375,312.236894
1,566,793.868029
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:19:06
2,375,360.215414
1,566,704.809899
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:20:06
2,375,310.376176
1,566,783.565302
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:21:22
2,375,291.657306
1,566,788.967523
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:22:27
2,375,306.290646
1,566,863.133195
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:23:27
2,375,317.265499
1,566,880.947576
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:24:27
2,375,311.127511
1,566,877.187989
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:25:27
2,375,464.925765
1,566,681.421829
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:26:27
2,375,433.836967
1,566,318.576776
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:27:27
2,375,101.827852
1,566,124.696331
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:28:27
2,374,696.353109
1,565,995.935187
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:29:27
2,374,161.428638
1,565,869.675041
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:30:27
2,374,152.315222
1,565,871.525488
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:31:27
2,374,109.905061
1,565,817.362554
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:32:27
2,373,838.353818
1,565,729.421961
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:33:27
2,373,233.144937
1,565,471.976273
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:34:27
2,373,246.82695
1,564,445.854256
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:35:27
2,373,249.423237
1,564,351.322953
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:36:27
2,373,247.741286
1,564,247.188502
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:37:27
2,373,246.045852
1,563,970.833618
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:38:27
2,372,853.824447
1,563,919.393067
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:39:27
2,372,697.780875
1,563,689.964552
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:40:27
2,372,495.832469
1,563,757.607119
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:41:44
2,372,495.645656
1,563,732.724359
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:42:53
2,372,486.628777
1,563,678.402337
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:43:56
2,372,484.179749
1,563,631.800724
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:45:15
2,372,490.439598
1,563,756.425288
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:46:15
2,372,435.016014
1,563,648.668443
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:47:18
2,372,315.308081
1,563,672.226208
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:48:46
2,372,414.493747
1,563,613.412796
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:49:50
2,372,422.063473
1,563,611.728407
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:50:54
2,372,321.587143
1,563,689.602917
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:52:04
2,372,329.556976
1,563,668.155579
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:53:07
2,372,308.406273
1,563,687.806905
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:54:10
2,372,410.841554
1,563,645.807637
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:55:10
2,372,461.048534
1,563,630.942492
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:56:10
2,372,406.188671
1,563,594.554174
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:57:10
2,372,399.688255
1,563,535.510097
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:58:29
2,372,405.365549
1,563,544.353077
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 07:59:40
2,372,399.122142
1,563,591.496891
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 08:00:40
2,372,452.501742
1,563,723.349273
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 08:01:40
2,372,422.190303
1,563,715.795136
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 08:02:41
2,372,414.493747
1,563,729.215176
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 08:03:48
2,372,402.582562
1,563,717.42433
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 08:05:02
2,372,421.729514
1,563,696.509647
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 08:06:04
2,372,451.193612
1,563,640.982329
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 08:07:04
2,372,445.43554
1,563,725.20568
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 08:08:08
2,372,412.489997
1,563,711.248177
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 08:09:08
2,372,396.34867
1,563,715.739924
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 08:10:22
2,372,432.979251
1,563,760.74485
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 08:11:22
2,372,477.606766
1,563,733.93399
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 08:12:38
2,372,498.317324
1,563,731.882155
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 08:13:58
2,372,465.366755
1,563,678.823437
318
01890dd2fdc077b8deb7d8c120bf9c9f
03-18 08:14:58
2,372,495.458524
1,563,731.633394
End of preview.

Dataset Download: https://huggingface.co/datasets/Cainiao-AI/LaDe/tree/main
Dataset Website: https://cainiaotechai.github.io/LaDe-website/
Code Link:https://github.com/wenhaomin/LaDe
Paper Link: https://arxiv.org/abs/2306.10675

1. About Dataset

LaDe is a publicly available last-mile delivery dataset with millions of packages from industry. It has three unique characteristics: (1) Large-scale. It involves 10,677k packages of 21k couriers over 6 months of real-world operation. (2) Comprehensive information, it offers original package information, such as its location and time requirements, as well as task-event information, which records when and where the courier is while events such as task-accept and task-finish events happen. (3) Diversity: the dataset includes data from various scenarios, such as package pick-up and delivery, and from multiple cities, each with its unique spatio-temporal patterns due to their distinct characteristics such as populations. LaDe.png

2. Download

LaDe is composed of two subdatasets: i) LaDe-D, which comes from the package delivery scenario. ii) LaDe-P, which comes from the package pickup scenario. To facilitate the utilization of the dataset, each sub-dataset is presented in CSV format.

LaDe can be used for research purposes. Before you download the dataset, please read these terms. And Code link. Then put the data into "./data/raw/".
The structure of "./data/raw/" should be like:

* ./data/raw/  
    * delivery    
        * delivery_sh.csv   
        * ...    
    * pickup  
        * pickup_sh.csv  
        * ...
    * road-network  
        * roads.csv
    * data_with_trajectory_20s
        * courier_detailed_trajectory_20s.pkl.xz

road-network/roads.csv records the road network of the five cities.

data_with_trajectory_20s/* records the trajectory of courier.

import pandas as pd
>>> import pandas as pd
>>> df = pd.read_pickle("courier_detailed_trajectory_20s.pkl.xz")
>>> df.head(3)
    ds                        postman_id        gps_time           lat           lng
0  321  106f5ac22cfd1574b196d16fed62f90d  03-21 07:31:58  3.953700e+06  3.053400e+06
1  321  106f5ac22cfd1574b196d16fed62f90d  03-21 07:32:18  3.953700e+06  3.053398e+06
2  321  106f5ac22cfd1574b196d16fed62f90d  03-21 07:32:41  3.953700e+06  3.053398e+06

Each sub-dataset (delivery, pickup) contains 5 CSV files, with each representing the data from a specific city, the detail of each city can be find in the following table.

City Description
Shanghai One of the most prosperous cities in China, with a large number of orders per day.
Hangzhou A big city with well-developed online e-commerce and a large number of orders per day.
Chongqing A big city with complicated road conditions in China, with a large number of orders.
Jilin A middle-size city in China, with a small number of orders each day.
Yantai A small city in China, with a small number of orders every day.

3. Description

Below is the detailed field of each sub-dataset.

3.1 LaDe-P

Data field Description Unit/format
Package information
package_id Unique identifier of each package Id
time_window_start Start of the required time window Time
time_window_end End of the required time window Time
Stop information
lng/lat Coordinates of each stop Float
city City String
region_id Id of the Region String
aoi_id Id of the AOI (Area of Interest) Id
aoi_type Type of the AOI Categorical
Courier Information
courier_id Id of the courier Id
Task-event Information
accept_time The time when the courier accepts the task Time
accept_gps_time The time of the GPS point closest to accept time Time
accept_gps_lng/lat Coordinates when the courier accepts the task Float
pickup_time The time when the courier picks up the task Time
pickup_gps_time The time of the GPS point closest to pickup_time Time
pickup_gps_lng/lat Coordinates when the courier picks up the task Float
Context information
ds The date of the package pickup Date

3.2 LaDe-D

Data field Description Unit/format
Package information
package_id Unique identifier of each package Id
Stop information
lng/lat Coordinates of each stop Float
city City String
region_id Id of the region Id
aoi_id Id of the AOI Id
aoi_type Type of the AOI Categorical
Courier Information
courier_id Id of the courier Id
Task-event Information
accept_time The time when the courier accepts the task Time
accept_gps_time The time of the GPS point whose time is the closest to accept time Time
accept_gps_lng/accept_gps_lat Coordinates when the courier accepts the task Float
delivery_time The time when the courier finishes delivering the task Time
delivery_gps_time The time of the GPS point whose time is the closest to the delivery time Time
delivery_gps_lng/delivery_gps_lat Coordinates when the courier finishes the task Float
Context information
ds The date of the package delivery Date

4. Leaderboard

Blow shows the performance of different methods in Shanghai.

4.1 Route Prediction

Experimental results of route prediction. We use bold and underlined fonts to denote the best and runner-up model, respectively.

Method HR@3 KRC LSD ED
TimeGreedy 57.65 31.81 5.54 2.15
DistanceGreedy 60.77 39.81 5.54 2.15
OR-Tools 66.21 47.60 4.40 1.81
LightGBM 73.76 55.71 3.01 1.84
FDNET 73.27 ± 0.47 53.80 ± 0.58 3.30 ± 0.04 1.84 ± 0.01
DeepRoute 74.68 ± 0.07 56.60 ± 0.16 2.98 ± 0.01 1.79 ± 0.01
Graph2Route 74.84 ± 0.15 56.99 ± 0.52 2.86 ± 0.02 1.77 ± 0.01

4.2 Estimated Time of Arrival Prediction

Method MAE RMSE ACC@30
LightGBM 30.99 35.04 0.59
SPEED 23.75 27.86 0.73
KNN 36.00 31.89 0.58
MLP 21.54 ± 2.20 25.05 ± 2.46 0.79 ± 0.04
FDNET 18.47 ± 0.25 21.44 ± 0.28 0.84 ± 0.01

4.3 Spatio-temporal Graph Forecasting

Method MAE RMSE
HA 4.63 9.91
DCRNN 3.69 ± 0.09 7.08 ± 0.12
STGCN 3.04 ± 0.02 6.42 ± 0.05
GWNET 3.16 ± 0.06 6.56 ± 0.11
ASTGCN 3.12 ± 0.06 6.48 ± 0.14
MTGNN 3.13 ± 0.04 6.51 ± 0.13
AGCRN 3.93 ± 0.03 7.99 ± 0.08
STGNCDE 3.74 ± 0.15 7.27 ± 0.16

5. Citation

If you find this helpful, please cite our paper:

@misc{wu2023lade,
      title={LaDe: The First Comprehensive Last-mile Delivery Dataset from Industry}, 
      author={Lixia Wu and Haomin Wen and Haoyuan Hu and Xiaowei Mao and Yutong Xia and Ergang Shan and Jianbin Zhen and Junhong Lou and Yuxuan Liang and Liuqing Yang and Roger Zimmermann and Youfang Lin and Huaiyu Wan},
      year={2023},
      eprint={2306.10675},
      archivePrefix={arXiv},
      primaryClass={cs.DB}
}
Downloads last month
413