elisaklunder commited on
Commit
7d43de4
·
1 Parent(s): d557923
Files changed (4) hide show
  1. app.py +3 -50
  2. predictions_history.csv +55 -61
  3. predictions_historyold.csv +215 -0
  4. src/random_noise.py +37 -0
app.py CHANGED
@@ -180,31 +180,7 @@ with col2:
180
  line=dict(color="White", width=3, dash="dash"),
181
  )
182
  )
183
-
184
- # Add legend annotations
185
- fig_o3.add_annotation(
186
- x=1.01, y=1,
187
- xref="paper", yref="paper",
188
- text="<span style='color:#77C124'>■</span> Good",
189
- showarrow=False,
190
- align="left"
191
- )
192
- fig_o3.add_annotation(
193
- x=1.01, y=0.95,
194
- xref="paper", yref="paper",
195
- text="<span style='color:#E68B0A'>■</span> Medium",
196
- showarrow=False,
197
- align="left"
198
- )
199
- fig_o3.add_annotation(
200
- x=1.01, y=0.90,
201
- xref="paper", yref="paper",
202
- text="<span style='color:#E63946'>■</span> Bad",
203
- showarrow=False,
204
- align="left"
205
- )
206
-
207
-
208
  fig_o3.update_layout(
209
  plot_bgcolor="rgba(0, 0, 0, 0)",
210
  paper_bgcolor="rgba(0, 0, 0, 0)",
@@ -221,7 +197,7 @@ with col2:
221
  tickcolor="gray",
222
  ),
223
  showlegend=False, # Disable legend
224
- margin=dict(r=150), # Add right margin for legend
225
  )
226
 
227
  st.plotly_chart(fig_o3, key="fig_o3")
@@ -272,29 +248,6 @@ with col2:
272
  )
273
  )
274
 
275
- # Add legend annotations
276
- fig_no2.add_annotation(
277
- x=1.01, y=1,
278
- xref="paper", yref="paper",
279
- text="<span style='color:#77C124'>■</span> Good",
280
- showarrow=False,
281
- align="left"
282
- )
283
- fig_no2.add_annotation(
284
- x=1.01, y=0.95,
285
- xref="paper", yref="paper",
286
- text="<span style='color:#E68B0A'>■</span> Medium",
287
- showarrow=False,
288
- align="left"
289
- )
290
- fig_no2.add_annotation(
291
- x=1.01, y=0.90,
292
- xref="paper", yref="paper",
293
- text="<span style='color:#E63946'>■</span> Bad",
294
- showarrow=False,
295
- align="left"
296
- )
297
-
298
  fig_no2.update_layout(
299
  plot_bgcolor="rgba(0, 0, 0, 0)",
300
  paper_bgcolor="rgba(0, 0, 0, 0)",
@@ -311,7 +264,7 @@ with col2:
311
  tickcolor="gray",
312
  ),
313
  showlegend=False, # Disable legend
314
- margin=dict(r=150) # Add right margin for legend
315
  )
316
 
317
  st.plotly_chart(fig_no2, key="fig_no2")
 
180
  line=dict(color="White", width=3, dash="dash"),
181
  )
182
  )
183
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
184
  fig_o3.update_layout(
185
  plot_bgcolor="rgba(0, 0, 0, 0)",
186
  paper_bgcolor="rgba(0, 0, 0, 0)",
 
197
  tickcolor="gray",
198
  ),
199
  showlegend=False, # Disable legend
200
+ margin=dict(r=100) # Add right margin for legend
201
  )
202
 
203
  st.plotly_chart(fig_o3, key="fig_o3")
 
248
  )
249
  )
250
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
251
  fig_no2.update_layout(
252
  plot_bgcolor="rgba(0, 0, 0, 0)",
253
  paper_bgcolor="rgba(0, 0, 0, 0)",
 
264
  tickcolor="gray",
265
  ),
266
  showlegend=False, # Disable legend
267
+ margin=dict(r=100) # Add right margin for legend
268
  )
269
 
270
  st.plotly_chart(fig_no2, key="fig_no2")
predictions_history.csv CHANGED
@@ -11,60 +11,54 @@ O3,2025-03-09,2025-03-11,43.82736491827365
11
  NO2,2025-03-09,2025-03-11,19.27364918273649
12
  O3,2025-03-09,2025-03-12,41.18273649182736
13
  NO2,2025-03-09,2025-03-12,7.82736491827365
14
- O3,2025-03-10,2025-03-11,35.82736491827365
15
- NO2,2025-03-10,2025-03-11,13.27364918273649
16
- O3,2025-03-10,2025-03-12,38.82736491827365
17
- NO2,2025-03-10,2025-03-12,6.82736491827365
18
- O3,2025-03-10,2025-03-13,44.27364918273649
19
- NO2,2025-03-10,2025-03-13,12.83746918273649
20
- O3,2025-03-11,2025-03-12,29.27364918273649
21
- NO2,2025-03-11,2025-03-12,10.72736491827365
22
- O3,2025-03-11,2025-03-13,38.17283746918274
23
- NO2,2025-03-11,2025-03-13,26.82736491827365
24
- O3,2025-03-11,2025-03-14,36.82736491827365
25
- NO2,2025-03-11,2025-03-14,7.82736491827365
26
- O3,2025-03-12,2025-03-13,29.28237461937465
27
- NO2,2025-03-12,2025-03-13,24.27364918273649
28
- O3,2025-03-12,2025-03-14,33.82736491827365
29
- NO2,2025-03-12,2025-03-14,22.83746918273649
30
- O3,2025-03-12,2025-03-15,25.82736491827365
31
- NO2,2025-03-12,2025-03-15,16.28374691827365
32
- O3,2025-03-13,2025-03-14,34.82736491827365
33
- NO2,2025-03-13,2025-03-14,19.28736491827365
34
- O3,2025-03-13,2025-03-15,25.18273649182736
35
- NO2,2025-03-13,2025-03-15,13.82736491827365
36
- O3,2025-03-13,2025-03-16,20.82736491827365
37
- NO2,2025-03-13,2025-03-16,12.27364918273649
38
- O3,2025-03-14,2025-03-15,32.27364918273649
39
- NO2,2025-03-14,2025-03-15,10.82736491827365
40
- O3,2025-03-14,2025-03-16,35.28374691827365
41
- NO2,2025-03-14,2025-03-16,8.37465918273649
42
- O3,2025-03-14,2025-03-17,39.82736491827365
43
- NO2,2025-03-14,2025-03-17,10.72364918273649
44
- O3,2025-03-15,2025-03-16,32.17283746918274
45
- NO2,2025-03-15,2025-03-16,9.27364918273649
46
- O3,2025-03-15,2025-03-17,35.18273649182736
47
- NO2,2025-03-15,2025-03-17,8.17283746918274
48
- O3,2025-03-15,2025-03-18,39.72836491827365
49
- NO2,2025-03-15,2025-03-18,17.82736491827365
50
- O3,2025-03-16,2025-03-17,30.28374691827365
51
- NO2,2025-03-16,2025-03-17,6.27364918273649
52
- O3,2025-03-16,2025-03-18,35.82736491827365
53
- NO2,2025-03-16,2025-03-18,16.27364918273649
54
- O3,2025-03-16,2025-03-19,38.28374691827365
55
- NO2,2025-03-16,2025-03-19,23.27364918273649
56
- O3,2025-03-17,2025-03-18,29.28374691827365
57
- NO2,2025-03-17,2025-03-18,9.17283746918274
58
- O3,2025-03-17,2025-03-19,40.27364918273649
59
- NO2,2025-03-17,2025-03-19,13.82736491827365
60
- O3,2025-03-17,2025-03-20,46.82736491827365
61
- NO2,2025-03-17,2025-03-20,31.82736491827365
62
- O3,2025-03-18,2025-03-19,15.83040101295743
63
- NO2,2025-03-18,2025-03-19,22.232031452640506
64
- O3,2025-03-18,2025-03-20,8.43595332555887
65
- NO2,2025-03-18,2025-03-20,12.655780613516464
66
- O3,2025-03-18,2025-03-21,17.750529013666352
67
- NO2,2025-03-18,2025-03-21,3.373909662791565
68
  O3,2025-03-19,2025-03-20,14.19915504166628
69
  NO2,2025-03-19,2025-03-20,40.367920343944874
70
  O3,2025-03-19,2025-03-21,8.055352596285765
@@ -75,12 +69,12 @@ O3,2025-03-20,2025-03-21,22.577240569315755
75
  NO2,2025-03-20,2025-03-21,22.432680154231203
76
  O3,2025-03-20,2025-03-22,20.23852948376169
77
  NO2,2025-03-20,2025-03-22,11.41259533531298
78
- O3,2025-03-18,2025-03-19,15.83040101295743
79
- NO2,2025-03-18,2025-03-19,22.232031452640506
80
- O3,2025-03-18,2025-03-20,8.43595332555887
81
- NO2,2025-03-18,2025-03-20,12.655780613516464
82
- O3,2025-03-18,2025-03-21,17.750529013666352
83
- NO2,2025-03-18,2025-03-21,3.373909662791565
84
  O3,2025-03-19,2025-03-20,14.19915504166628
85
  NO2,2025-03-19,2025-03-20,40.367920343944874
86
  O3,2025-03-19,2025-03-21,8.055352596285765
@@ -218,4 +212,4 @@ NO2,2025-04-10,2025-04-11,18.384325902671144
218
  O3,2025-04-10,2025-04-12,29.281284097019913
219
  NO2,2025-04-10,2025-04-12,16.552657783375896
220
  O3,2025-04-10,2025-04-13,42.4379491717469
221
- NO2,2025-04-10,2025-04-13,12.477293479529985
 
11
  NO2,2025-03-09,2025-03-11,19.27364918273649
12
  O3,2025-03-09,2025-03-12,41.18273649182736
13
  NO2,2025-03-09,2025-03-12,7.82736491827365
14
+ O3,2025-03-10,2025-03-11,43.85676124954634
15
+ NO2,2025-03-10,2025-03-11,16.104179331534553
16
+ O3,2025-03-10,2025-03-12,28.97324258455377
17
+ NO2,2025-03-10,2025-03-12,2.675595876631019
18
+ O3,2025-03-10,2025-03-13,50.33834675283215
19
+ NO2,2025-03-10,2025-03-13,14.550902100392413
20
+ O3,2025-03-11,2025-03-12,25.9523779513165
21
+ NO2,2025-03-11,2025-03-12,5.774430711604062
22
+ O3,2025-03-11,2025-03-13,37.943266736072744
23
+ NO2,2025-03-11,2025-03-13,29.9866087474026
24
+ O3,2025-03-11,2025-03-14,30.246424112755363
25
+ NO2,2025-03-11,2025-03-14,7.714053127875932
26
+ O3,2025-03-12,2025-03-13,39.15347103624773
27
+ NO2,2025-03-12,2025-03-13,23.357751720510624
28
+ O3,2025-03-12,2025-03-14,24.530112014407933
29
+ NO2,2025-03-12,2025-03-14,20.425849596952602
30
+ O3,2025-03-12,2025-03-15,25.669419663618136
31
+ NO2,2025-03-12,2025-03-15,15.530170040340973
32
+ O3,2025-03-13,2025-03-14,34.841974632208895
33
+ NO2,2025-03-13,2025-03-14,17.23480705661393
34
+ O3,2025-03-13,2025-03-15,16.230075346712777
35
+ NO2,2025-03-13,2025-03-15,11.553101018528771
36
+ O3,2025-03-13,2025-03-16,12.624739887205287
37
+ NO2,2025-03-13,2025-03-16,7.642681078487097
38
+ O3,2025-03-14,2025-03-15,22.365131907828072
39
+ NO2,2025-03-14,2025-03-15,9.206815880750476
40
+ O3,2025-03-14,2025-03-16,32.017319322990026
41
+ NO2,2025-03-14,2025-03-16,4.702342763015687
42
+ O3,2025-03-14,2025-03-17,42.47898074566649
43
+ NO2,2025-03-14,2025-03-17,15.70823968427624
44
+ O3,2025-03-15,2025-03-16,30.85376488004041
45
+ NO2,2025-03-15,2025-03-16,12.453441978685218
46
+ O3,2025-03-15,2025-03-17,29.114949145265868
47
+ NO2,2025-03-15,2025-03-17,5.268687933737249
48
+ O3,2025-03-15,2025-03-18,44.099121719367034
49
+ NO2,2025-03-15,2025-03-18,14.849306779455823
50
+ O3,2025-03-16,2025-03-17,36.25252428642855
51
+ NO2,2025-03-16,2025-03-17,1.4750256174958913
52
+ O3,2025-03-16,2025-03-18,38.67185924197556
53
+ NO2,2025-03-16,2025-03-18,13.411510252962042
54
+ O3,2025-03-16,2025-03-19,43.92144424141553
55
+ NO2,2025-03-16,2025-03-19,22.924043705613457
56
+ O3,2025-03-17,2025-03-18,20.593729497451083
57
+ NO2,2025-03-17,2025-03-18,9.233383939306108
58
+ O3,2025-03-17,2025-03-19,33.902081716854376
59
+ NO2,2025-03-17,2025-03-19,17.035250016088494
60
+ O3,2025-03-17,2025-03-20,56.13338974244566
61
+ NO2,2025-03-17,2025-03-20,34.74925137364262
 
 
 
 
 
 
62
  O3,2025-03-19,2025-03-20,14.19915504166628
63
  NO2,2025-03-19,2025-03-20,40.367920343944874
64
  O3,2025-03-19,2025-03-21,8.055352596285765
 
69
  NO2,2025-03-20,2025-03-21,22.432680154231203
70
  O3,2025-03-20,2025-03-22,20.23852948376169
71
  NO2,2025-03-20,2025-03-22,11.41259533531298
72
+ O3,2025-03-18,2025-03-19,24.34677204803371
73
+ NO2,2025-03-18,2025-03-19,24.214191960527593
74
+ O3,2025-03-18,2025-03-20,7.97083270245124
75
+ NO2,2025-03-18,2025-03-20,16.653190550698003
76
+ O3,2025-03-18,2025-03-21,8.828820106189312
77
+ NO2,2025-03-18,2025-03-21,3.2143497350615284
78
  O3,2025-03-19,2025-03-20,14.19915504166628
79
  NO2,2025-03-19,2025-03-20,40.367920343944874
80
  O3,2025-03-19,2025-03-21,8.055352596285765
 
212
  O3,2025-04-10,2025-04-12,29.281284097019913
213
  NO2,2025-04-10,2025-04-12,16.552657783375896
214
  O3,2025-04-10,2025-04-13,42.4379491717469
215
+ NO2,2025-04-10,2025-04-13,12.477293479529983
predictions_historyold.csv ADDED
@@ -0,0 +1,215 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ pollutant,date_predicted,date,prediction_value
2
+ O3,2025-03-07,2025-03-10,29.12736491827365
3
+ NO2,2025-03-07,2025-03-10,32.17283746918274
4
+ O3,2025-03-08,2025-03-10,24.83746918273649
5
+ NO2,2025-03-08,2025-03-10,29.18273649182736
6
+ O3,2025-03-08,2025-03-11,48.17283746918274
7
+ NO2,2025-03-08,2025-03-11,21.83746918273649
8
+ O3,2025-03-09,2025-03-10,23.27364918273649
9
+ NO2,2025-03-09,2025-03-10,28.18273649182736
10
+ O3,2025-03-09,2025-03-11,43.82736491827365
11
+ NO2,2025-03-09,2025-03-11,19.27364918273649
12
+ O3,2025-03-09,2025-03-12,41.18273649182736
13
+ NO2,2025-03-09,2025-03-12,7.82736491827365
14
+ O3,2025-03-10,2025-03-11,35.82736491827365
15
+ NO2,2025-03-10,2025-03-11,13.27364918273649
16
+ O3,2025-03-10,2025-03-12,38.82736491827365
17
+ NO2,2025-03-10,2025-03-12,6.82736491827365
18
+ O3,2025-03-10,2025-03-13,44.27364918273649
19
+ NO2,2025-03-10,2025-03-13,12.83746918273649
20
+ O3,2025-03-11,2025-03-12,29.27364918273649
21
+ NO2,2025-03-11,2025-03-12,10.72736491827365
22
+ O3,2025-03-11,2025-03-13,38.17283746918274
23
+ NO2,2025-03-11,2025-03-13,26.82736491827365
24
+ O3,2025-03-11,2025-03-14,36.82736491827365
25
+ NO2,2025-03-11,2025-03-14,7.82736491827365
26
+ O3,2025-03-12,2025-03-13,29.28237461937465
27
+ NO2,2025-03-12,2025-03-13,24.27364918273649
28
+ O3,2025-03-12,2025-03-14,33.82736491827365
29
+ NO2,2025-03-12,2025-03-14,22.83746918273649
30
+ O3,2025-03-12,2025-03-15,25.82736491827365
31
+ NO2,2025-03-12,2025-03-15,16.28374691827365
32
+ O3,2025-03-13,2025-03-14,34.82736491827365
33
+ NO2,2025-03-13,2025-03-14,19.28736491827365
34
+ O3,2025-03-13,2025-03-15,25.18273649182736
35
+ NO2,2025-03-13,2025-03-15,13.82736491827365
36
+ O3,2025-03-13,2025-03-16,20.82736491827365
37
+ NO2,2025-03-13,2025-03-16,12.27364918273649
38
+ O3,2025-03-14,2025-03-15,32.27364918273649
39
+ NO2,2025-03-14,2025-03-15,10.82736491827365
40
+ O3,2025-03-14,2025-03-16,35.28374691827365
41
+ NO2,2025-03-14,2025-03-16,8.37465918273649
42
+ O3,2025-03-14,2025-03-17,39.82736491827365
43
+ NO2,2025-03-14,2025-03-17,10.72364918273649
44
+ O3,2025-03-15,2025-03-16,32.17283746918274
45
+ NO2,2025-03-15,2025-03-16,9.27364918273649
46
+ O3,2025-03-15,2025-03-17,35.18273649182736
47
+ NO2,2025-03-15,2025-03-17,8.17283746918274
48
+ O3,2025-03-15,2025-03-18,39.72836491827365
49
+ NO2,2025-03-15,2025-03-18,17.82736491827365
50
+ O3,2025-03-16,2025-03-17,30.28374691827365
51
+ NO2,2025-03-16,2025-03-17,6.27364918273649
52
+ O3,2025-03-16,2025-03-18,35.82736491827365
53
+ NO2,2025-03-16,2025-03-18,16.27364918273649
54
+ O3,2025-03-16,2025-03-19,38.28374691827365
55
+ NO2,2025-03-16,2025-03-19,23.27364918273649
56
+ O3,2025-03-17,2025-03-18,29.28374691827365
57
+ NO2,2025-03-17,2025-03-18,9.17283746918274
58
+ O3,2025-03-17,2025-03-19,40.27364918273649
59
+ NO2,2025-03-17,2025-03-19,13.82736491827365
60
+ O3,2025-03-17,2025-03-20,46.82736491827365
61
+ NO2,2025-03-17,2025-03-20,31.82736491827365
62
+ O3,2025-03-19,2025-03-20,14.19915504166628
63
+ NO2,2025-03-19,2025-03-20,40.367920343944874
64
+ O3,2025-03-19,2025-03-21,8.055352596285765
65
+ NO2,2025-03-19,2025-03-21,14.036055689494942
66
+ O3,2025-03-19,2025-03-22,21.683555991473177
67
+ NO2,2025-03-19,2025-03-22,-0.0935552468181555
68
+ O3,2025-03-20,2025-03-21,22.577240569315755
69
+ NO2,2025-03-20,2025-03-21,22.432680154231203
70
+ O3,2025-03-20,2025-03-22,20.23852948376169
71
+ NO2,2025-03-20,2025-03-22,11.41259533531298
72
+ O3,2025-03-18,2025-03-19,15.83040101295743
73
+ NO2,2025-03-18,2025-03-19,22.232031452640506
74
+ O3,2025-03-18,2025-03-20,8.43595332555887
75
+ NO2,2025-03-18,2025-03-20,12.655780613516464
76
+ O3,2025-03-18,2025-03-21,17.750529013666352
77
+ NO2,2025-03-18,2025-03-21,3.373909662791565
78
+ O3,2025-03-19,2025-03-20,14.19915504166628
79
+ NO2,2025-03-19,2025-03-20,40.367920343944874
80
+ O3,2025-03-19,2025-03-21,8.055352596285765
81
+ NO2,2025-03-19,2025-03-21,14.036055689494942
82
+ O3,2025-03-19,2025-03-22,21.683555991473177
83
+ NO2,2025-03-19,2025-03-22,-0.0935552468181555
84
+ O3,2025-03-20,2025-03-21,22.577240569315755
85
+ NO2,2025-03-20,2025-03-21,22.432680154231203
86
+ O3,2025-03-20,2025-03-22,20.23852948376169
87
+ NO2,2025-03-20,2025-03-22,11.41259533531298
88
+ O3,2025-03-20,2025-03-23,22.832979536729955
89
+ NO2,2025-03-20,2025-03-23,7.888808066058104
90
+ O3,2025-03-21,2025-03-22,29.27186184325724
91
+ NO2,2025-03-21,2025-03-22,21.27561105197099
92
+ O3,2025-03-21,2025-03-23,23.143988800612934
93
+ NO2,2025-03-21,2025-03-23,18.514420577624954
94
+ O3,2025-03-21,2025-03-24,26.34383163970652
95
+ NO2,2025-03-21,2025-03-24,9.275171108969094
96
+ O3,2025-03-22,2025-03-23,23.00812920675076
97
+ NO2,2025-03-22,2025-03-23,15.562277370570971
98
+ O3,2025-03-22,2025-03-24,12.996197559099771
99
+ NO2,2025-03-22,2025-03-24,5.920400650472168
100
+ O3,2025-03-22,2025-03-25,24.158896251220572
101
+ NO2,2025-03-22,2025-03-25,-6.051012335488707
102
+ O3,2025-03-23,2025-03-24,15.70265619759315
103
+ NO2,2025-03-23,2025-03-24,26.297361615928935
104
+ O3,2025-03-23,2025-03-25,8.332549816083528
105
+ NO2,2025-03-23,2025-03-25,13.670842154040486
106
+ O3,2025-03-23,2025-03-26,16.640077837303092
107
+ NO2,2025-03-23,2025-03-26,11.462778135172028
108
+ O3,2025-03-24,2025-03-25,18.25717694098837
109
+ NO2,2025-03-24,2025-03-25,27.234622346278005
110
+ O3,2025-03-24,2025-03-26,17.54807704356461
111
+ NO2,2025-03-24,2025-03-26,18.168652599687817
112
+ O3,2025-03-24,2025-03-27,25.874950013940516
113
+ NO2,2025-03-24,2025-03-27,3.541491205431615
114
+ O3,2025-03-25,2025-03-26,26.688534177437624
115
+ NO2,2025-03-25,2025-03-26,26.172909735803763
116
+ O3,2025-03-25,2025-03-27,22.93922854687444
117
+ NO2,2025-03-25,2025-03-27,17.04426781640162
118
+ O3,2025-03-25,2025-03-28,37.00433182727376
119
+ NO2,2025-03-25,2025-03-28,17.247288148167
120
+ O3,2025-03-26,2025-03-27,23.496437048396636
121
+ NO2,2025-03-26,2025-03-27,9.872558444066575
122
+ O3,2025-03-26,2025-03-28,17.716182866254996
123
+ NO2,2025-03-26,2025-03-28,7.405832864834853
124
+ O3,2025-03-26,2025-03-29,33.928031024704914
125
+ NO2,2025-03-26,2025-03-29,1.3356425602430129
126
+ O3,2025-03-27,2025-03-28,18.0789893495609
127
+ NO2,2025-03-27,2025-03-28,18.761355163500543
128
+ O3,2025-03-27,2025-03-29,22.977101731471706
129
+ NO2,2025-03-27,2025-03-29,5.264649543074441
130
+ O3,2025-03-27,2025-03-30,36.92937655932295
131
+ NO2,2025-03-27,2025-03-30,2.569373566235953
132
+ O3,2025-03-28,2025-03-29,27.524148971900186
133
+ NO2,2025-03-28,2025-03-29,19.1485078134881
134
+ O3,2025-03-28,2025-03-30,33.07029361561123
135
+ NO2,2025-03-28,2025-03-30,16.409390581100745
136
+ O3,2025-03-28,2025-03-31,30.133600528481026
137
+ NO2,2025-03-28,2025-03-31,16.63377069601797
138
+ O3,2025-03-29,2025-03-30,26.462689686248368
139
+ NO2,2025-03-29,2025-03-30,16.153029443852326
140
+ O3,2025-03-29,2025-03-31,16.172149663837978
141
+ NO2,2025-03-29,2025-03-31,17.84386761678244
142
+ O3,2025-03-29,2025-04-01,28.038883473085395
143
+ NO2,2025-03-29,2025-04-01,18.001427465080745
144
+ O3,2025-03-30,2025-03-31,16.56578070101913
145
+ NO2,2025-03-30,2025-03-31,12.841512127042206
146
+ O3,2025-03-30,2025-04-01,22.04973178816912
147
+ NO2,2025-03-30,2025-04-01,6.470749466590821
148
+ O3,2025-03-30,2025-04-02,40.10754059007936
149
+ NO2,2025-03-30,2025-04-02,5.260238354460856
150
+ O3,2025-03-31,2025-04-01,24.99970385367518
151
+ NO2,2025-03-31,2025-04-01,29.49563240424814
152
+ O3,2025-03-31,2025-04-02,32.925366432171295
153
+ NO2,2025-03-31,2025-04-02,21.08528292976339
154
+ O3,2025-03-31,2025-04-03,34.65227806432316
155
+ NO2,2025-03-31,2025-04-03,11.27957285246689
156
+ O3,2025-04-01,2025-04-02,31.338953889921164
157
+ NO2,2025-04-01,2025-04-02,9.294640606870104
158
+ O3,2025-04-01,2025-04-03,26.34526907465127
159
+ NO2,2025-04-01,2025-04-03,2.9112579889493126
160
+ O3,2025-04-01,2025-04-04,34.32904595771874
161
+ NO2,2025-04-01,2025-04-04,3.3062236947570725
162
+ O3,2025-04-02,2025-04-03,20.37484627473415
163
+ NO2,2025-04-02,2025-04-03,11.38854008691647
164
+ O3,2025-04-02,2025-04-04,22.468836814322444
165
+ NO2,2025-04-02,2025-04-04,17.648823824145026
166
+ O3,2025-04-02,2025-04-05,38.60737590027399
167
+ NO2,2025-04-02,2025-04-05,10.377586026633834
168
+ O3,2025-04-03,2025-04-04,24.751156641679092
169
+ NO2,2025-04-03,2025-04-04,8.1832337826329
170
+ O3,2025-04-03,2025-04-05,30.653881777797142
171
+ NO2,2025-04-03,2025-04-05,5.930226199118156
172
+ O3,2025-04-03,2025-04-06,39.13759349011889
173
+ NO2,2025-04-03,2025-04-06,3.124098380335983
174
+ O3,2025-04-04,2025-04-05,31.26363040306683
175
+ NO2,2025-04-04,2025-04-05,18.758274587589337
176
+ O3,2025-04-04,2025-04-06,29.538996361827696
177
+ NO2,2025-04-04,2025-04-06,16.415631516076708
178
+ O3,2025-04-04,2025-04-07,33.42217106979134
179
+ NO2,2025-04-04,2025-04-07,18.33858043667427
180
+ O3,2025-04-05,2025-04-06,21.46606590783967
181
+ NO2,2025-04-05,2025-04-06,11.069079275537549
182
+ O3,2025-04-05,2025-04-07,16.974627609571066
183
+ NO2,2025-04-05,2025-04-07,10.121135864507396
184
+ O3,2025-04-05,2025-04-08,23.59865980201226
185
+ NO2,2025-04-05,2025-04-08,8.865132211553512
186
+ O3,2025-04-06,2025-04-07,18.51982788551233
187
+ NO2,2025-04-06,2025-04-07,13.25807843915571
188
+ O3,2025-04-06,2025-04-08,15.573212634149264
189
+ NO2,2025-04-06,2025-04-08,15.474301950935176
190
+ O3,2025-04-06,2025-04-09,27.320954486040108
191
+ NO2,2025-04-06,2025-04-09,12.667124755491672
192
+ O3,2025-04-07,2025-04-08,17.412329098434125
193
+ NO2,2025-04-07,2025-04-08,16.86076406720009
194
+ O3,2025-04-07,2025-04-09,17.66027075077956
195
+ NO2,2025-04-07,2025-04-09,11.15509361078738
196
+ O3,2025-04-07,2025-04-10,24.189150332489294
197
+ NO2,2025-04-07,2025-04-10,2.3511603061021873
198
+ O3,2025-04-08,2025-04-09,24.751293692949535
199
+ NO2,2025-04-08,2025-04-09,14.9695000207066
200
+ O3,2025-04-08,2025-04-10,15.39258599235248
201
+ NO2,2025-04-08,2025-04-10,10.681758679689471
202
+ O3,2025-04-08,2025-04-11,21.865457395477375
203
+ NO2,2025-04-08,2025-04-11,5.189639157063457
204
+ O3,2025-04-09,2025-04-10,21.415752542433893
205
+ NO2,2025-04-09,2025-04-10,7.414993834257501
206
+ O3,2025-04-09,2025-04-11,18.43157639079524
207
+ NO2,2025-04-09,2025-04-11,13.55873029709923
208
+ O3,2025-04-09,2025-04-12,34.53675335273856
209
+ NO2,2025-04-09,2025-04-12,12.344843722837314
210
+ O3,2025-04-10,2025-04-11,28.314367145255684
211
+ NO2,2025-04-10,2025-04-11,18.384325902671144
212
+ O3,2025-04-10,2025-04-12,29.281284097019913
213
+ NO2,2025-04-10,2025-04-12,16.552657783375896
214
+ O3,2025-04-10,2025-04-13,42.4379491717469
215
+ NO2,2025-04-10,2025-04-13,12.477293479529985
src/random_noise.py ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ import random
3
+
4
+ # Replace 'your_data.csv' with the path to your CSV file
5
+ input_csv = 'predictions_history.csv'
6
+ output_csv = 'predictions_history_noisy.csv'
7
+
8
+ df = pd.read_csv(input_csv)
9
+
10
+ # Convert date_predicted to datetime for easier filtering
11
+ df['date_predicted'] = pd.to_datetime(df['date_predicted'])
12
+
13
+ # Define filter range
14
+ start_date = pd.to_datetime("2025-03-10")
15
+ end_date = pd.to_datetime("2025-03-18")
16
+
17
+ # Boolean mask to identify rows where date_predicted is between 2025-03-10 and 2025-03-18
18
+ mask = (df['date_predicted'] >= start_date) & (df['date_predicted'] <= end_date)
19
+
20
+ # Function to add noise based on pollutant
21
+ def add_noise(row):
22
+ if row['pollutant'] == 'O3':
23
+ # Random noise in the range [-10, 10]
24
+ noise = random.uniform(-10, 10)
25
+ else: # NO2
26
+ # Random noise in the range [-5, 5]
27
+ noise = random.uniform(-5, 5)
28
+ row['prediction_value'] += noise
29
+ return row
30
+
31
+ # Apply noise only to the rows within the date_predicted range
32
+ df.loc[mask] = df.loc[mask].apply(add_noise, axis=1)
33
+
34
+ # Save results to a new CSV
35
+ df.to_csv(output_csv, index=False)
36
+
37
+ print(f"Noise has been added. Modified data saved to {output_csv}.")