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 8 new columns ({'pm2_5_ugm3', 'pm10_ugm3', 'no2_ugm3', 'so2_ugm3', 'AQI_label', 'city_enc', 'AQI_category', 'co_ugm3'}) and 7 missing columns ({'pm2_5_ugm3_log', 'city', 'no2_ugm3_log', 'so2_ugm3_log', 'co_ugm3_log', 'AQI', 'pm10_ugm3_log'}).

This happened while the csv dataset builder was generating data using

hf://datasets/rachitgoyell/vayu-cleaned/02_classification/clf_train_scaled.csv (at revision 07b4a2f4236958a6e74f495a677bd1bdc83fd5b6), [/tmp/hf-datasets-cache/medium/datasets/39616892930706-config-parquet-and-info-rachitgoyell-vayu-cleaned-9c28150a/hub/datasets--rachitgoyell--vayu-cleaned/snapshots/07b4a2f4236958a6e74f495a677bd1bdc83fd5b6/01_regression/regression_train.csv (origin=hf://datasets/rachitgoyell/vayu-cleaned@07b4a2f4236958a6e74f495a677bd1bdc83fd5b6/01_regression/regression_train.csv), /tmp/hf-datasets-cache/medium/datasets/39616892930706-config-parquet-and-info-rachitgoyell-vayu-cleaned-9c28150a/hub/datasets--rachitgoyell--vayu-cleaned/snapshots/07b4a2f4236958a6e74f495a677bd1bdc83fd5b6/02_classification/clf_train_scaled.csv (origin=hf://datasets/rachitgoyell/vayu-cleaned@07b4a2f4236958a6e74f495a677bd1bdc83fd5b6/02_classification/clf_train_scaled.csv), /tmp/hf-datasets-cache/medium/datasets/39616892930706-config-parquet-and-info-rachitgoyell-vayu-cleaned-9c28150a/hub/datasets--rachitgoyell--vayu-cleaned/snapshots/07b4a2f4236958a6e74f495a677bd1bdc83fd5b6/02_classification/clf_train_unscaled.csv (origin=hf://datasets/rachitgoyell/vayu-cleaned@07b4a2f4236958a6e74f495a677bd1bdc83fd5b6/02_classification/clf_train_unscaled.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 1890, in _prepare_split_single
                  writer.write_table(table)
                File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 760, in write_table
                  pa_table = table_cast(pa_table, self._schema)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2272, in table_cast
                  return cast_table_to_schema(table, schema)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2218, in cast_table_to_schema
                  raise CastError(
              datasets.table.CastError: Couldn't cast
              pm2_5_ugm3: double
              pm10_ugm3: double
              co_ugm3: double
              no2_ugm3: double
              so2_ugm3: double
              o3_ugm3: double
              city_enc: double
              month: double
              hour: double
              day_of_week: double
              AQI_label: int64
              AQI_category: string
              -- schema metadata --
              pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 1666
              to
              {'city': Value('string'), 'pm2_5_ugm3_log': Value('float64'), 'pm10_ugm3_log': Value('float64'), 'co_ugm3_log': Value('float64'), 'no2_ugm3_log': Value('float64'), 'so2_ugm3_log': Value('float64'), 'o3_ugm3': Value('float64'), 'month': Value('float64'), 'hour': Value('int64'), 'day_of_week': Value('int64'), 'AQI': 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 1892, 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 8 new columns ({'pm2_5_ugm3', 'pm10_ugm3', 'no2_ugm3', 'so2_ugm3', 'AQI_label', 'city_enc', 'AQI_category', 'co_ugm3'}) and 7 missing columns ({'pm2_5_ugm3_log', 'city', 'no2_ugm3_log', 'so2_ugm3_log', 'co_ugm3_log', 'AQI', 'pm10_ugm3_log'}).
              
              This happened while the csv dataset builder was generating data using
              
              hf://datasets/rachitgoyell/vayu-cleaned/02_classification/clf_train_scaled.csv (at revision 07b4a2f4236958a6e74f495a677bd1bdc83fd5b6), [/tmp/hf-datasets-cache/medium/datasets/39616892930706-config-parquet-and-info-rachitgoyell-vayu-cleaned-9c28150a/hub/datasets--rachitgoyell--vayu-cleaned/snapshots/07b4a2f4236958a6e74f495a677bd1bdc83fd5b6/01_regression/regression_train.csv (origin=hf://datasets/rachitgoyell/vayu-cleaned@07b4a2f4236958a6e74f495a677bd1bdc83fd5b6/01_regression/regression_train.csv), /tmp/hf-datasets-cache/medium/datasets/39616892930706-config-parquet-and-info-rachitgoyell-vayu-cleaned-9c28150a/hub/datasets--rachitgoyell--vayu-cleaned/snapshots/07b4a2f4236958a6e74f495a677bd1bdc83fd5b6/02_classification/clf_train_scaled.csv (origin=hf://datasets/rachitgoyell/vayu-cleaned@07b4a2f4236958a6e74f495a677bd1bdc83fd5b6/02_classification/clf_train_scaled.csv), /tmp/hf-datasets-cache/medium/datasets/39616892930706-config-parquet-and-info-rachitgoyell-vayu-cleaned-9c28150a/hub/datasets--rachitgoyell--vayu-cleaned/snapshots/07b4a2f4236958a6e74f495a677bd1bdc83fd5b6/02_classification/clf_train_unscaled.csv (origin=hf://datasets/rachitgoyell/vayu-cleaned@07b4a2f4236958a6e74f495a677bd1bdc83fd5b6/02_classification/clf_train_unscaled.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.

city
string
pm2_5_ugm3_log
float64
pm10_ugm3_log
float64
co_ugm3_log
float64
no2_ugm3_log
float64
so2_ugm3_log
float64
o3_ugm3
float64
month
float64
hour
int64
day_of_week
int64
AQI
float64
dehradun
3.186353
3.190476
6.200509
2.867899
2.197225
97
6
19
2
97.1
bengaluru
3.030134
3.374169
5.869297
2.99072
2.667228
34
9
6
4
34
shimla
1.757858
1.774952
5.659482
0.916291
1.163151
121
8
11
4
131.6
jaipur
3.126761
3.161247
5.945421
2.667228
2.00148
75
8
21
6
75.5
imphal
3.589059
3.589059
6.490724
3.552487
1.704748
19
9
21
6
59.5
visakhapatnam
3.178054
3.273364
7.704812
3.407842
1.609438
23
4
4
1
106.2
jaipur
3.198673
4.102643
5.003946
1.193922
1.481605
98
6
12
2
98
patna
4.59512
4.989071
6.697034
3.586293
3.148453
110
11
17
5
227.4
shimla
2.617396
2.95491
5.030438
1.410987
1.686399
99
9
17
2
99
ahmedabad
2.99072
3.38439
5.509388
1.774952
2.251292
145
2
17
5
166.5
kolkata
2.653242
3.00072
5.700444
2.827314
2.747271
21
9
2
2
22
bengaluru
3.763523
4.19268
6.09357
3.068053
2.557227
91
10
23
3
91.2
guwahati
3.637586
3.994524
5.63479
0.788457
1.280934
136
5
12
6
153.4
shimla
2.821379
3.157
5.438079
2.476538
1.193922
80
8
19
5
80.4
thiruvananthapuram
1.740466
2.272126
4.634729
1.280934
0.693147
38
10
5
2
38
kolkata
5.050497
5.508983
7.083388
4.01458
3.706228
52
1
21
5
348.6
bhopal
2.312535
3.109061
4.882802
0.587787
1.193922
80
8
14
1
80.4
dehradun
3.284664
3.634951
6.431331
3.020425
1.84055
32
2
4
2
42.8
ahmedabad
3.561046
3.589059
6.059123
3.850148
2.564949
16
1
3
5
58.4
kohima
3.496508
3.508556
5.429346
2.778819
1.629241
34
1
3
1
54.3
dehradun
2.901422
3.33577
6.308098
3.039749
1.931521
26
11
1
3
28.7
ahmedabad
3.864931
4.302713
5.988961
1.722767
2.960105
144
12
14
3
165.1
delhi
3.962716
4.324133
6.549651
2.501436
3.808882
169
12
12
3
203.5
kolkata
4.395683
4.404277
7.16858
3.342862
2.772589
39
11
2
4
167.3
chandigarh
4.065602
4.07244
6.732211
3.754199
3.258097
66
10
20
3
95.6
bhopal
4.123903
4.168214
5.690359
1.360977
2.379546
137
10
15
2
154.9
bhopal
3.943522
4.483003
5.877736
1.526056
2.066863
90
10
8
1
90.2
bhubaneswar
3.589059
3.992681
5.609472
2.388763
2.433613
126
2
16
6
138.9
thiruvananthapuram
3.178054
3.206803
5.966147
2.653242
1.987874
71
11
6
4
71.6
ahmedabad
4.171306
4.55703
6.946014
4.508659
2.944439
33
11
19
4
113.5
guwahati
3.068053
3.404525
5.497168
1.774952
1.360977
63
7
19
1
63.7
gurugram
4.102643
5.678465
5.899897
2.128232
2.884801
146
11
14
0
340.4
shillong
2.104134
2.104134
5.398163
1.686399
0.470004
52
8
4
5
53
imphal
2.923162
3.277145
6.126869
2.61007
1.335001
33
6
1
1
33
patna
3.453157
3.802208
5.934894
2.61007
2.721295
76
9
21
6
76.5
itanagar
2.809403
2.833213
5.645447
1.916923
0.993252
73
8
18
4
73.5
lucknow
3.520461
3.520461
6.109248
2.873565
2.302585
63
8
20
5
63.7
dehradun
3.575151
3.577948
6.381816
3.374169
2.370244
23
11
8
4
58.7
gangtok
3.00072
3.109061
5.666427
0.741937
1.223775
123
11
11
1
134.5
bengaluru
1.435085
2.116256
4.584967
1.335001
0.955511
35
7
3
3
35
ahmedabad
3.93574
4.289089
7.103322
4.54223
3.104587
29
2
20
1
113.8
gangtok
1.808289
2.116256
6.054439
1.193922
0.832909
79
9
11
0
79.4
mumbai
4.708629
4.716712
6.803505
3.190476
3.824284
95
12
22
5
266.7
thiruvananthapuram
2.985682
3.523415
5.204007
1.589235
1.252763
67
4
0
6
67.7
imphal
3.122365
3.131137
5.347108
3.113515
1.163151
12
11
1
1
36.2
ahmedabad
2.944439
3.367296
5.225747
2.197225
2.251292
73
6
6
5
73.5
chandigarh
4.326778
4.731803
6.448889
3.681351
2.766319
103
6
20
5
149.5
dehradun
3.139833
3.487375
5.488938
0.875469
1.335001
130
7
14
6
144.7
ranchi
3.74242
4.104295
5.916202
1.916923
3.044522
102
10
5
6
103.9
aizawl
2.906901
3.246491
5.991465
1.94591
0.262364
8
10
2
2
28.8
kolkata
3.234749
3.640214
5.438079
2.00148
2.24071
105
6
1
2
108.3
aizawl
2.933857
3.277145
6.021023
3.126761
0.470004
23
10
21
5
29.7
bengaluru
3.025291
3.374169
5.786897
2.833213
1.88707
55
5
2
0
55.9
delhi
3.591818
3.906005
6.498282
3.218876
2.753661
47
10
5
3
59.7
shillong
3.265759
3.610918
6.280396
2.76001
1.252763
48
1
22
5
48
bengaluru
3.325036
3.360375
6.361302
2.970414
2.104134
57
3
4
0
57.9
kolkata
4.713127
5.085743
7.704812
4.133565
4.105944
30
11
0
5
268.3
patna
2.884801
2.933857
5.590987
2.557227
2.785011
58
9
7
6
58.8
jaipur
3.499533
4.19268
5.926926
2.525729
2.302585
88
2
17
5
88.2
raipur
5.050497
5.434595
7.142037
4.18662
4.652054
17
12
3
3
331.2
kolkata
4.418841
4.423648
6.668228
3.250374
3.11795
49
10
23
5
173.6
gangtok
2.261763
2.312535
5.288267
2.261763
0.741937
68
6
3
5
68.6
guwahati
3.543854
3.943522
5.866468
1.589235
1.722767
85
3
19
0
85.3
kohima
2.734368
3.100092
5.777652
0.641854
0.405465
122
4
9
1
133
aizawl
3.804438
4.200205
5.910797
1.252763
2.104134
79
2
0
2
79.4
kolkata
4.104295
4.551769
6.084499
2.890372
2.97553
50
8
22
2
99.3
panaji
2.341806
2.821379
5.01728
1.757858
1.131402
20
8
2
2
20
bhopal
2.714695
3.246491
4.919981
1.648659
1.193922
73
6
21
2
73.5
gurugram
4.000034
4.406719
6.098074
2.714695
3.875359
200
3
12
6
280.2
panaji
3.161247
3.186353
5.641907
2.815409
1.648659
45
11
22
0
45
chandigarh
3.258097
3.453157
6.196444
3.010621
2.980619
90
4
0
2
90.2
lucknow
2.879198
3.222868
5.631212
1.916923
2.415914
105
9
10
1
108.3
patna
4.380776
4.395683
6.403574
1.808289
2.766319
144
1
14
4
165.1
bhopal
2.895912
4.210645
5.337538
0.470004
1.808289
177
4
12
0
223.3
lucknow
2.960105
3.411148
5.187386
0.405465
2.151762
165
4
13
1
195.6
raipur
3.280911
4.087656
5.598422
1.774952
3.265759
195
5
14
3
267.8
jaipur
3.38439
3.970292
5.799093
3.030134
2.174752
46
5
3
5
53
patna
2.66026
2.995732
5.723585
2.564949
2.884801
46
9
8
1
46
ahmedabad
2.701361
3.465736
5.010635
1.410987
1.335001
117
5
17
6
125.8
lucknow
3.077312
3.417727
5.605802
2.939162
1.974081
48
8
1
4
48
bhubaneswar
2.949688
3.363842
5.641907
2.4681
1.280934
65
10
10
1
65.7
kohima
2.104134
2.140066
5.361292
0.741937
0.405465
77
10
8
0
77.5
gangtok
1.410987
1.648659
5.068904
0.993252
0.336472
86
6
10
4
86.3
patna
3.144152
3.496508
5.666427
2.501436
2.312535
119
8
16
0
128.7
ahmedabad
2.415914
2.844909
5.886104
2.370244
1.987874
70
3
9
4
70.6
dehradun
3.182212
3.529297
5.537334
0.693147
1.902108
127
9
12
1
140.3
panaji
2.60269
2.965273
5.505332
2.517696
0.875469
23
9
0
1
23
shimla
3.552487
4.404277
5.872118
2.341806
1.84055
132
6
20
6
147.6
hyderabad
3.339322
3.799974
5.746203
2.208274
2.028148
81
2
23
4
81.4
shillong
2.965273
3.306887
6.118097
1.88707
1.163151
48
1
0
5
48
visakhapatnam
3.572346
3.953165
6.09131
3.063391
3.605498
144
10
14
1
165.1
mumbai
2.895912
3.65584
4.919981
1.916923
1.740466
52
6
6
2
53
gangtok
3.353407
3.701302
6.504288
3.295837
1.193922
69
1
19
4
69.6
delhi
5.050497
5.678465
7.704812
4.651099
4.652054
27
1
9
0
348.6
bhubaneswar
3.010621
3.529297
5.135798
1.667707
1.629241
76
6
0
1
76.5
patna
3.563883
4.005513
6.184149
2.61007
2.564949
46
4
5
4
58
kolkata
3.540959
3.981549
5.703782
0.832909
3.449988
177
2
13
1
223.3
kolkata
4.171306
4.547541
6.923629
3.616309
3.591818
41
3
0
6
113.5
raipur
3.819908
4.273884
6.079933
3.015535
4.185099
117
4
9
1
125.8
jaipur
3.360375
3.725693
5.723585
2.595255
2.079442
67
11
21
0
67.7
End of preview.

VAYU — Cleaned and Model-Ready CPCB Air Quality Data

Cleaned, feature-engineered, and split datasets ready for ML training.
Produced by the VAYU data preparation pipeline from raw CPCB sensor data.

Contents

Folder File Use With
05_shared/ master_cleaned.parquet All models — primary cleaned file
05_shared/ master_cleaned.csv Same, human-readable backup
01_regression/ regression_train.csv Linear Regression, Multiple Regression
01_regression/ regression_test.csv Linear Regression, Multiple Regression
02_classification/ clf_train_scaled.csv Logistic Regression, KNN, SVM
02_classification/ clf_train_unscaled.csv Decision Trees, Random Forest
02_classification/ clf_test_scaled.csv Logistic Regression, KNN, SVM
02_classification/ clf_test_unscaled.csv Decision Trees, Random Forest
02_classification/ label_map.json Decode integer predictions to category names
03_clustering/ city_profiles_scaled.csv K-Means clustering
03_clustering/ city_clusters.csv City cluster assignments + labels
04_dimensionality/ pollutant_matrix_scaled.csv PCA, t-SNE, SVD
04_dimensionality/ pca_components.csv Pre-computed PCA coordinates
04_dimensionality/ pca_loadings.csv Component loadings + variance explained
04_dimensionality/ tsne_sample.csv t-SNE 2D coordinates (15k sample)

Cleaning Operations Applied

  1. Sentinel value 999NaN (CPCB sensor error code)
  2. Physical range validation per pollutant (unit-aware — CO stored as µg/m³)
  3. Forward fill short gaps ≤ 3 hours within each city
  4. Drop rows where all pollutants are NaN (extended outages)
  5. Deduplicate on city + datetime
  6. Parse datetime, extract month / hour / day_of_week / season
  7. Derive AQI_category from numeric AQI using CPCB breakpoints

Target Variables

Task Target Range
Regression AQI (numeric) 0 – 500
Classification AQI category (integer encoded) 0 = Good → 5 = Severe
Clustering None (unsupervised)

Related Repository

Raw source data: rachitgoyell/vayu-raw

Downloads last month
54