Dataset Preview
Duplicate
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 2 new columns ({'gender', 'num_of_item'}) and 4 missing columns ({'product_id', 'sale_price', 'id', 'inventory_item_id'}).

This happened while the csv dataset builder was generating data using

hf://datasets/rubinshahaf/globalconsumptioneffectiveness/orders.csv (at revision 1f5969f2d060a7b246d03f18af87b2feeb7ea72a), [/tmp/hf-datasets-cache/medium/datasets/24949169883214-config-parquet-and-info-rubinshahaf-globalconsump-456ba736/hub/datasets--rubinshahaf--globalconsumptioneffectiveness/snapshots/1f5969f2d060a7b246d03f18af87b2feeb7ea72a/order_items.csv (origin=hf://datasets/rubinshahaf/globalconsumptioneffectiveness@1f5969f2d060a7b246d03f18af87b2feeb7ea72a/order_items.csv), /tmp/hf-datasets-cache/medium/datasets/24949169883214-config-parquet-and-info-rubinshahaf-globalconsump-456ba736/hub/datasets--rubinshahaf--globalconsumptioneffectiveness/snapshots/1f5969f2d060a7b246d03f18af87b2feeb7ea72a/orders.csv (origin=hf://datasets/rubinshahaf/globalconsumptioneffectiveness@1f5969f2d060a7b246d03f18af87b2feeb7ea72a/orders.csv), /tmp/hf-datasets-cache/medium/datasets/24949169883214-config-parquet-and-info-rubinshahaf-globalconsump-456ba736/hub/datasets--rubinshahaf--globalconsumptioneffectiveness/snapshots/1f5969f2d060a7b246d03f18af87b2feeb7ea72a/products.csv (origin=hf://datasets/rubinshahaf/globalconsumptioneffectiveness@1f5969f2d060a7b246d03f18af87b2feeb7ea72a/products.csv), /tmp/hf-datasets-cache/medium/datasets/24949169883214-config-parquet-and-info-rubinshahaf-globalconsump-456ba736/hub/datasets--rubinshahaf--globalconsumptioneffectiveness/snapshots/1f5969f2d060a7b246d03f18af87b2feeb7ea72a/users.csv (origin=hf://datasets/rubinshahaf/globalconsumptioneffectiveness@1f5969f2d060a7b246d03f18af87b2feeb7ea72a/users.csv)]

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 "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1893, in _prepare_split_single
                  writer.write_table(table)
                File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 765, in write_table
                  self._write_table(pa_table, writer_batch_size=writer_batch_size)
                File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 773, in _write_table
                  pa_table = table_cast(pa_table, self._schema)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2281, in table_cast
                  return cast_table_to_schema(table, schema)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2227, in cast_table_to_schema
                  raise CastError(
              datasets.table.CastError: Couldn't cast
              order_id: int64
              user_id: int64
              status: string
              gender: string
              created_at: string
              returned_at: double
              shipped_at: string
              delivered_at: string
              num_of_item: int64
              -- schema metadata --
              pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 1317
              to
              {'id': Value('int64'), 'order_id': Value('int64'), 'user_id': Value('int64'), 'product_id': Value('int64'), 'inventory_item_id': Value('int64'), 'status': Value('string'), 'created_at': Value('string'), 'shipped_at': Value('string'), 'delivered_at': Value('string'), 'returned_at': Value('string'), 'sale_price': Value('float64')}
              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 1347, 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 980, in convert_to_parquet
                  builder.download_and_prepare(
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 884, in download_and_prepare
                  self._download_and_prepare(
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 947, in _download_and_prepare
                  self._prepare_split(split_generator, **prepare_split_kwargs)
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1739, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1895, 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 2 new columns ({'gender', 'num_of_item'}) and 4 missing columns ({'product_id', 'sale_price', 'id', 'inventory_item_id'}).
              
              This happened while the csv dataset builder was generating data using
              
              hf://datasets/rubinshahaf/globalconsumptioneffectiveness/orders.csv (at revision 1f5969f2d060a7b246d03f18af87b2feeb7ea72a), [/tmp/hf-datasets-cache/medium/datasets/24949169883214-config-parquet-and-info-rubinshahaf-globalconsump-456ba736/hub/datasets--rubinshahaf--globalconsumptioneffectiveness/snapshots/1f5969f2d060a7b246d03f18af87b2feeb7ea72a/order_items.csv (origin=hf://datasets/rubinshahaf/globalconsumptioneffectiveness@1f5969f2d060a7b246d03f18af87b2feeb7ea72a/order_items.csv), /tmp/hf-datasets-cache/medium/datasets/24949169883214-config-parquet-and-info-rubinshahaf-globalconsump-456ba736/hub/datasets--rubinshahaf--globalconsumptioneffectiveness/snapshots/1f5969f2d060a7b246d03f18af87b2feeb7ea72a/orders.csv (origin=hf://datasets/rubinshahaf/globalconsumptioneffectiveness@1f5969f2d060a7b246d03f18af87b2feeb7ea72a/orders.csv), /tmp/hf-datasets-cache/medium/datasets/24949169883214-config-parquet-and-info-rubinshahaf-globalconsump-456ba736/hub/datasets--rubinshahaf--globalconsumptioneffectiveness/snapshots/1f5969f2d060a7b246d03f18af87b2feeb7ea72a/products.csv (origin=hf://datasets/rubinshahaf/globalconsumptioneffectiveness@1f5969f2d060a7b246d03f18af87b2feeb7ea72a/products.csv), /tmp/hf-datasets-cache/medium/datasets/24949169883214-config-parquet-and-info-rubinshahaf-globalconsump-456ba736/hub/datasets--rubinshahaf--globalconsumptioneffectiveness/snapshots/1f5969f2d060a7b246d03f18af87b2feeb7ea72a/users.csv (origin=hf://datasets/rubinshahaf/globalconsumptioneffectiveness@1f5969f2d060a7b246d03f18af87b2feeb7ea72a/users.csv)]
              
              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.

id
int64
order_id
int64
user_id
int64
product_id
int64
inventory_item_id
int64
status
string
created_at
string
shipped_at
string
delivered_at
string
returned_at
null
sale_price
float64
152,013
104,663
83,582
14,235
410,368
Cancelled
2023-05-07 06:08:40+00:00
null
null
null
0.02
40,993
28,204
22,551
14,235
110,590
Complete
2023-03-14 03:47:21+00:00
2023-03-15 22:57:00+00:00
2023-03-18 01:08:00+00:00
null
0.02
51,224
35,223
28,215
14,235
138,236
Complete
2023-12-05 13:25:30+00:00
2023-12-06 01:20:00+00:00
2023-12-10 10:04:00+00:00
null
0.02
36,717
25,278
20,165
14,235
99,072
Shipped
2023-12-22 20:48:19+00:00
2023-12-24 16:44:00+00:00
null
null
0.02
131,061
90,241
71,954
14,235
353,798
Shipped
2022-06-19 16:57:59+00:00
2022-06-19 19:29:00+00:00
null
null
0.02
154,022
106,052
84,693
14,235
415,780
Shipped
2023-09-19 09:13:08+00:00
2023-09-16 09:24:00+00:00
null
null
0.02
67,253
46,269
37,023
14,159
181,497
Complete
2021-10-31 01:26:46+00:00
2021-11-01 17:47:00+00:00
2021-11-02 13:29:00+00:00
null
0.49
116,116
80,002
63,821
14,159
313,368
Complete
2022-04-01 13:25:52+00:00
2022-03-31 05:13:00+00:00
2022-04-02 22:18:00+00:00
null
0.49
28,239
19,512
15,553
14,159
76,146
Shipped
2023-10-29 08:08:40+00:00
2023-10-29 16:59:00+00:00
null
null
0.49
69,641
47,894
38,312
14,159
187,914
Shipped
2024-01-07 23:06:39+00:00
2024-01-10 19:32:00+00:00
null
null
0.49
132,745
91,372
72,876
14,202
358,368
Cancelled
2023-03-29 07:54:55+00:00
null
null
null
1.5
166,920
114,977
91,839
28,700
450,614
Cancelled
2020-07-02 15:08:04+00:00
null
null
null
1.5
54,884
37,750
30,232
28,700
148,082
Complete
2023-02-27 02:31:30+00:00
2023-03-01 14:39:00+00:00
2023-03-03 16:51:00+00:00
null
1.5
97,403
67,023
53,552
14,202
262,807
Complete
2022-10-04 11:51:58+00:00
2022-10-04 17:02:00+00:00
2022-10-05 15:03:00+00:00
null
1.5
116,568
80,301
64,053
28,700
314,574
Complete
2022-11-02 10:31:26+00:00
2022-11-02 11:21:00+00:00
2022-11-05 04:07:00+00:00
null
1.5
3,141
2,165
1,760
28,700
8,464
Processing
2024-01-07 06:45:55+00:00
null
null
null
1.5
75,920
52,253
41,873
14,202
204,851
Processing
2020-07-17 04:47:25+00:00
null
null
null
1.5
80,164
55,159
44,189
14,202
216,335
Processing
2023-01-18 11:47:18+00:00
null
null
null
1.5
142,854
98,355
78,482
28,700
385,646
Returned
2023-10-13 06:08:29+00:00
2023-10-14 02:38:00+00:00
2023-10-14 20:04:00+00:00
null
1.5
28,951
20,008
15,959
28,700
78,056
Shipped
2021-02-27 03:16:44+00:00
2021-02-25 19:08:00+00:00
null
null
1.5
127,343
87,683
69,897
14,202
343,765
Shipped
2023-08-08 16:19:38+00:00
2023-08-08 20:00:00+00:00
null
null
1.5
123,936
85,334
68,055
13,629
334,545
Processing
2023-12-11 01:10:06+00:00
null
null
null
1.51
163,019
112,277
89,682
13,629
440,084
Processing
2023-04-27 01:35:01+00:00
null
null
null
1.51
12,417
8,613
6,882
13,629
33,494
Returned
2024-01-12 17:39:04+00:00
2024-01-13 04:11:00+00:00
2024-01-16 17:17:00+00:00
null
1.51
29,454
20,362
16,244
13,629
79,396
Shipped
2023-12-01 15:45:51+00:00
2023-12-03 07:48:00+00:00
null
null
1.51
70,326
48,347
38,681
13,629
189,772
Shipped
2022-04-08 13:13:27+00:00
2022-04-09 11:52:00+00:00
null
null
1.51
142,090
97,824
78,066
14,298
383,592
Cancelled
2023-06-25 11:40:22+00:00
null
null
null
1.72
156,224
107,558
85,940
14,298
421,725
Processing
2022-09-27 13:36:09+00:00
null
null
null
1.72
49,378
33,965
27,223
14,298
133,187
Returned
2023-05-15 02:22:01+00:00
2023-05-14 18:35:00+00:00
2023-05-18 21:12:00+00:00
null
1.72
81,338
55,968
44,832
14,298
219,506
Shipped
2023-02-26 12:26:52+00:00
2023-02-26 17:00:00+00:00
null
null
1.72
181,002
124,695
99,579
12,536
488,701
Cancelled
2022-11-19 17:26:48+00:00
null
null
null
1.75
35,882
24,703
19,697
12,536
96,821
Complete
2023-11-23 04:34:36+00:00
2023-11-23 09:20:00+00:00
2023-11-24 03:24:00+00:00
null
1.75
112,748
77,696
62,002
12,536
304,194
Complete
2024-01-17 03:54:46.754527+00:00
2024-01-15 10:04:24.754527+00:00
2024-01-19 05:05:24.754527+00:00
null
1.75
117,438
80,895
64,513
12,536
316,927
Processing
2023-11-04 05:25:47+00:00
null
null
null
1.75
166,143
114,444
91,424
12,536
448,518
Processing
2021-11-19 13:59:16+00:00
null
null
null
1.75
31,487
21,731
17,324
13,659
84,875
Cancelled
2020-12-25 12:05:04+00:00
null
null
null
1.82
104,924
72,282
57,732
13,659
283,091
Complete
2023-04-18 01:05:54+00:00
2023-04-14 04:16:00+00:00
2023-04-14 13:04:00+00:00
null
1.82
122,182
84,145
67,100
15,332
329,813
Complete
2023-10-08 12:48:46+00:00
2023-10-04 17:41:00+00:00
2023-10-07 21:58:00+00:00
null
1.82
142,870
98,364
78,491
15,332
385,686
Complete
2023-06-26 12:26:41+00:00
2023-06-27 13:23:00+00:00
2023-06-29 11:24:00+00:00
null
1.82
145,938
100,484
80,219
13,659
394,011
Complete
2023-11-07 14:27:25+00:00
2023-11-10 11:08:00+00:00
2023-11-11 05:10:00+00:00
null
1.82
105,331
72,555
57,930
15,332
284,202
Processing
2023-11-16 12:24:48+00:00
null
null
null
1.82
117,019
80,598
64,267
15,332
315,795
Processing
2021-06-20 07:17:24+00:00
null
null
null
1.82
152,653
105,117
83,953
15,332
412,095
Processing
2022-11-12 16:31:57+00:00
null
null
null
1.82
81,594
56,136
44,961
13,659
220,214
Shipped
2023-10-08 14:03:37+00:00
2023-10-10 02:28:00+00:00
null
null
1.82
102,820
70,796
56,552
15,332
277,378
Shipped
2024-01-19 15:33:14.154062+00:00
2024-01-17 21:39:25.154062+00:00
null
null
1.82
1,069
731
582
9,204
2,932
Cancelled
2024-01-13 06:10:54+00:00
null
null
null
1.95
61,156
42,147
33,685
9,204
165,031
Cancelled
2019-03-28 15:22:27+00:00
null
null
null
1.95
113,652
78,311
62,477
9,043
306,681
Cancelled
2023-12-18 14:25:23+00:00
null
null
null
1.95
142,358
98,008
78,211
9,043
384,301
Cancelled
2023-11-22 02:57:31+00:00
null
null
null
1.95
161,295
111,090
88,725
3,049
435,403
Cancelled
2023-11-14 13:44:57+00:00
null
null
null
1.95
84,206
57,925
46,323
9,204
227,254
Complete
2022-08-14 06:54:15+00:00
2022-08-15 19:56:00+00:00
2022-08-19 08:36:00+00:00
null
1.95
106,062
73,063
58,346
9,204
286,200
Complete
2022-06-30 23:36:20+00:00
2022-06-29 16:39:00+00:00
2022-07-01 12:46:00+00:00
null
1.95
162,941
112,229
89,650
3,049
439,866
Complete
2024-01-16 04:09:58.421926+00:00
2024-01-18 12:58:32.421926+00:00
2024-01-19 11:39:32.421926+00:00
null
1.95
181,578
125,103
99,896
9,204
490,203
Complete
2023-01-18 15:00:38+00:00
2023-01-19 13:41:00+00:00
2023-01-19 21:05:00+00:00
null
1.95
59,904
41,260
33,010
3,049
161,687
Processing
2023-11-18 06:06:37+00:00
null
null
null
1.95
125,970
86,767
69,166
9,043
340,042
Processing
2023-02-17 10:16:33+00:00
null
null
null
1.95
143,189
98,583
78,667
9,204
386,549
Processing
2023-08-05 07:56:39+00:00
null
null
null
1.95
180,898
124,617
99,514
9,043
488,414
Processing
2023-03-15 02:58:39+00:00
null
null
null
1.95
93,025
64,020
51,156
3,049
251,111
Returned
2023-03-05 16:41:10+00:00
2023-03-08 08:36:00+00:00
2023-03-11 21:56:00+00:00
null
1.95
140,789
96,914
77,336
3,049
380,056
Returned
2022-09-05 05:21:32+00:00
2022-09-05 08:22:00+00:00
2022-09-08 16:11:00+00:00
null
1.95
166,576
114,731
91,647
3,049
449,685
Returned
2023-04-21 08:19:13+00:00
2023-04-22 18:10:00+00:00
2023-04-26 17:58:00+00:00
null
1.95
171,785
118,280
94,475
9,043
463,795
Returned
2022-01-18 23:19:43+00:00
2022-01-21 20:00:00+00:00
2022-01-25 21:30:00+00:00
null
1.95
32,102
22,159
17,673
9,204
86,568
Shipped
2024-01-07 12:18:21+00:00
2024-01-10 00:13:00+00:00
null
null
1.95
42,383
29,164
23,308
3,049
114,350
Shipped
2023-10-27 04:35:47+00:00
2023-10-30 04:21:00+00:00
null
null
1.95
85,801
59,027
47,169
9,043
231,539
Shipped
2022-05-21 22:43:32+00:00
2022-05-21 06:39:00+00:00
null
null
1.95
133,864
92,143
73,474
9,204
361,384
Shipped
2022-06-15 12:54:18+00:00
2022-06-13 06:16:00+00:00
null
null
1.95
135,022
92,924
74,123
9,204
364,502
Shipped
2021-04-03 09:29:53+00:00
2021-04-04 06:00:00+00:00
null
null
1.95
167,684
115,497
92,256
9,043
452,724
Shipped
2023-08-20 18:08:32+00:00
2023-08-20 02:15:00+00:00
null
null
1.95
14,670
10,167
8,089
14,549
39,615
Cancelled
2023-08-18 04:50:16+00:00
null
null
null
1.98
62,167
42,812
34,236
14,549
167,755
Shipped
2021-01-24 18:15:02+00:00
2021-01-27 05:31:00+00:00
null
null
1.98
59,801
41,193
32,956
13,606
161,411
Cancelled
2023-10-27 06:40:32+00:00
null
null
null
2.5
16,354
11,304
9,056
13,606
44,168
Complete
2022-12-25 09:46:43+00:00
2022-12-22 15:07:00+00:00
2022-12-23 18:10:00+00:00
null
2.5
115,641
79,667
63,561
13,606
312,091
Complete
2023-04-29 12:04:29+00:00
2023-05-01 01:49:00+00:00
2023-05-01 02:29:00+00:00
null
2.5
65,720
45,214
36,192
13,606
177,352
Processing
2019-06-18 09:15:28+00:00
null
null
null
2.5
84,694
58,284
46,591
13,606
228,573
Processing
2023-02-19 03:30:49+00:00
null
null
null
2.5
156,115
107,484
85,876
13,606
421,428
Returned
2023-08-05 14:28:49+00:00
2023-08-03 04:51:00+00:00
2023-08-06 04:30:00+00:00
null
2.5
106,562
73,407
58,613
13,606
287,521
Shipped
2023-10-04 12:09:15+00:00
2023-10-01 07:21:00+00:00
null
null
2.5
173,565
119,498
95,400
28,913
468,609
Complete
2021-12-30 06:35:06+00:00
2021-12-31 18:40:00+00:00
2022-01-05 03:10:00+00:00
null
2.59
104,515
71,989
57,497
28,913
282,008
Processing
2023-09-05 14:51:43+00:00
null
null
null
2.59
140,974
97,036
77,439
28,913
380,557
Processing
2023-08-05 06:29:14+00:00
null
null
null
2.59
33,817
23,311
18,628
28,913
91,211
Returned
2021-12-31 03:33:39+00:00
2021-12-30 19:53:00+00:00
2021-12-30 20:38:00+00:00
null
2.59
93,470
64,313
51,374
28,913
252,295
Returned
2023-12-03 07:38:33+00:00
2023-12-05 06:17:00+00:00
2023-12-07 11:37:00+00:00
null
2.59
101,469
69,866
55,835
28,913
273,732
Shipped
2023-10-20 01:44:58+00:00
2023-10-21 05:23:00+00:00
null
null
2.59
117,388
80,864
64,487
28,913
316,788
Shipped
2023-03-01 11:13:13+00:00
2023-03-04 08:38:00+00:00
null
null
2.59
39,381
27,116
21,688
13,690
106,234
Cancelled
2022-01-01 12:36:06+00:00
null
null
null
2.67
102,962
70,898
56,630
15,395
277,764
Cancelled
2022-07-24 08:09:34+00:00
null
null
null
2.67
137,600
94,726
75,576
13,690
371,416
Cancelled
2024-01-04 12:49:19+00:00
null
null
null
2.67
137,626
94,743
75,590
15,395
371,489
Complete
2020-04-01 11:04:08+00:00
2020-04-03 19:56:00+00:00
2020-04-08 11:55:00+00:00
null
2.67
43,077
29,644
23,690
13,690
116,183
Processing
2023-08-26 07:36:41+00:00
null
null
null
2.67
73,460
50,546
40,487
13,690
198,233
Processing
2023-10-30 23:04:09+00:00
null
null
null
2.67
177,399
122,200
97,546
13,690
478,974
Processing
2023-07-30 22:08:49+00:00
null
null
null
2.67
180,194
124,128
99,135
15,395
486,514
Processing
2021-02-10 01:14:37+00:00
null
null
null
2.67
14,467
10,030
7,978
13,690
39,061
Shipped
2020-10-16 10:28:11+00:00
2020-10-18 22:09:00+00:00
null
null
2.67
105,792
72,880
58,189
15,395
285,466
Shipped
2023-03-03 03:58:29+00:00
2023-03-04 00:42:00+00:00
null
null
2.67
110,705
76,286
60,867
15,395
298,712
Shipped
2023-05-19 13:53:59+00:00
2023-05-22 11:49:00+00:00
null
null
2.67
168,382
115,969
92,622
28,774
454,607
Complete
2023-07-21 03:59:33+00:00
2023-07-19 06:22:00+00:00
2023-07-21 05:28:00+00:00
null
2.78
180,370
124,252
99,237
28,774
486,997
Complete
2023-12-14 02:34:01+00:00
2023-12-12 03:14:00+00:00
2023-12-12 19:54:00+00:00
null
2.78
88,577
60,943
48,728
28,774
239,073
Processing
2023-03-25 13:06:51+00:00
null
null
null
2.78
156,194
107,539
85,923
28,774
421,648
Processing
2023-06-23 02:29:02+00:00
null
null
null
2.78
43,793
30,142
24,084
28,774
118,119
Shipped
2022-06-06 07:00:33+00:00
2022-06-03 21:54:00+00:00
null
null
2.78
End of preview.

Analyzing Consumption Efficiency Over Time: The Regret Gap and Logistical Burden in Global E-commerce

Project Presentation

Video Presentation

Research Question

"Analyzing Consumption Efficiency Over Time: What are the peak effective hours for e-commerce activity, and what is the logistical cost of high-risk nocturnal purchases?"


Project Overview

This project investigates the psychological and logistical boundaries of modern e-commerce. The research utilized a complex relational dataset consisting of 7 different tables. Through a process of strategic selection, the 4 most relevant tables (Orders, Order_Items, Products, and Users) were integrated to create a unified master dataset containing over 181,000 records.

The primary objective was to identify the "Regret Gap": a phenomenon where late-night, impulsive purchases—driven by lowered cognitive barriers—lead to higher return rates and significant logistical inefficiencies.

Methodology and Data Pipeline

To transform raw data into actionable business insights, a rigorous cleaning and normalization process was implemented:

  1. Data Integration and Integrity: Joined 4 tables using unique identifiers (Order ID, User ID).
  2. Missing Value Imputation:
    • User Identity Logic: Identified identical User IDs to complete missing demographic details.
    • Temporal Completion: Derived day of the week and specific dates where timestamp data was incomplete.
  3. Local Time Normalization: Converted UTC timestamps into the user's local time based on their geographic coordinates. This step was critical for enabling behavioral analysis relative to the user's actual time of day.
  4. Outlier Removal: Filtered the top 2% of price points and removed illogical data points (e.g., ages 0 or 120, and transactions with zero profit).

Statistical Overview

Broad statistical analysis revealed a significant trend: while afternoon hours (14:00-17:00) record the highest volume of "safe" transactions, the post-midnight window (00:00-05:00) accounts for a disproportionate percentage of total return costs.

Visual Analysis and Findings

1. 24-Hour Business Health: Volume vs. Risk

  • Visualization: A dual-axis chart comparing total order volume against the probability of return over a 24-hour cycle.
  • Analysis: While sales volume remains relatively steady throughout the day, the probability of risk (cancellations and returns) spikes significantly between 00:00 and 06:00.
  • Conclusion: Nocturnal sales often represent "illusory revenue"—they appear positive on real-time dashboards but translate into logistical burdens within the following week.

24-Hour Business Health

2. Global Order Density: The Biological Clock

  • Visualization: A geospatial Choropleth map normalized to local time zones.
  • Analysis: Regardless of geography or specific market, return density correlates with the local "night-time wave."
  • Conclusion: Purchase efficiency is tied to the human biological clock rather than geography. Night-time regret is a universal behavioral trait.

Global Order Density

3. Statistical Validation: Chi-Square Test

  • Visualization: A statistical summary table/heatmap of the Chi-Square contingency test.
  • Analysis: Tested the independence between the purchase time window and final order status.
  • Conclusion: With a p-value < 0.05, the time of day is a statistically significant predictor of order success. This confirms the patterns observed are not coincidental.

Statistical Validation

4. Behavioral Mirror: Complex Fit vs. One-Size

  • Visualization: A "Mirror" Lollipop chart comparing different product categories.
  • Analysis: Categories such as Jeans and Sweaters (Complex Fit) experience a massive spike in returns at night due to sizing errors made under fatigue. Conversely, Accessories (One-Size) remain stable.
  • Conclusion: Night-time risk is category-dependent. Retailers should avoid promoting products requiring high cognitive effort (such as precise sizing) during low-energy hours.

Behavioral Mirror Chart

5. Purchase Price Distribution and the Regret Gap

  • Visualization: Analysis divided into two parts: Distribution Density and Median Price Trends.
  • Analysis: Paradoxically, median prices are higher at night, as consumers tend to make more expensive impulse purchases.
  • Conclusion: This represents the core of the Regret Gap. Consumers commit to expensive items when their cognitive barriers are low, leading to "buyer's remorse" the following morning.

Distribution Density

Price Distribution Analysis

Strategic Business Conclusions

  • Advertising Optimization: Reallocate marketing budgets away from nocturnal hours for categories requiring complex fit.
  • Cooling-off Period: Implement a 4-hour processing delay for high-value night orders to allow for morning cancellations before the logistics chain is activated.
  • Dynamic User Interface: Adjust the digital storefront to feature low-risk items (such as accessories) during late-night hours.

Future Research Questions

  • Social Media Influence: How do specific platforms (TikTok vs. Instagram) influence impulse purchasing behavior across different time windows?
  • Demographic Deep-Dive: Does the Regret Gap vary significantly based on the shopper's age or gender?
  • AI Intervention: Can real-time AI sizing assistants mitigate the night-time return spike in the apparel category?
Downloads last month
175