cosuleabianca commited on
Commit
4d4ff24
·
verified ·
1 Parent(s): a2c4ac2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +228 -3
README.md CHANGED
@@ -1,3 +1,228 @@
1
- ---
2
- license: cc-by-4.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ task_categories:
4
+ - time-series-forecasting
5
+ - tabular-regression
6
+ tags:
7
+ - air-quality
8
+ - pm25
9
+ - forecasting
10
+ - environment
11
+ - europe
12
+ - eea
13
+ language:
14
+ - en
15
+ pretty_name: EEA PM2.5 Air Quality Dataset (Europe)
16
+ size_categories:
17
+ - 1M<n<10M
18
+ ---
19
+
20
+ # EEA PM2.5 Air Quality Dataset
21
+
22
+ Hourly air quality measurements from the European Environment Agency (EEA) for PM2.5 forecasting research.
23
+
24
+ ## Dataset Description
25
+
26
+ This dataset contains hourly air pollutant concentrations and meteorological data from monitoring stations across 5 European cities, prepared for machine learning forecasting tasks.
27
+
28
+ ### Data Sources
29
+ - **Air Quality**: European Environment Agency (EEA) Air Quality Portal
30
+ - **Weather**: Open-Meteo Archive API
31
+
32
+ ### Coverage
33
+ - **Time Period**: 2018-01-08 to 2024-12-31
34
+ - **Countries**: 5 (AT, BE, ES, FI, FR)
35
+ - **Cities**: Wien, Paris, Madrid, Antwerpen, Helsinki
36
+ - **Monitoring Stations**: 38
37
+ - **Total Records**: 1,945,153 hourly observations
38
+ - **Total Features**: 81 columns
39
+
40
+ ## Dataset Files
41
+
42
+ ### Raw Data (Parquet)
43
+ | File | Description |
44
+ |------|-------------|
45
+ | `PM2.5.parquet` | PM2.5 concentrations (all sites) |
46
+ | `PM2.5_filtered.parquet` | PM2.5 (filtered to quality sites) |
47
+ | `NO2.parquet` | NO2 concentrations (all sites) |
48
+ | `NO2_filtered.parquet` | NO2 (filtered sites) |
49
+ | `PM10.parquet` | PM10 concentrations (all sites) |
50
+ | `PM10_filtered.parquet` | PM10 (filtered sites) |
51
+
52
+ ### ML-Ready Dataset
53
+ | File | Description | Size |
54
+ |------|-------------|------|
55
+ | `ml_ready_dataset_full_realistic.csv` | Feature-engineered dataset | ~1.6 GB |
56
+
57
+ ## Features (81 columns)
58
+
59
+ ### Metadata
60
+ - `Start`: Original timestamp
61
+ - `Country`: Country code (AT, BE, ES, FI, FR)
62
+ - `SiteNumber`: Station identifier
63
+ - `dt_utc`: Timestamp in UTC
64
+ - `dt_local`: Timestamp in local timezone
65
+
66
+ ### Site Metadata (Geographic)
67
+ - `Latitude`, `Longitude`, `Altitude`
68
+
69
+ ### Station Type (One-Hot Encoded)
70
+ - `StationType_background`
71
+ - `StationType_industrial`
72
+ - `StationType_traffic`
73
+
74
+ ### Station Area (One-Hot Encoded)
75
+ - `StationArea_rural`
76
+ - `StationArea_rural-nearcity`
77
+ - `StationArea_suburban`
78
+ - `StationArea_urban`
79
+
80
+ ### Weather Features (Open-Meteo API)
81
+ - `temperature_2m`: Air temperature at 2m (°C)
82
+ - `relative_humidity_2m`: Relative humidity (%)
83
+ - `dew_point_2m`: Dew point temperature (°C)
84
+ - `wind_u`: East-west wind component (m/s)
85
+ - `wind_v`: North-south wind component (m/s)
86
+ - `precipitation`: Hourly precipitation (mm)
87
+ - `surface_pressure`: Surface pressure (hPa)
88
+
89
+ ### Target Variable
90
+ - `PM2.5`: Current PM2.5 concentration (µg/m³)
91
+
92
+ ### Pollutant Features
93
+ - `NO2`: Current NO2 concentration
94
+ - `PM10`: Current PM10 concentration
95
+
96
+ ### Temporal Features
97
+ - `hour`, `day_of_week`, `day_of_month`, `month`, `year`
98
+ - `is_weekend`: Weekend indicator (0/1)
99
+ - `season`: Season indicator
100
+ - `hour_sin`, `hour_cos`: Cyclical hour encoding
101
+ - `month_sin`, `month_cos`: Cyclical month encoding
102
+
103
+ ### Lag Features (1h, 2h, 3h, 6h, 12h, 24h, 168h)
104
+ - `PM2.5_lag_1h`, `PM2.5_lag_2h`, `PM2.5_lag_3h`, `PM2.5_lag_6h`, `PM2.5_lag_12h`, `PM2.5_lag_24h`, `PM2.5_lag_168h`
105
+ - `NO2_lag_1h`, `NO2_lag_2h`, `NO2_lag_3h`, `NO2_lag_6h`, `NO2_lag_12h`, `NO2_lag_24h`, `NO2_lag_168h`
106
+ - `PM10_lag_1h`, `PM10_lag_2h`, `PM10_lag_3h`, `PM10_lag_6h`, `PM10_lag_12h`, `PM10_lag_24h`, `PM10_lag_168h`
107
+
108
+ ### Rolling Mean Features (3h, 6h, 12h, 24h windows)
109
+ - `PM2.5_rolling_mean_3h`, `PM2.5_rolling_mean_6h`, `PM2.5_rolling_mean_12h`, `PM2.5_rolling_mean_24h`
110
+ - `NO2_rolling_mean_3h`, `NO2_rolling_mean_6h`, `NO2_rolling_mean_12h`, `NO2_rolling_mean_24h`
111
+ - `PM10_rolling_mean_3h`, `PM10_rolling_mean_6h`, `PM10_rolling_mean_12h`, `PM10_rolling_mean_24h`
112
+
113
+ ### Rolling Std Features (3h, 6h, 12h, 24h windows)
114
+ - `PM2.5_rolling_std_3h`, `PM2.5_rolling_std_6h`, `PM2.5_rolling_std_12h`, `PM2.5_rolling_std_24h`
115
+ - `NO2_rolling_std_3h`, `NO2_rolling_std_6h`, `NO2_rolling_std_12h`, `NO2_rolling_std_24h`
116
+ - `PM10_rolling_std_3h`, `PM10_rolling_std_6h`, `PM10_rolling_std_12h`, `PM10_rolling_std_24h`
117
+
118
+ ## Data Quality
119
+
120
+ ### Filtering Criteria
121
+ Stations included meet these quality thresholds:
122
+ - **Train completeness**: ≥50% (2018-2022)
123
+ - **Test completeness**: ≥50% (2023-2024)
124
+ - **Maximum gap**: ≤168 hours
125
+
126
+ ### Preprocessing
127
+ - Sentinel values (<0) replaced with NaN
128
+ - Time-based lag/rolling features (handles data gaps correctly)
129
+ - Weather data merged by nearest hour
130
+ - Local timezone conversion for temporal features
131
+ - **No missing values** in final dataset
132
+
133
+ ## Stations by Country
134
+
135
+ | Country | City | Stations |
136
+ |---------|------|----------|
137
+ | AT | Wien | 10 |
138
+ | BE | Antwerpen | 8 |
139
+ | ES | Madrid | 9 |
140
+ | FI | Helsinki | 5 |
141
+ | FR | Paris | 6 |
142
+
143
+ ## Usage
144
+
145
+ ### Load with Pandas
146
+
147
+ ```python
148
+ import pandas as pd
149
+
150
+ # Load ML-ready dataset
151
+ df = pd.read_csv("ml_ready_dataset_full_realistic.csv")
152
+
153
+ # Train/test split (temporal)
154
+ train = df[df['dt_utc'] < '2023-01-01']
155
+ test = df[df['dt_utc'] >= '2023-01-01']
156
+ ```
157
+
158
+ ### Load with Hugging Face Datasets
159
+
160
+ ```python
161
+ from datasets import load_dataset
162
+
163
+ dataset = load_dataset("cosuleabianca/eea-pm25-dataset")
164
+ ```
165
+
166
+ ### Load Raw Parquet Files
167
+
168
+ ```python
169
+ import pandas as pd
170
+
171
+ pm25 = pd.read_parquet("PM2.5_filtered.parquet")
172
+ no2 = pd.read_parquet("NO2_filtered.parquet")
173
+ ```
174
+
175
+ ## Train/Test Split
176
+
177
+ | Split | Period | Purpose |
178
+ |-------|--------|---------|
179
+ | Train | 2018-01-08 to 2022-12-31 | Model training |
180
+ | Test | 2023-01-01 to 2024-12-31 | Evaluation |
181
+
182
+ This temporal split simulates real-world forecasting scenarios.
183
+
184
+ ## Regenerating the Dataset
185
+
186
+ If you prefer to regenerate from raw EEA data:
187
+
188
+ ```bash
189
+ # Clone the repository
190
+ git clone https://github.com/CosuleaBianca/eea-pm25
191
+ cd eea-pm25
192
+
193
+ # Install dependencies
194
+ pip install -r requirements.txt
195
+
196
+ # Run data pipeline
197
+ python dataset_build/src/download_pollutants.py
198
+ python dataset_build/src/filter_pm25_sites.py
199
+ python dataset_build/src/process_data.py
200
+ python dataset_build/src/prepare_ml_dataset.py
201
+ python dataset_build/src/coverage_only_v6.py
202
+ python dataset_build/src/dataset_full_realistic_v6.py
203
+ ```
204
+
205
+ ## Citation
206
+
207
+ If you use this dataset, please cite:
208
+
209
+ ```bibtex
210
+ @misc{eea-pm25-dataset,
211
+ author = {Chisilev Bianca-Iuliana},
212
+ title = {EEA PM2.5 Air Quality Dataset for Europe},
213
+ year = {2025},
214
+ publisher = {Hugging Face},
215
+ url = {https://huggingface.co/datasets/cosuleabianca/eea-pm25-dataset}
216
+ }
217
+ ```
218
+
219
+ ## Links
220
+
221
+ - **GitHub Repository**: [Github repository](https://github.com/CosuleaBianca/eea-pm25)
222
+ - **Pre-trained Models**: [Models](https://huggingface.co/cosuleabianca/eea-pm25)
223
+
224
+ ## License
225
+
226
+ CC BY 4.0 - You are free to share and adapt, with attribution.
227
+
228
+ Original data from the European Environment Agency is provided under the EEA standard reuse policy.