atodorov284 commited on
Commit
c43a6fb
·
1 Parent(s): dbbf3bc

data merge notebook and pipeline

Browse files
notebooks/Dataset Creation.ipynb DELETED
@@ -1,33 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "code",
5
- "execution_count": null,
6
- "id": "9a82a7e9",
7
- "metadata": {},
8
- "outputs": [],
9
- "source": []
10
- }
11
- ],
12
- "metadata": {
13
- "kernelspec": {
14
- "display_name": "Python 3",
15
- "language": "python",
16
- "name": "python3"
17
- },
18
- "language_info": {
19
- "codemirror_mode": {
20
- "name": "ipython",
21
- "version": 3
22
- },
23
- "file_extension": ".py",
24
- "mimetype": "text/x-python",
25
- "name": "python",
26
- "nbconvert_exporter": "python",
27
- "pygments_lexer": "ipython3",
28
- "version": "3.11.0"
29
- }
30
- },
31
- "nbformat": 4,
32
- "nbformat_minor": 5
33
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
notebooks/data_merge.ipynb ADDED
@@ -0,0 +1,1736 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "metadata": {
7
+ "id": "xngb6vK81ve0"
8
+ },
9
+ "outputs": [],
10
+ "source": [
11
+ "import pandas as pd"
12
+ ]
13
+ },
14
+ {
15
+ "cell_type": "code",
16
+ "execution_count": 7,
17
+ "metadata": {
18
+ "id": "ChATGJf4_vk6"
19
+ },
20
+ "outputs": [],
21
+ "source": [
22
+ "o3_and_no2 = pd.read_csv(\"..\\data\\processed\\sorted_griftpark,-utrecht-air-quality.csv\")"
23
+ ]
24
+ },
25
+ {
26
+ "cell_type": "code",
27
+ "execution_count": 8,
28
+ "metadata": {
29
+ "colab": {
30
+ "base_uri": "https://localhost:8080/",
31
+ "height": 206
32
+ },
33
+ "id": "qF0ziyih_1YC",
34
+ "outputId": "b464754d-f85b-489e-af6e-03c1a8d77244"
35
+ },
36
+ "outputs": [
37
+ {
38
+ "data": {
39
+ "text/html": [
40
+ "<div>\n",
41
+ "<style scoped>\n",
42
+ " .dataframe tbody tr th:only-of-type {\n",
43
+ " vertical-align: middle;\n",
44
+ " }\n",
45
+ "\n",
46
+ " .dataframe tbody tr th {\n",
47
+ " vertical-align: top;\n",
48
+ " }\n",
49
+ "\n",
50
+ " .dataframe thead th {\n",
51
+ " text-align: right;\n",
52
+ " }\n",
53
+ "</style>\n",
54
+ "<table border=\"1\" class=\"dataframe\">\n",
55
+ " <thead>\n",
56
+ " <tr style=\"text-align: right;\">\n",
57
+ " <th></th>\n",
58
+ " <th>date</th>\n",
59
+ " <th>pm25</th>\n",
60
+ " <th>pm10</th>\n",
61
+ " <th>o3</th>\n",
62
+ " <th>no2</th>\n",
63
+ " <th>so2</th>\n",
64
+ " </tr>\n",
65
+ " </thead>\n",
66
+ " <tbody>\n",
67
+ " <tr>\n",
68
+ " <th>0</th>\n",
69
+ " <td>11/09/2024</td>\n",
70
+ " <td>24</td>\n",
71
+ " <td>6</td>\n",
72
+ " <td>16</td>\n",
73
+ " <td>5</td>\n",
74
+ " <td></td>\n",
75
+ " </tr>\n",
76
+ " <tr>\n",
77
+ " <th>1</th>\n",
78
+ " <td>10/09/2024</td>\n",
79
+ " <td>26</td>\n",
80
+ " <td>16</td>\n",
81
+ " <td>27</td>\n",
82
+ " <td>3</td>\n",
83
+ " <td></td>\n",
84
+ " </tr>\n",
85
+ " <tr>\n",
86
+ " <th>2</th>\n",
87
+ " <td>09/09/2024</td>\n",
88
+ " <td>15</td>\n",
89
+ " <td>14</td>\n",
90
+ " <td>25</td>\n",
91
+ " <td>3</td>\n",
92
+ " <td></td>\n",
93
+ " </tr>\n",
94
+ " <tr>\n",
95
+ " <th>3</th>\n",
96
+ " <td>08/09/2024</td>\n",
97
+ " <td>17</td>\n",
98
+ " <td>12</td>\n",
99
+ " <td>31</td>\n",
100
+ " <td>9</td>\n",
101
+ " <td></td>\n",
102
+ " </tr>\n",
103
+ " <tr>\n",
104
+ " <th>4</th>\n",
105
+ " <td>07/09/2024</td>\n",
106
+ " <td>25</td>\n",
107
+ " <td>13</td>\n",
108
+ " <td>34</td>\n",
109
+ " <td>3</td>\n",
110
+ " <td></td>\n",
111
+ " </tr>\n",
112
+ " </tbody>\n",
113
+ "</table>\n",
114
+ "</div>"
115
+ ],
116
+ "text/plain": [
117
+ " date pm25 pm10 o3 no2 so2\n",
118
+ "0 11/09/2024 24 6 16 5 \n",
119
+ "1 10/09/2024 26 16 27 3 \n",
120
+ "2 09/09/2024 15 14 25 3 \n",
121
+ "3 08/09/2024 17 12 31 9 \n",
122
+ "4 07/09/2024 25 13 34 3 "
123
+ ]
124
+ },
125
+ "execution_count": 8,
126
+ "metadata": {},
127
+ "output_type": "execute_result"
128
+ }
129
+ ],
130
+ "source": [
131
+ "o3_and_no2.head()"
132
+ ]
133
+ },
134
+ {
135
+ "cell_type": "code",
136
+ "execution_count": 9,
137
+ "metadata": {
138
+ "colab": {
139
+ "base_uri": "https://localhost:8080/",
140
+ "height": 423
141
+ },
142
+ "id": "JsNZ-ezWGaWA",
143
+ "outputId": "10ec2795-781c-4516-a62f-d1b6e6b047a7"
144
+ },
145
+ "outputs": [
146
+ {
147
+ "data": {
148
+ "text/html": [
149
+ "<div>\n",
150
+ "<style scoped>\n",
151
+ " .dataframe tbody tr th:only-of-type {\n",
152
+ " vertical-align: middle;\n",
153
+ " }\n",
154
+ "\n",
155
+ " .dataframe tbody tr th {\n",
156
+ " vertical-align: top;\n",
157
+ " }\n",
158
+ "\n",
159
+ " .dataframe thead th {\n",
160
+ " text-align: right;\n",
161
+ " }\n",
162
+ "</style>\n",
163
+ "<table border=\"1\" class=\"dataframe\">\n",
164
+ " <thead>\n",
165
+ " <tr style=\"text-align: right;\">\n",
166
+ " <th></th>\n",
167
+ " <th>date</th>\n",
168
+ " <th>pm25</th>\n",
169
+ " <th>pm10</th>\n",
170
+ " <th>o3</th>\n",
171
+ " <th>no2</th>\n",
172
+ " <th>so2</th>\n",
173
+ " </tr>\n",
174
+ " </thead>\n",
175
+ " <tbody>\n",
176
+ " <tr>\n",
177
+ " <th>0</th>\n",
178
+ " <td>11/09/2024</td>\n",
179
+ " <td>24</td>\n",
180
+ " <td>6</td>\n",
181
+ " <td>16</td>\n",
182
+ " <td>5</td>\n",
183
+ " <td></td>\n",
184
+ " </tr>\n",
185
+ " <tr>\n",
186
+ " <th>1</th>\n",
187
+ " <td>10/09/2024</td>\n",
188
+ " <td>26</td>\n",
189
+ " <td>16</td>\n",
190
+ " <td>27</td>\n",
191
+ " <td>3</td>\n",
192
+ " <td></td>\n",
193
+ " </tr>\n",
194
+ " <tr>\n",
195
+ " <th>2</th>\n",
196
+ " <td>09/09/2024</td>\n",
197
+ " <td>15</td>\n",
198
+ " <td>14</td>\n",
199
+ " <td>25</td>\n",
200
+ " <td>3</td>\n",
201
+ " <td></td>\n",
202
+ " </tr>\n",
203
+ " <tr>\n",
204
+ " <th>3</th>\n",
205
+ " <td>08/09/2024</td>\n",
206
+ " <td>17</td>\n",
207
+ " <td>12</td>\n",
208
+ " <td>31</td>\n",
209
+ " <td>9</td>\n",
210
+ " <td></td>\n",
211
+ " </tr>\n",
212
+ " <tr>\n",
213
+ " <th>4</th>\n",
214
+ " <td>07/09/2024</td>\n",
215
+ " <td>25</td>\n",
216
+ " <td>13</td>\n",
217
+ " <td>34</td>\n",
218
+ " <td>3</td>\n",
219
+ " <td></td>\n",
220
+ " </tr>\n",
221
+ " <tr>\n",
222
+ " <th>...</th>\n",
223
+ " <td>...</td>\n",
224
+ " <td>...</td>\n",
225
+ " <td>...</td>\n",
226
+ " <td>...</td>\n",
227
+ " <td>...</td>\n",
228
+ " <td>...</td>\n",
229
+ " </tr>\n",
230
+ " <tr>\n",
231
+ " <th>3665</th>\n",
232
+ " <td>02/02/2014</td>\n",
233
+ " <td></td>\n",
234
+ " <td>17</td>\n",
235
+ " <td>11</td>\n",
236
+ " <td>17</td>\n",
237
+ " <td>1</td>\n",
238
+ " </tr>\n",
239
+ " <tr>\n",
240
+ " <th>3666</th>\n",
241
+ " <td>01/02/2014</td>\n",
242
+ " <td></td>\n",
243
+ " <td>22</td>\n",
244
+ " <td>18</td>\n",
245
+ " <td>8</td>\n",
246
+ " <td></td>\n",
247
+ " </tr>\n",
248
+ " <tr>\n",
249
+ " <th>3667</th>\n",
250
+ " <td>31/01/2014</td>\n",
251
+ " <td></td>\n",
252
+ " <td>48</td>\n",
253
+ " <td>22</td>\n",
254
+ " <td>6</td>\n",
255
+ " <td></td>\n",
256
+ " </tr>\n",
257
+ " <tr>\n",
258
+ " <th>3668</th>\n",
259
+ " <td>30/01/2014</td>\n",
260
+ " <td></td>\n",
261
+ " <td>38</td>\n",
262
+ " <td>17</td>\n",
263
+ " <td>21</td>\n",
264
+ " <td>1</td>\n",
265
+ " </tr>\n",
266
+ " <tr>\n",
267
+ " <th>3669</th>\n",
268
+ " <td>29/01/2014</td>\n",
269
+ " <td></td>\n",
270
+ " <td></td>\n",
271
+ " <td>4</td>\n",
272
+ " <td>17</td>\n",
273
+ " <td>1</td>\n",
274
+ " </tr>\n",
275
+ " </tbody>\n",
276
+ "</table>\n",
277
+ "<p>3670 rows × 6 columns</p>\n",
278
+ "</div>"
279
+ ],
280
+ "text/plain": [
281
+ " date pm25 pm10 o3 no2 so2\n",
282
+ "0 11/09/2024 24 6 16 5 \n",
283
+ "1 10/09/2024 26 16 27 3 \n",
284
+ "2 09/09/2024 15 14 25 3 \n",
285
+ "3 08/09/2024 17 12 31 9 \n",
286
+ "4 07/09/2024 25 13 34 3 \n",
287
+ "... ... ... ... .. ... ...\n",
288
+ "3665 02/02/2014 17 11 17 1\n",
289
+ "3666 01/02/2014 22 18 8 \n",
290
+ "3667 31/01/2014 48 22 6 \n",
291
+ "3668 30/01/2014 38 17 21 1\n",
292
+ "3669 29/01/2014 4 17 1\n",
293
+ "\n",
294
+ "[3670 rows x 6 columns]"
295
+ ]
296
+ },
297
+ "execution_count": 9,
298
+ "metadata": {},
299
+ "output_type": "execute_result"
300
+ }
301
+ ],
302
+ "source": [
303
+ "o3_and_no2"
304
+ ]
305
+ },
306
+ {
307
+ "cell_type": "code",
308
+ "execution_count": 12,
309
+ "metadata": {
310
+ "id": "91wMW5HX_1py"
311
+ },
312
+ "outputs": [],
313
+ "source": [
314
+ "utrecht_additional_data = pd.read_csv(r\"..\\data\\raw\\utrecht 2014-01-29 to 2024-09-11.csv\")"
315
+ ]
316
+ },
317
+ {
318
+ "cell_type": "code",
319
+ "execution_count": 13,
320
+ "metadata": {
321
+ "colab": {
322
+ "base_uri": "https://localhost:8080/",
323
+ "height": 446
324
+ },
325
+ "id": "kh9AbRMiEvZE",
326
+ "outputId": "00e5905a-7ea9-4910-e576-b7e15c4efe67"
327
+ },
328
+ "outputs": [
329
+ {
330
+ "data": {
331
+ "text/html": [
332
+ "<div>\n",
333
+ "<style scoped>\n",
334
+ " .dataframe tbody tr th:only-of-type {\n",
335
+ " vertical-align: middle;\n",
336
+ " }\n",
337
+ "\n",
338
+ " .dataframe tbody tr th {\n",
339
+ " vertical-align: top;\n",
340
+ " }\n",
341
+ "\n",
342
+ " .dataframe thead th {\n",
343
+ " text-align: right;\n",
344
+ " }\n",
345
+ "</style>\n",
346
+ "<table border=\"1\" class=\"dataframe\">\n",
347
+ " <thead>\n",
348
+ " <tr style=\"text-align: right;\">\n",
349
+ " <th></th>\n",
350
+ " <th>name</th>\n",
351
+ " <th>datetime</th>\n",
352
+ " <th>tempmax</th>\n",
353
+ " <th>tempmin</th>\n",
354
+ " <th>temp</th>\n",
355
+ " <th>feelslikemax</th>\n",
356
+ " <th>feelslikemin</th>\n",
357
+ " <th>feelslike</th>\n",
358
+ " <th>dew</th>\n",
359
+ " <th>humidity</th>\n",
360
+ " <th>...</th>\n",
361
+ " <th>solarenergy</th>\n",
362
+ " <th>uvindex</th>\n",
363
+ " <th>severerisk</th>\n",
364
+ " <th>sunrise</th>\n",
365
+ " <th>sunset</th>\n",
366
+ " <th>moonphase</th>\n",
367
+ " <th>conditions</th>\n",
368
+ " <th>description</th>\n",
369
+ " <th>icon</th>\n",
370
+ " <th>stations</th>\n",
371
+ " </tr>\n",
372
+ " </thead>\n",
373
+ " <tbody>\n",
374
+ " <tr>\n",
375
+ " <th>0</th>\n",
376
+ " <td>utrecht</td>\n",
377
+ " <td>2014-01-29</td>\n",
378
+ " <td>3.2</td>\n",
379
+ " <td>-1.8</td>\n",
380
+ " <td>0.6</td>\n",
381
+ " <td>-1.0</td>\n",
382
+ " <td>-7.5</td>\n",
383
+ " <td>-4.7</td>\n",
384
+ " <td>-1.9</td>\n",
385
+ " <td>83.9</td>\n",
386
+ " <td>...</td>\n",
387
+ " <td>6.5</td>\n",
388
+ " <td>3</td>\n",
389
+ " <td>NaN</td>\n",
390
+ " <td>2014-01-29T08:24:35</td>\n",
391
+ " <td>2014-01-29T17:21:21</td>\n",
392
+ " <td>0.95</td>\n",
393
+ " <td>Partially cloudy</td>\n",
394
+ " <td>Partly cloudy throughout the day.</td>\n",
395
+ " <td>partly-cloudy-day</td>\n",
396
+ " <td>06260099999</td>\n",
397
+ " </tr>\n",
398
+ " <tr>\n",
399
+ " <th>1</th>\n",
400
+ " <td>utrecht</td>\n",
401
+ " <td>2014-01-30</td>\n",
402
+ " <td>4.4</td>\n",
403
+ " <td>-2.3</td>\n",
404
+ " <td>0.6</td>\n",
405
+ " <td>2.6</td>\n",
406
+ " <td>-7.2</td>\n",
407
+ " <td>-2.9</td>\n",
408
+ " <td>-1.9</td>\n",
409
+ " <td>83.6</td>\n",
410
+ " <td>...</td>\n",
411
+ " <td>6.3</td>\n",
412
+ " <td>3</td>\n",
413
+ " <td>NaN</td>\n",
414
+ " <td>2014-01-30T08:23:06</td>\n",
415
+ " <td>2014-01-30T17:23:12</td>\n",
416
+ " <td>0.00</td>\n",
417
+ " <td>Partially cloudy</td>\n",
418
+ " <td>Partly cloudy throughout the day.</td>\n",
419
+ " <td>partly-cloudy-day</td>\n",
420
+ " <td>06260099999,remote</td>\n",
421
+ " </tr>\n",
422
+ " <tr>\n",
423
+ " <th>2</th>\n",
424
+ " <td>utrecht</td>\n",
425
+ " <td>2014-01-31</td>\n",
426
+ " <td>7.1</td>\n",
427
+ " <td>-2.6</td>\n",
428
+ " <td>2.6</td>\n",
429
+ " <td>4.7</td>\n",
430
+ " <td>-5.5</td>\n",
431
+ " <td>-0.2</td>\n",
432
+ " <td>0.0</td>\n",
433
+ " <td>84.0</td>\n",
434
+ " <td>...</td>\n",
435
+ " <td>6.4</td>\n",
436
+ " <td>3</td>\n",
437
+ " <td>NaN</td>\n",
438
+ " <td>2014-01-31T08:21:34</td>\n",
439
+ " <td>2014-01-31T17:25:02</td>\n",
440
+ " <td>0.02</td>\n",
441
+ " <td>Partially cloudy</td>\n",
442
+ " <td>Becoming cloudy in the afternoon.</td>\n",
443
+ " <td>partly-cloudy-day</td>\n",
444
+ " <td>06260099999</td>\n",
445
+ " </tr>\n",
446
+ " <tr>\n",
447
+ " <th>3</th>\n",
448
+ " <td>utrecht</td>\n",
449
+ " <td>2014-02-01</td>\n",
450
+ " <td>8.4</td>\n",
451
+ " <td>5.4</td>\n",
452
+ " <td>6.6</td>\n",
453
+ " <td>5.3</td>\n",
454
+ " <td>1.3</td>\n",
455
+ " <td>2.8</td>\n",
456
+ " <td>3.8</td>\n",
457
+ " <td>82.6</td>\n",
458
+ " <td>...</td>\n",
459
+ " <td>1.4</td>\n",
460
+ " <td>1</td>\n",
461
+ " <td>NaN</td>\n",
462
+ " <td>2014-02-01T08:20:01</td>\n",
463
+ " <td>2014-02-01T17:26:54</td>\n",
464
+ " <td>0.05</td>\n",
465
+ " <td>Rain, Partially cloudy</td>\n",
466
+ " <td>Partly cloudy throughout the day with a chance...</td>\n",
467
+ " <td>rain</td>\n",
468
+ " <td>06260099999</td>\n",
469
+ " </tr>\n",
470
+ " <tr>\n",
471
+ " <th>4</th>\n",
472
+ " <td>utrecht</td>\n",
473
+ " <td>2014-02-02</td>\n",
474
+ " <td>7.7</td>\n",
475
+ " <td>3.2</td>\n",
476
+ " <td>5.3</td>\n",
477
+ " <td>5.1</td>\n",
478
+ " <td>-0.7</td>\n",
479
+ " <td>1.8</td>\n",
480
+ " <td>2.0</td>\n",
481
+ " <td>79.7</td>\n",
482
+ " <td>...</td>\n",
483
+ " <td>6.1</td>\n",
484
+ " <td>3</td>\n",
485
+ " <td>NaN</td>\n",
486
+ " <td>2014-02-02T08:18:25</td>\n",
487
+ " <td>2014-02-02T17:28:45</td>\n",
488
+ " <td>0.08</td>\n",
489
+ " <td>Partially cloudy</td>\n",
490
+ " <td>Becoming cloudy in the afternoon.</td>\n",
491
+ " <td>partly-cloudy-day</td>\n",
492
+ " <td>06260099999</td>\n",
493
+ " </tr>\n",
494
+ " </tbody>\n",
495
+ "</table>\n",
496
+ "<p>5 rows × 33 columns</p>\n",
497
+ "</div>"
498
+ ],
499
+ "text/plain": [
500
+ " name datetime tempmax tempmin temp feelslikemax feelslikemin \\\n",
501
+ "0 utrecht 2014-01-29 3.2 -1.8 0.6 -1.0 -7.5 \n",
502
+ "1 utrecht 2014-01-30 4.4 -2.3 0.6 2.6 -7.2 \n",
503
+ "2 utrecht 2014-01-31 7.1 -2.6 2.6 4.7 -5.5 \n",
504
+ "3 utrecht 2014-02-01 8.4 5.4 6.6 5.3 1.3 \n",
505
+ "4 utrecht 2014-02-02 7.7 3.2 5.3 5.1 -0.7 \n",
506
+ "\n",
507
+ " feelslike dew humidity ... solarenergy uvindex severerisk \\\n",
508
+ "0 -4.7 -1.9 83.9 ... 6.5 3 NaN \n",
509
+ "1 -2.9 -1.9 83.6 ... 6.3 3 NaN \n",
510
+ "2 -0.2 0.0 84.0 ... 6.4 3 NaN \n",
511
+ "3 2.8 3.8 82.6 ... 1.4 1 NaN \n",
512
+ "4 1.8 2.0 79.7 ... 6.1 3 NaN \n",
513
+ "\n",
514
+ " sunrise sunset moonphase \\\n",
515
+ "0 2014-01-29T08:24:35 2014-01-29T17:21:21 0.95 \n",
516
+ "1 2014-01-30T08:23:06 2014-01-30T17:23:12 0.00 \n",
517
+ "2 2014-01-31T08:21:34 2014-01-31T17:25:02 0.02 \n",
518
+ "3 2014-02-01T08:20:01 2014-02-01T17:26:54 0.05 \n",
519
+ "4 2014-02-02T08:18:25 2014-02-02T17:28:45 0.08 \n",
520
+ "\n",
521
+ " conditions description \\\n",
522
+ "0 Partially cloudy Partly cloudy throughout the day. \n",
523
+ "1 Partially cloudy Partly cloudy throughout the day. \n",
524
+ "2 Partially cloudy Becoming cloudy in the afternoon. \n",
525
+ "3 Rain, Partially cloudy Partly cloudy throughout the day with a chance... \n",
526
+ "4 Partially cloudy Becoming cloudy in the afternoon. \n",
527
+ "\n",
528
+ " icon stations \n",
529
+ "0 partly-cloudy-day 06260099999 \n",
530
+ "1 partly-cloudy-day 06260099999,remote \n",
531
+ "2 partly-cloudy-day 06260099999 \n",
532
+ "3 rain 06260099999 \n",
533
+ "4 partly-cloudy-day 06260099999 \n",
534
+ "\n",
535
+ "[5 rows x 33 columns]"
536
+ ]
537
+ },
538
+ "execution_count": 13,
539
+ "metadata": {},
540
+ "output_type": "execute_result"
541
+ }
542
+ ],
543
+ "source": [
544
+ "utrecht_additional_data.head()"
545
+ ]
546
+ },
547
+ {
548
+ "cell_type": "code",
549
+ "execution_count": null,
550
+ "metadata": {
551
+ "id": "wWNdBHwKE0wm"
552
+ },
553
+ "outputs": [],
554
+ "source": [
555
+ "utrecht_additional_data['datetime'] = pd.to_datetime(utrecht_additional_data['datetime'], format='%Y-%m-%d')\n",
556
+ "\n",
557
+ "#day/month/year\n",
558
+ "utrecht_additional_data['datetime'] = utrecht_additional_data['datetime'].dt.strftime('%d/%m/%Y')"
559
+ ]
560
+ },
561
+ {
562
+ "cell_type": "code",
563
+ "execution_count": null,
564
+ "metadata": {
565
+ "colab": {
566
+ "base_uri": "https://localhost:8080/",
567
+ "height": 446
568
+ },
569
+ "id": "zNT2SlcYFh9v",
570
+ "outputId": "8ab8062b-06af-411a-a06a-70314d15c54b"
571
+ },
572
+ "outputs": [
573
+ {
574
+ "data": {
575
+ "application/vnd.google.colaboratory.intrinsic+json": {
576
+ "type": "dataframe",
577
+ "variable_name": "utrecht_additional_data"
578
+ },
579
+ "text/html": [
580
+ "\n",
581
+ " <div id=\"df-0acd22ea-1bff-45fe-8847-74b31b4af0d5\" class=\"colab-df-container\">\n",
582
+ " <div>\n",
583
+ "<style scoped>\n",
584
+ " .dataframe tbody tr th:only-of-type {\n",
585
+ " vertical-align: middle;\n",
586
+ " }\n",
587
+ "\n",
588
+ " .dataframe tbody tr th {\n",
589
+ " vertical-align: top;\n",
590
+ " }\n",
591
+ "\n",
592
+ " .dataframe thead th {\n",
593
+ " text-align: right;\n",
594
+ " }\n",
595
+ "</style>\n",
596
+ "<table border=\"1\" class=\"dataframe\">\n",
597
+ " <thead>\n",
598
+ " <tr style=\"text-align: right;\">\n",
599
+ " <th></th>\n",
600
+ " <th>name</th>\n",
601
+ " <th>datetime</th>\n",
602
+ " <th>tempmax</th>\n",
603
+ " <th>tempmin</th>\n",
604
+ " <th>temp</th>\n",
605
+ " <th>feelslikemax</th>\n",
606
+ " <th>feelslikemin</th>\n",
607
+ " <th>feelslike</th>\n",
608
+ " <th>dew</th>\n",
609
+ " <th>humidity</th>\n",
610
+ " <th>...</th>\n",
611
+ " <th>solarenergy</th>\n",
612
+ " <th>uvindex</th>\n",
613
+ " <th>severerisk</th>\n",
614
+ " <th>sunrise</th>\n",
615
+ " <th>sunset</th>\n",
616
+ " <th>moonphase</th>\n",
617
+ " <th>conditions</th>\n",
618
+ " <th>description</th>\n",
619
+ " <th>icon</th>\n",
620
+ " <th>stations</th>\n",
621
+ " </tr>\n",
622
+ " </thead>\n",
623
+ " <tbody>\n",
624
+ " <tr>\n",
625
+ " <th>0</th>\n",
626
+ " <td>utrecht</td>\n",
627
+ " <td>29/01/2014</td>\n",
628
+ " <td>3.2</td>\n",
629
+ " <td>-1.8</td>\n",
630
+ " <td>0.6</td>\n",
631
+ " <td>-1.0</td>\n",
632
+ " <td>-7.5</td>\n",
633
+ " <td>-4.7</td>\n",
634
+ " <td>-1.9</td>\n",
635
+ " <td>83.9</td>\n",
636
+ " <td>...</td>\n",
637
+ " <td>6.5</td>\n",
638
+ " <td>3</td>\n",
639
+ " <td>NaN</td>\n",
640
+ " <td>2014-01-29T08:24:35</td>\n",
641
+ " <td>2014-01-29T17:21:21</td>\n",
642
+ " <td>0.95</td>\n",
643
+ " <td>Partially cloudy</td>\n",
644
+ " <td>Partly cloudy throughout the day.</td>\n",
645
+ " <td>partly-cloudy-day</td>\n",
646
+ " <td>06260099999</td>\n",
647
+ " </tr>\n",
648
+ " <tr>\n",
649
+ " <th>1</th>\n",
650
+ " <td>utrecht</td>\n",
651
+ " <td>30/01/2014</td>\n",
652
+ " <td>4.4</td>\n",
653
+ " <td>-2.3</td>\n",
654
+ " <td>0.6</td>\n",
655
+ " <td>2.6</td>\n",
656
+ " <td>-7.2</td>\n",
657
+ " <td>-2.9</td>\n",
658
+ " <td>-1.9</td>\n",
659
+ " <td>83.6</td>\n",
660
+ " <td>...</td>\n",
661
+ " <td>6.3</td>\n",
662
+ " <td>3</td>\n",
663
+ " <td>NaN</td>\n",
664
+ " <td>2014-01-30T08:23:06</td>\n",
665
+ " <td>2014-01-30T17:23:12</td>\n",
666
+ " <td>0.00</td>\n",
667
+ " <td>Partially cloudy</td>\n",
668
+ " <td>Partly cloudy throughout the day.</td>\n",
669
+ " <td>partly-cloudy-day</td>\n",
670
+ " <td>06260099999,remote</td>\n",
671
+ " </tr>\n",
672
+ " <tr>\n",
673
+ " <th>2</th>\n",
674
+ " <td>utrecht</td>\n",
675
+ " <td>31/01/2014</td>\n",
676
+ " <td>7.1</td>\n",
677
+ " <td>-2.6</td>\n",
678
+ " <td>2.6</td>\n",
679
+ " <td>4.7</td>\n",
680
+ " <td>-5.5</td>\n",
681
+ " <td>-0.2</td>\n",
682
+ " <td>0.0</td>\n",
683
+ " <td>84.0</td>\n",
684
+ " <td>...</td>\n",
685
+ " <td>6.4</td>\n",
686
+ " <td>3</td>\n",
687
+ " <td>NaN</td>\n",
688
+ " <td>2014-01-31T08:21:34</td>\n",
689
+ " <td>2014-01-31T17:25:02</td>\n",
690
+ " <td>0.02</td>\n",
691
+ " <td>Partially cloudy</td>\n",
692
+ " <td>Becoming cloudy in the afternoon.</td>\n",
693
+ " <td>partly-cloudy-day</td>\n",
694
+ " <td>06260099999</td>\n",
695
+ " </tr>\n",
696
+ " <tr>\n",
697
+ " <th>3</th>\n",
698
+ " <td>utrecht</td>\n",
699
+ " <td>01/02/2014</td>\n",
700
+ " <td>8.4</td>\n",
701
+ " <td>5.4</td>\n",
702
+ " <td>6.6</td>\n",
703
+ " <td>5.3</td>\n",
704
+ " <td>1.3</td>\n",
705
+ " <td>2.8</td>\n",
706
+ " <td>3.8</td>\n",
707
+ " <td>82.6</td>\n",
708
+ " <td>...</td>\n",
709
+ " <td>1.4</td>\n",
710
+ " <td>1</td>\n",
711
+ " <td>NaN</td>\n",
712
+ " <td>2014-02-01T08:20:01</td>\n",
713
+ " <td>2014-02-01T17:26:54</td>\n",
714
+ " <td>0.05</td>\n",
715
+ " <td>Rain, Partially cloudy</td>\n",
716
+ " <td>Partly cloudy throughout the day with a chance...</td>\n",
717
+ " <td>rain</td>\n",
718
+ " <td>06260099999</td>\n",
719
+ " </tr>\n",
720
+ " <tr>\n",
721
+ " <th>4</th>\n",
722
+ " <td>utrecht</td>\n",
723
+ " <td>02/02/2014</td>\n",
724
+ " <td>7.7</td>\n",
725
+ " <td>3.2</td>\n",
726
+ " <td>5.3</td>\n",
727
+ " <td>5.1</td>\n",
728
+ " <td>-0.7</td>\n",
729
+ " <td>1.8</td>\n",
730
+ " <td>2.0</td>\n",
731
+ " <td>79.7</td>\n",
732
+ " <td>...</td>\n",
733
+ " <td>6.1</td>\n",
734
+ " <td>3</td>\n",
735
+ " <td>NaN</td>\n",
736
+ " <td>2014-02-02T08:18:25</td>\n",
737
+ " <td>2014-02-02T17:28:45</td>\n",
738
+ " <td>0.08</td>\n",
739
+ " <td>Partially cloudy</td>\n",
740
+ " <td>Becoming cloudy in the afternoon.</td>\n",
741
+ " <td>partly-cloudy-day</td>\n",
742
+ " <td>06260099999</td>\n",
743
+ " </tr>\n",
744
+ " </tbody>\n",
745
+ "</table>\n",
746
+ "<p>5 rows × 33 columns</p>\n",
747
+ "</div>\n",
748
+ " <div class=\"colab-df-buttons\">\n",
749
+ "\n",
750
+ " <div class=\"colab-df-container\">\n",
751
+ " <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-0acd22ea-1bff-45fe-8847-74b31b4af0d5')\"\n",
752
+ " title=\"Convert this dataframe to an interactive table.\"\n",
753
+ " style=\"display:none;\">\n",
754
+ "\n",
755
+ " <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
756
+ " <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
757
+ " </svg>\n",
758
+ " </button>\n",
759
+ "\n",
760
+ " <style>\n",
761
+ " .colab-df-container {\n",
762
+ " display:flex;\n",
763
+ " gap: 12px;\n",
764
+ " }\n",
765
+ "\n",
766
+ " .colab-df-convert {\n",
767
+ " background-color: #E8F0FE;\n",
768
+ " border: none;\n",
769
+ " border-radius: 50%;\n",
770
+ " cursor: pointer;\n",
771
+ " display: none;\n",
772
+ " fill: #1967D2;\n",
773
+ " height: 32px;\n",
774
+ " padding: 0 0 0 0;\n",
775
+ " width: 32px;\n",
776
+ " }\n",
777
+ "\n",
778
+ " .colab-df-convert:hover {\n",
779
+ " background-color: #E2EBFA;\n",
780
+ " box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
781
+ " fill: #174EA6;\n",
782
+ " }\n",
783
+ "\n",
784
+ " .colab-df-buttons div {\n",
785
+ " margin-bottom: 4px;\n",
786
+ " }\n",
787
+ "\n",
788
+ " [theme=dark] .colab-df-convert {\n",
789
+ " background-color: #3B4455;\n",
790
+ " fill: #D2E3FC;\n",
791
+ " }\n",
792
+ "\n",
793
+ " [theme=dark] .colab-df-convert:hover {\n",
794
+ " background-color: #434B5C;\n",
795
+ " box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
796
+ " filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
797
+ " fill: #FFFFFF;\n",
798
+ " }\n",
799
+ " </style>\n",
800
+ "\n",
801
+ " <script>\n",
802
+ " const buttonEl =\n",
803
+ " document.querySelector('#df-0acd22ea-1bff-45fe-8847-74b31b4af0d5 button.colab-df-convert');\n",
804
+ " buttonEl.style.display =\n",
805
+ " google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
806
+ "\n",
807
+ " async function convertToInteractive(key) {\n",
808
+ " const element = document.querySelector('#df-0acd22ea-1bff-45fe-8847-74b31b4af0d5');\n",
809
+ " const dataTable =\n",
810
+ " await google.colab.kernel.invokeFunction('convertToInteractive',\n",
811
+ " [key], {});\n",
812
+ " if (!dataTable) return;\n",
813
+ "\n",
814
+ " const docLinkHtml = 'Like what you see? Visit the ' +\n",
815
+ " '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
816
+ " + ' to learn more about interactive tables.';\n",
817
+ " element.innerHTML = '';\n",
818
+ " dataTable['output_type'] = 'display_data';\n",
819
+ " await google.colab.output.renderOutput(dataTable, element);\n",
820
+ " const docLink = document.createElement('div');\n",
821
+ " docLink.innerHTML = docLinkHtml;\n",
822
+ " element.appendChild(docLink);\n",
823
+ " }\n",
824
+ " </script>\n",
825
+ " </div>\n",
826
+ "\n",
827
+ "\n",
828
+ "<div id=\"df-83936176-2417-4a64-8476-a933b9ef5792\">\n",
829
+ " <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-83936176-2417-4a64-8476-a933b9ef5792')\"\n",
830
+ " title=\"Suggest charts\"\n",
831
+ " style=\"display:none;\">\n",
832
+ "\n",
833
+ "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
834
+ " width=\"24px\">\n",
835
+ " <g>\n",
836
+ " <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
837
+ " </g>\n",
838
+ "</svg>\n",
839
+ " </button>\n",
840
+ "\n",
841
+ "<style>\n",
842
+ " .colab-df-quickchart {\n",
843
+ " --bg-color: #E8F0FE;\n",
844
+ " --fill-color: #1967D2;\n",
845
+ " --hover-bg-color: #E2EBFA;\n",
846
+ " --hover-fill-color: #174EA6;\n",
847
+ " --disabled-fill-color: #AAA;\n",
848
+ " --disabled-bg-color: #DDD;\n",
849
+ " }\n",
850
+ "\n",
851
+ " [theme=dark] .colab-df-quickchart {\n",
852
+ " --bg-color: #3B4455;\n",
853
+ " --fill-color: #D2E3FC;\n",
854
+ " --hover-bg-color: #434B5C;\n",
855
+ " --hover-fill-color: #FFFFFF;\n",
856
+ " --disabled-bg-color: #3B4455;\n",
857
+ " --disabled-fill-color: #666;\n",
858
+ " }\n",
859
+ "\n",
860
+ " .colab-df-quickchart {\n",
861
+ " background-color: var(--bg-color);\n",
862
+ " border: none;\n",
863
+ " border-radius: 50%;\n",
864
+ " cursor: pointer;\n",
865
+ " display: none;\n",
866
+ " fill: var(--fill-color);\n",
867
+ " height: 32px;\n",
868
+ " padding: 0;\n",
869
+ " width: 32px;\n",
870
+ " }\n",
871
+ "\n",
872
+ " .colab-df-quickchart:hover {\n",
873
+ " background-color: var(--hover-bg-color);\n",
874
+ " box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
875
+ " fill: var(--button-hover-fill-color);\n",
876
+ " }\n",
877
+ "\n",
878
+ " .colab-df-quickchart-complete:disabled,\n",
879
+ " .colab-df-quickchart-complete:disabled:hover {\n",
880
+ " background-color: var(--disabled-bg-color);\n",
881
+ " fill: var(--disabled-fill-color);\n",
882
+ " box-shadow: none;\n",
883
+ " }\n",
884
+ "\n",
885
+ " .colab-df-spinner {\n",
886
+ " border: 2px solid var(--fill-color);\n",
887
+ " border-color: transparent;\n",
888
+ " border-bottom-color: var(--fill-color);\n",
889
+ " animation:\n",
890
+ " spin 1s steps(1) infinite;\n",
891
+ " }\n",
892
+ "\n",
893
+ " @keyframes spin {\n",
894
+ " 0% {\n",
895
+ " border-color: transparent;\n",
896
+ " border-bottom-color: var(--fill-color);\n",
897
+ " border-left-color: var(--fill-color);\n",
898
+ " }\n",
899
+ " 20% {\n",
900
+ " border-color: transparent;\n",
901
+ " border-left-color: var(--fill-color);\n",
902
+ " border-top-color: var(--fill-color);\n",
903
+ " }\n",
904
+ " 30% {\n",
905
+ " border-color: transparent;\n",
906
+ " border-left-color: var(--fill-color);\n",
907
+ " border-top-color: var(--fill-color);\n",
908
+ " border-right-color: var(--fill-color);\n",
909
+ " }\n",
910
+ " 40% {\n",
911
+ " border-color: transparent;\n",
912
+ " border-right-color: var(--fill-color);\n",
913
+ " border-top-color: var(--fill-color);\n",
914
+ " }\n",
915
+ " 60% {\n",
916
+ " border-color: transparent;\n",
917
+ " border-right-color: var(--fill-color);\n",
918
+ " }\n",
919
+ " 80% {\n",
920
+ " border-color: transparent;\n",
921
+ " border-right-color: var(--fill-color);\n",
922
+ " border-bottom-color: var(--fill-color);\n",
923
+ " }\n",
924
+ " 90% {\n",
925
+ " border-color: transparent;\n",
926
+ " border-bottom-color: var(--fill-color);\n",
927
+ " }\n",
928
+ " }\n",
929
+ "</style>\n",
930
+ "\n",
931
+ " <script>\n",
932
+ " async function quickchart(key) {\n",
933
+ " const quickchartButtonEl =\n",
934
+ " document.querySelector('#' + key + ' button');\n",
935
+ " quickchartButtonEl.disabled = true; // To prevent multiple clicks.\n",
936
+ " quickchartButtonEl.classList.add('colab-df-spinner');\n",
937
+ " try {\n",
938
+ " const charts = await google.colab.kernel.invokeFunction(\n",
939
+ " 'suggestCharts', [key], {});\n",
940
+ " } catch (error) {\n",
941
+ " console.error('Error during call to suggestCharts:', error);\n",
942
+ " }\n",
943
+ " quickchartButtonEl.classList.remove('colab-df-spinner');\n",
944
+ " quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
945
+ " }\n",
946
+ " (() => {\n",
947
+ " let quickchartButtonEl =\n",
948
+ " document.querySelector('#df-83936176-2417-4a64-8476-a933b9ef5792 button');\n",
949
+ " quickchartButtonEl.style.display =\n",
950
+ " google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
951
+ " })();\n",
952
+ " </script>\n",
953
+ "</div>\n",
954
+ "\n",
955
+ " </div>\n",
956
+ " </div>\n"
957
+ ],
958
+ "text/plain": [
959
+ " name datetime tempmax tempmin temp feelslikemax feelslikemin \\\n",
960
+ "0 utrecht 29/01/2014 3.2 -1.8 0.6 -1.0 -7.5 \n",
961
+ "1 utrecht 30/01/2014 4.4 -2.3 0.6 2.6 -7.2 \n",
962
+ "2 utrecht 31/01/2014 7.1 -2.6 2.6 4.7 -5.5 \n",
963
+ "3 utrecht 01/02/2014 8.4 5.4 6.6 5.3 1.3 \n",
964
+ "4 utrecht 02/02/2014 7.7 3.2 5.3 5.1 -0.7 \n",
965
+ "\n",
966
+ " feelslike dew humidity ... solarenergy uvindex severerisk \\\n",
967
+ "0 -4.7 -1.9 83.9 ... 6.5 3 NaN \n",
968
+ "1 -2.9 -1.9 83.6 ... 6.3 3 NaN \n",
969
+ "2 -0.2 0.0 84.0 ... 6.4 3 NaN \n",
970
+ "3 2.8 3.8 82.6 ... 1.4 1 NaN \n",
971
+ "4 1.8 2.0 79.7 ... 6.1 3 NaN \n",
972
+ "\n",
973
+ " sunrise sunset moonphase \\\n",
974
+ "0 2014-01-29T08:24:35 2014-01-29T17:21:21 0.95 \n",
975
+ "1 2014-01-30T08:23:06 2014-01-30T17:23:12 0.00 \n",
976
+ "2 2014-01-31T08:21:34 2014-01-31T17:25:02 0.02 \n",
977
+ "3 2014-02-01T08:20:01 2014-02-01T17:26:54 0.05 \n",
978
+ "4 2014-02-02T08:18:25 2014-02-02T17:28:45 0.08 \n",
979
+ "\n",
980
+ " conditions description \\\n",
981
+ "0 Partially cloudy Partly cloudy throughout the day. \n",
982
+ "1 Partially cloudy Partly cloudy throughout the day. \n",
983
+ "2 Partially cloudy Becoming cloudy in the afternoon. \n",
984
+ "3 Rain, Partially cloudy Partly cloudy throughout the day with a chance... \n",
985
+ "4 Partially cloudy Becoming cloudy in the afternoon. \n",
986
+ "\n",
987
+ " icon stations \n",
988
+ "0 partly-cloudy-day 06260099999 \n",
989
+ "1 partly-cloudy-day 06260099999,remote \n",
990
+ "2 partly-cloudy-day 06260099999 \n",
991
+ "3 rain 06260099999 \n",
992
+ "4 partly-cloudy-day 06260099999 \n",
993
+ "\n",
994
+ "[5 rows x 33 columns]"
995
+ ]
996
+ },
997
+ "execution_count": 13,
998
+ "metadata": {},
999
+ "output_type": "execute_result"
1000
+ }
1001
+ ],
1002
+ "source": [
1003
+ "utrecht_additional_data.head()"
1004
+ ]
1005
+ },
1006
+ {
1007
+ "cell_type": "code",
1008
+ "execution_count": null,
1009
+ "metadata": {
1010
+ "id": "Q_4dp9v5Fi1-"
1011
+ },
1012
+ "outputs": [],
1013
+ "source": [
1014
+ "merged_df = pd.merge(o3_and_no2, utrecht_additional_data, left_on='date', right_on='datetime')"
1015
+ ]
1016
+ },
1017
+ {
1018
+ "cell_type": "code",
1019
+ "execution_count": null,
1020
+ "metadata": {
1021
+ "colab": {
1022
+ "base_uri": "https://localhost:8080/",
1023
+ "height": 877
1024
+ },
1025
+ "id": "6-3nXPubGWjW",
1026
+ "outputId": "f667bbce-1a60-4d6a-c6c9-65f43ab4b877"
1027
+ },
1028
+ "outputs": [
1029
+ {
1030
+ "data": {
1031
+ "application/vnd.google.colaboratory.intrinsic+json": {
1032
+ "type": "dataframe",
1033
+ "variable_name": "merged_df"
1034
+ },
1035
+ "text/html": [
1036
+ "\n",
1037
+ " <div id=\"df-7f6c247a-86a1-411d-98cf-59589a38f601\" class=\"colab-df-container\">\n",
1038
+ " <div>\n",
1039
+ "<style scoped>\n",
1040
+ " .dataframe tbody tr th:only-of-type {\n",
1041
+ " vertical-align: middle;\n",
1042
+ " }\n",
1043
+ "\n",
1044
+ " .dataframe tbody tr th {\n",
1045
+ " vertical-align: top;\n",
1046
+ " }\n",
1047
+ "\n",
1048
+ " .dataframe thead th {\n",
1049
+ " text-align: right;\n",
1050
+ " }\n",
1051
+ "</style>\n",
1052
+ "<table border=\"1\" class=\"dataframe\">\n",
1053
+ " <thead>\n",
1054
+ " <tr style=\"text-align: right;\">\n",
1055
+ " <th></th>\n",
1056
+ " <th>date</th>\n",
1057
+ " <th>pm25</th>\n",
1058
+ " <th>pm10</th>\n",
1059
+ " <th>o3</th>\n",
1060
+ " <th>no2</th>\n",
1061
+ " <th>so2</th>\n",
1062
+ " <th>name</th>\n",
1063
+ " <th>datetime</th>\n",
1064
+ " <th>tempmax</th>\n",
1065
+ " <th>tempmin</th>\n",
1066
+ " <th>...</th>\n",
1067
+ " <th>solarenergy</th>\n",
1068
+ " <th>uvindex</th>\n",
1069
+ " <th>severerisk</th>\n",
1070
+ " <th>sunrise</th>\n",
1071
+ " <th>sunset</th>\n",
1072
+ " <th>moonphase</th>\n",
1073
+ " <th>conditions</th>\n",
1074
+ " <th>description</th>\n",
1075
+ " <th>icon</th>\n",
1076
+ " <th>stations</th>\n",
1077
+ " </tr>\n",
1078
+ " </thead>\n",
1079
+ " <tbody>\n",
1080
+ " <tr>\n",
1081
+ " <th>0</th>\n",
1082
+ " <td>11/09/2024</td>\n",
1083
+ " <td>24</td>\n",
1084
+ " <td>6</td>\n",
1085
+ " <td>16</td>\n",
1086
+ " <td>5</td>\n",
1087
+ " <td></td>\n",
1088
+ " <td>utrecht</td>\n",
1089
+ " <td>11/09/2024</td>\n",
1090
+ " <td>14.5</td>\n",
1091
+ " <td>9.2</td>\n",
1092
+ " <td>...</td>\n",
1093
+ " <td>17.3</td>\n",
1094
+ " <td>7</td>\n",
1095
+ " <td>10.0</td>\n",
1096
+ " <td>2024-09-11T07:08:06</td>\n",
1097
+ " <td>2024-09-11T20:02:59</td>\n",
1098
+ " <td>0.25</td>\n",
1099
+ " <td>Rain, Partially cloudy</td>\n",
1100
+ " <td>Partly cloudy throughout the day with a chance...</td>\n",
1101
+ " <td>rain</td>\n",
1102
+ " <td>remote</td>\n",
1103
+ " </tr>\n",
1104
+ " <tr>\n",
1105
+ " <th>1</th>\n",
1106
+ " <td>10/09/2024</td>\n",
1107
+ " <td>26</td>\n",
1108
+ " <td>16</td>\n",
1109
+ " <td>27</td>\n",
1110
+ " <td>3</td>\n",
1111
+ " <td></td>\n",
1112
+ " <td>utrecht</td>\n",
1113
+ " <td>10/09/2024</td>\n",
1114
+ " <td>16.6</td>\n",
1115
+ " <td>12.4</td>\n",
1116
+ " <td>...</td>\n",
1117
+ " <td>6.8</td>\n",
1118
+ " <td>5</td>\n",
1119
+ " <td>10.0</td>\n",
1120
+ " <td>2024-09-10T07:06:28</td>\n",
1121
+ " <td>2024-09-10T20:05:19</td>\n",
1122
+ " <td>0.24</td>\n",
1123
+ " <td>Rain, Overcast</td>\n",
1124
+ " <td>Cloudy skies throughout the day with rain.</td>\n",
1125
+ " <td>rain</td>\n",
1126
+ " <td>remote</td>\n",
1127
+ " </tr>\n",
1128
+ " <tr>\n",
1129
+ " <th>2</th>\n",
1130
+ " <td>09/09/2024</td>\n",
1131
+ " <td>15</td>\n",
1132
+ " <td>14</td>\n",
1133
+ " <td>25</td>\n",
1134
+ " <td>3</td>\n",
1135
+ " <td></td>\n",
1136
+ " <td>utrecht</td>\n",
1137
+ " <td>09/09/2024</td>\n",
1138
+ " <td>20.2</td>\n",
1139
+ " <td>14.0</td>\n",
1140
+ " <td>...</td>\n",
1141
+ " <td>16.0</td>\n",
1142
+ " <td>6</td>\n",
1143
+ " <td>10.0</td>\n",
1144
+ " <td>2024-09-09T07:04:50</td>\n",
1145
+ " <td>2024-09-09T20:07:39</td>\n",
1146
+ " <td>0.21</td>\n",
1147
+ " <td>Rain, Partially cloudy</td>\n",
1148
+ " <td>Partly cloudy throughout the day with rain.</td>\n",
1149
+ " <td>rain</td>\n",
1150
+ " <td>remote</td>\n",
1151
+ " </tr>\n",
1152
+ " <tr>\n",
1153
+ " <th>3</th>\n",
1154
+ " <td>08/09/2024</td>\n",
1155
+ " <td>17</td>\n",
1156
+ " <td>12</td>\n",
1157
+ " <td>31</td>\n",
1158
+ " <td>9</td>\n",
1159
+ " <td></td>\n",
1160
+ " <td>utrecht</td>\n",
1161
+ " <td>08/09/2024</td>\n",
1162
+ " <td>21.9</td>\n",
1163
+ " <td>14.9</td>\n",
1164
+ " <td>...</td>\n",
1165
+ " <td>17.7</td>\n",
1166
+ " <td>7</td>\n",
1167
+ " <td>10.0</td>\n",
1168
+ " <td>2024-09-08T07:03:12</td>\n",
1169
+ " <td>2024-09-08T20:09:58</td>\n",
1170
+ " <td>0.18</td>\n",
1171
+ " <td>Rain, Partially cloudy</td>\n",
1172
+ " <td>Partly cloudy throughout the day with early mo...</td>\n",
1173
+ " <td>rain</td>\n",
1174
+ " <td>06260099999,remote</td>\n",
1175
+ " </tr>\n",
1176
+ " <tr>\n",
1177
+ " <th>4</th>\n",
1178
+ " <td>07/09/2024</td>\n",
1179
+ " <td>25</td>\n",
1180
+ " <td>13</td>\n",
1181
+ " <td>34</td>\n",
1182
+ " <td>3</td>\n",
1183
+ " <td></td>\n",
1184
+ " <td>utrecht</td>\n",
1185
+ " <td>07/09/2024</td>\n",
1186
+ " <td>26.4</td>\n",
1187
+ " <td>17.6</td>\n",
1188
+ " <td>...</td>\n",
1189
+ " <td>16.5</td>\n",
1190
+ " <td>6</td>\n",
1191
+ " <td>10.0</td>\n",
1192
+ " <td>2024-09-07T07:01:34</td>\n",
1193
+ " <td>2024-09-07T20:12:18</td>\n",
1194
+ " <td>0.14</td>\n",
1195
+ " <td>Overcast</td>\n",
1196
+ " <td>Cloudy skies throughout the day.</td>\n",
1197
+ " <td>cloudy</td>\n",
1198
+ " <td>06260099999</td>\n",
1199
+ " </tr>\n",
1200
+ " <tr>\n",
1201
+ " <th>...</th>\n",
1202
+ " <td>...</td>\n",
1203
+ " <td>...</td>\n",
1204
+ " <td>...</td>\n",
1205
+ " <td>...</td>\n",
1206
+ " <td>...</td>\n",
1207
+ " <td>...</td>\n",
1208
+ " <td>...</td>\n",
1209
+ " <td>...</td>\n",
1210
+ " <td>...</td>\n",
1211
+ " <td>...</td>\n",
1212
+ " <td>...</td>\n",
1213
+ " <td>...</td>\n",
1214
+ " <td>...</td>\n",
1215
+ " <td>...</td>\n",
1216
+ " <td>...</td>\n",
1217
+ " <td>...</td>\n",
1218
+ " <td>...</td>\n",
1219
+ " <td>...</td>\n",
1220
+ " <td>...</td>\n",
1221
+ " <td>...</td>\n",
1222
+ " <td>...</td>\n",
1223
+ " </tr>\n",
1224
+ " <tr>\n",
1225
+ " <th>3665</th>\n",
1226
+ " <td>02/02/2014</td>\n",
1227
+ " <td></td>\n",
1228
+ " <td>17</td>\n",
1229
+ " <td>11</td>\n",
1230
+ " <td>17</td>\n",
1231
+ " <td>1</td>\n",
1232
+ " <td>utrecht</td>\n",
1233
+ " <td>02/02/2014</td>\n",
1234
+ " <td>7.7</td>\n",
1235
+ " <td>3.2</td>\n",
1236
+ " <td>...</td>\n",
1237
+ " <td>6.1</td>\n",
1238
+ " <td>3</td>\n",
1239
+ " <td>NaN</td>\n",
1240
+ " <td>2014-02-02T08:18:25</td>\n",
1241
+ " <td>2014-02-02T17:28:45</td>\n",
1242
+ " <td>0.08</td>\n",
1243
+ " <td>Partially cloudy</td>\n",
1244
+ " <td>Becoming cloudy in the afternoon.</td>\n",
1245
+ " <td>partly-cloudy-day</td>\n",
1246
+ " <td>06260099999</td>\n",
1247
+ " </tr>\n",
1248
+ " <tr>\n",
1249
+ " <th>3666</th>\n",
1250
+ " <td>01/02/2014</td>\n",
1251
+ " <td></td>\n",
1252
+ " <td>22</td>\n",
1253
+ " <td>18</td>\n",
1254
+ " <td>8</td>\n",
1255
+ " <td></td>\n",
1256
+ " <td>utrecht</td>\n",
1257
+ " <td>01/02/2014</td>\n",
1258
+ " <td>8.4</td>\n",
1259
+ " <td>5.4</td>\n",
1260
+ " <td>...</td>\n",
1261
+ " <td>1.4</td>\n",
1262
+ " <td>1</td>\n",
1263
+ " <td>NaN</td>\n",
1264
+ " <td>2014-02-01T08:20:01</td>\n",
1265
+ " <td>2014-02-01T17:26:54</td>\n",
1266
+ " <td>0.05</td>\n",
1267
+ " <td>Rain, Partially cloudy</td>\n",
1268
+ " <td>Partly cloudy throughout the day with a chance...</td>\n",
1269
+ " <td>rain</td>\n",
1270
+ " <td>06260099999</td>\n",
1271
+ " </tr>\n",
1272
+ " <tr>\n",
1273
+ " <th>3667</th>\n",
1274
+ " <td>31/01/2014</td>\n",
1275
+ " <td></td>\n",
1276
+ " <td>48</td>\n",
1277
+ " <td>22</td>\n",
1278
+ " <td>6</td>\n",
1279
+ " <td></td>\n",
1280
+ " <td>utrecht</td>\n",
1281
+ " <td>31/01/2014</td>\n",
1282
+ " <td>7.1</td>\n",
1283
+ " <td>-2.6</td>\n",
1284
+ " <td>...</td>\n",
1285
+ " <td>6.4</td>\n",
1286
+ " <td>3</td>\n",
1287
+ " <td>NaN</td>\n",
1288
+ " <td>2014-01-31T08:21:34</td>\n",
1289
+ " <td>2014-01-31T17:25:02</td>\n",
1290
+ " <td>0.02</td>\n",
1291
+ " <td>Partially cloudy</td>\n",
1292
+ " <td>Becoming cloudy in the afternoon.</td>\n",
1293
+ " <td>partly-cloudy-day</td>\n",
1294
+ " <td>06260099999</td>\n",
1295
+ " </tr>\n",
1296
+ " <tr>\n",
1297
+ " <th>3668</th>\n",
1298
+ " <td>30/01/2014</td>\n",
1299
+ " <td></td>\n",
1300
+ " <td>38</td>\n",
1301
+ " <td>17</td>\n",
1302
+ " <td>21</td>\n",
1303
+ " <td>1</td>\n",
1304
+ " <td>utrecht</td>\n",
1305
+ " <td>30/01/2014</td>\n",
1306
+ " <td>4.4</td>\n",
1307
+ " <td>-2.3</td>\n",
1308
+ " <td>...</td>\n",
1309
+ " <td>6.3</td>\n",
1310
+ " <td>3</td>\n",
1311
+ " <td>NaN</td>\n",
1312
+ " <td>2014-01-30T08:23:06</td>\n",
1313
+ " <td>2014-01-30T17:23:12</td>\n",
1314
+ " <td>0.00</td>\n",
1315
+ " <td>Partially cloudy</td>\n",
1316
+ " <td>Partly cloudy throughout the day.</td>\n",
1317
+ " <td>partly-cloudy-day</td>\n",
1318
+ " <td>06260099999,remote</td>\n",
1319
+ " </tr>\n",
1320
+ " <tr>\n",
1321
+ " <th>3669</th>\n",
1322
+ " <td>29/01/2014</td>\n",
1323
+ " <td></td>\n",
1324
+ " <td></td>\n",
1325
+ " <td>4</td>\n",
1326
+ " <td>17</td>\n",
1327
+ " <td>1</td>\n",
1328
+ " <td>utrecht</td>\n",
1329
+ " <td>29/01/2014</td>\n",
1330
+ " <td>3.2</td>\n",
1331
+ " <td>-1.8</td>\n",
1332
+ " <td>...</td>\n",
1333
+ " <td>6.5</td>\n",
1334
+ " <td>3</td>\n",
1335
+ " <td>NaN</td>\n",
1336
+ " <td>2014-01-29T08:24:35</td>\n",
1337
+ " <td>2014-01-29T17:21:21</td>\n",
1338
+ " <td>0.95</td>\n",
1339
+ " <td>Partially cloudy</td>\n",
1340
+ " <td>Partly cloudy throughout the day.</td>\n",
1341
+ " <td>partly-cloudy-day</td>\n",
1342
+ " <td>06260099999</td>\n",
1343
+ " </tr>\n",
1344
+ " </tbody>\n",
1345
+ "</table>\n",
1346
+ "<p>3670 rows × 39 columns</p>\n",
1347
+ "</div>\n",
1348
+ " <div class=\"colab-df-buttons\">\n",
1349
+ "\n",
1350
+ " <div class=\"colab-df-container\">\n",
1351
+ " <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-7f6c247a-86a1-411d-98cf-59589a38f601')\"\n",
1352
+ " title=\"Convert this dataframe to an interactive table.\"\n",
1353
+ " style=\"display:none;\">\n",
1354
+ "\n",
1355
+ " <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
1356
+ " <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
1357
+ " </svg>\n",
1358
+ " </button>\n",
1359
+ "\n",
1360
+ " <style>\n",
1361
+ " .colab-df-container {\n",
1362
+ " display:flex;\n",
1363
+ " gap: 12px;\n",
1364
+ " }\n",
1365
+ "\n",
1366
+ " .colab-df-convert {\n",
1367
+ " background-color: #E8F0FE;\n",
1368
+ " border: none;\n",
1369
+ " border-radius: 50%;\n",
1370
+ " cursor: pointer;\n",
1371
+ " display: none;\n",
1372
+ " fill: #1967D2;\n",
1373
+ " height: 32px;\n",
1374
+ " padding: 0 0 0 0;\n",
1375
+ " width: 32px;\n",
1376
+ " }\n",
1377
+ "\n",
1378
+ " .colab-df-convert:hover {\n",
1379
+ " background-color: #E2EBFA;\n",
1380
+ " box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
1381
+ " fill: #174EA6;\n",
1382
+ " }\n",
1383
+ "\n",
1384
+ " .colab-df-buttons div {\n",
1385
+ " margin-bottom: 4px;\n",
1386
+ " }\n",
1387
+ "\n",
1388
+ " [theme=dark] .colab-df-convert {\n",
1389
+ " background-color: #3B4455;\n",
1390
+ " fill: #D2E3FC;\n",
1391
+ " }\n",
1392
+ "\n",
1393
+ " [theme=dark] .colab-df-convert:hover {\n",
1394
+ " background-color: #434B5C;\n",
1395
+ " box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
1396
+ " filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
1397
+ " fill: #FFFFFF;\n",
1398
+ " }\n",
1399
+ " </style>\n",
1400
+ "\n",
1401
+ " <script>\n",
1402
+ " const buttonEl =\n",
1403
+ " document.querySelector('#df-7f6c247a-86a1-411d-98cf-59589a38f601 button.colab-df-convert');\n",
1404
+ " buttonEl.style.display =\n",
1405
+ " google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
1406
+ "\n",
1407
+ " async function convertToInteractive(key) {\n",
1408
+ " const element = document.querySelector('#df-7f6c247a-86a1-411d-98cf-59589a38f601');\n",
1409
+ " const dataTable =\n",
1410
+ " await google.colab.kernel.invokeFunction('convertToInteractive',\n",
1411
+ " [key], {});\n",
1412
+ " if (!dataTable) return;\n",
1413
+ "\n",
1414
+ " const docLinkHtml = 'Like what you see? Visit the ' +\n",
1415
+ " '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
1416
+ " + ' to learn more about interactive tables.';\n",
1417
+ " element.innerHTML = '';\n",
1418
+ " dataTable['output_type'] = 'display_data';\n",
1419
+ " await google.colab.output.renderOutput(dataTable, element);\n",
1420
+ " const docLink = document.createElement('div');\n",
1421
+ " docLink.innerHTML = docLinkHtml;\n",
1422
+ " element.appendChild(docLink);\n",
1423
+ " }\n",
1424
+ " </script>\n",
1425
+ " </div>\n",
1426
+ "\n",
1427
+ "\n",
1428
+ "<div id=\"df-76226304-ab50-47a3-b5da-a03a5fb2110f\">\n",
1429
+ " <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-76226304-ab50-47a3-b5da-a03a5fb2110f')\"\n",
1430
+ " title=\"Suggest charts\"\n",
1431
+ " style=\"display:none;\">\n",
1432
+ "\n",
1433
+ "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
1434
+ " width=\"24px\">\n",
1435
+ " <g>\n",
1436
+ " <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
1437
+ " </g>\n",
1438
+ "</svg>\n",
1439
+ " </button>\n",
1440
+ "\n",
1441
+ "<style>\n",
1442
+ " .colab-df-quickchart {\n",
1443
+ " --bg-color: #E8F0FE;\n",
1444
+ " --fill-color: #1967D2;\n",
1445
+ " --hover-bg-color: #E2EBFA;\n",
1446
+ " --hover-fill-color: #174EA6;\n",
1447
+ " --disabled-fill-color: #AAA;\n",
1448
+ " --disabled-bg-color: #DDD;\n",
1449
+ " }\n",
1450
+ "\n",
1451
+ " [theme=dark] .colab-df-quickchart {\n",
1452
+ " --bg-color: #3B4455;\n",
1453
+ " --fill-color: #D2E3FC;\n",
1454
+ " --hover-bg-color: #434B5C;\n",
1455
+ " --hover-fill-color: #FFFFFF;\n",
1456
+ " --disabled-bg-color: #3B4455;\n",
1457
+ " --disabled-fill-color: #666;\n",
1458
+ " }\n",
1459
+ "\n",
1460
+ " .colab-df-quickchart {\n",
1461
+ " background-color: var(--bg-color);\n",
1462
+ " border: none;\n",
1463
+ " border-radius: 50%;\n",
1464
+ " cursor: pointer;\n",
1465
+ " display: none;\n",
1466
+ " fill: var(--fill-color);\n",
1467
+ " height: 32px;\n",
1468
+ " padding: 0;\n",
1469
+ " width: 32px;\n",
1470
+ " }\n",
1471
+ "\n",
1472
+ " .colab-df-quickchart:hover {\n",
1473
+ " background-color: var(--hover-bg-color);\n",
1474
+ " box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
1475
+ " fill: var(--button-hover-fill-color);\n",
1476
+ " }\n",
1477
+ "\n",
1478
+ " .colab-df-quickchart-complete:disabled,\n",
1479
+ " .colab-df-quickchart-complete:disabled:hover {\n",
1480
+ " background-color: var(--disabled-bg-color);\n",
1481
+ " fill: var(--disabled-fill-color);\n",
1482
+ " box-shadow: none;\n",
1483
+ " }\n",
1484
+ "\n",
1485
+ " .colab-df-spinner {\n",
1486
+ " border: 2px solid var(--fill-color);\n",
1487
+ " border-color: transparent;\n",
1488
+ " border-bottom-color: var(--fill-color);\n",
1489
+ " animation:\n",
1490
+ " spin 1s steps(1) infinite;\n",
1491
+ " }\n",
1492
+ "\n",
1493
+ " @keyframes spin {\n",
1494
+ " 0% {\n",
1495
+ " border-color: transparent;\n",
1496
+ " border-bottom-color: var(--fill-color);\n",
1497
+ " border-left-color: var(--fill-color);\n",
1498
+ " }\n",
1499
+ " 20% {\n",
1500
+ " border-color: transparent;\n",
1501
+ " border-left-color: var(--fill-color);\n",
1502
+ " border-top-color: var(--fill-color);\n",
1503
+ " }\n",
1504
+ " 30% {\n",
1505
+ " border-color: transparent;\n",
1506
+ " border-left-color: var(--fill-color);\n",
1507
+ " border-top-color: var(--fill-color);\n",
1508
+ " border-right-color: var(--fill-color);\n",
1509
+ " }\n",
1510
+ " 40% {\n",
1511
+ " border-color: transparent;\n",
1512
+ " border-right-color: var(--fill-color);\n",
1513
+ " border-top-color: var(--fill-color);\n",
1514
+ " }\n",
1515
+ " 60% {\n",
1516
+ " border-color: transparent;\n",
1517
+ " border-right-color: var(--fill-color);\n",
1518
+ " }\n",
1519
+ " 80% {\n",
1520
+ " border-color: transparent;\n",
1521
+ " border-right-color: var(--fill-color);\n",
1522
+ " border-bottom-color: var(--fill-color);\n",
1523
+ " }\n",
1524
+ " 90% {\n",
1525
+ " border-color: transparent;\n",
1526
+ " border-bottom-color: var(--fill-color);\n",
1527
+ " }\n",
1528
+ " }\n",
1529
+ "</style>\n",
1530
+ "\n",
1531
+ " <script>\n",
1532
+ " async function quickchart(key) {\n",
1533
+ " const quickchartButtonEl =\n",
1534
+ " document.querySelector('#' + key + ' button');\n",
1535
+ " quickchartButtonEl.disabled = true; // To prevent multiple clicks.\n",
1536
+ " quickchartButtonEl.classList.add('colab-df-spinner');\n",
1537
+ " try {\n",
1538
+ " const charts = await google.colab.kernel.invokeFunction(\n",
1539
+ " 'suggestCharts', [key], {});\n",
1540
+ " } catch (error) {\n",
1541
+ " console.error('Error during call to suggestCharts:', error);\n",
1542
+ " }\n",
1543
+ " quickchartButtonEl.classList.remove('colab-df-spinner');\n",
1544
+ " quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
1545
+ " }\n",
1546
+ " (() => {\n",
1547
+ " let quickchartButtonEl =\n",
1548
+ " document.querySelector('#df-76226304-ab50-47a3-b5da-a03a5fb2110f button');\n",
1549
+ " quickchartButtonEl.style.display =\n",
1550
+ " google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
1551
+ " })();\n",
1552
+ " </script>\n",
1553
+ "</div>\n",
1554
+ "\n",
1555
+ " <div id=\"id_99280c40-a344-4f53-932a-7dc6507a8d69\">\n",
1556
+ " <style>\n",
1557
+ " .colab-df-generate {\n",
1558
+ " background-color: #E8F0FE;\n",
1559
+ " border: none;\n",
1560
+ " border-radius: 50%;\n",
1561
+ " cursor: pointer;\n",
1562
+ " display: none;\n",
1563
+ " fill: #1967D2;\n",
1564
+ " height: 32px;\n",
1565
+ " padding: 0 0 0 0;\n",
1566
+ " width: 32px;\n",
1567
+ " }\n",
1568
+ "\n",
1569
+ " .colab-df-generate:hover {\n",
1570
+ " background-color: #E2EBFA;\n",
1571
+ " box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
1572
+ " fill: #174EA6;\n",
1573
+ " }\n",
1574
+ "\n",
1575
+ " [theme=dark] .colab-df-generate {\n",
1576
+ " background-color: #3B4455;\n",
1577
+ " fill: #D2E3FC;\n",
1578
+ " }\n",
1579
+ "\n",
1580
+ " [theme=dark] .colab-df-generate:hover {\n",
1581
+ " background-color: #434B5C;\n",
1582
+ " box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
1583
+ " filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
1584
+ " fill: #FFFFFF;\n",
1585
+ " }\n",
1586
+ " </style>\n",
1587
+ " <button class=\"colab-df-generate\" onclick=\"generateWithVariable('merged_df')\"\n",
1588
+ " title=\"Generate code using this dataframe.\"\n",
1589
+ " style=\"display:none;\">\n",
1590
+ "\n",
1591
+ " <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
1592
+ " width=\"24px\">\n",
1593
+ " <path d=\"M7,19H8.4L18.45,9,17,7.55,7,17.6ZM5,21V16.75L18.45,3.32a2,2,0,0,1,2.83,0l1.4,1.43a1.91,1.91,0,0,1,.58,1.4,1.91,1.91,0,0,1-.58,1.4L9.25,21ZM18.45,9,17,7.55Zm-12,3A5.31,5.31,0,0,0,4.9,8.1,5.31,5.31,0,0,0,1,6.5,5.31,5.31,0,0,0,4.9,4.9,5.31,5.31,0,0,0,6.5,1,5.31,5.31,0,0,0,8.1,4.9,5.31,5.31,0,0,0,12,6.5,5.46,5.46,0,0,0,6.5,12Z\"/>\n",
1594
+ " </svg>\n",
1595
+ " </button>\n",
1596
+ " <script>\n",
1597
+ " (() => {\n",
1598
+ " const buttonEl =\n",
1599
+ " document.querySelector('#id_99280c40-a344-4f53-932a-7dc6507a8d69 button.colab-df-generate');\n",
1600
+ " buttonEl.style.display =\n",
1601
+ " google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
1602
+ "\n",
1603
+ " buttonEl.onclick = () => {\n",
1604
+ " google.colab.notebook.generateWithVariable('merged_df');\n",
1605
+ " }\n",
1606
+ " })();\n",
1607
+ " </script>\n",
1608
+ " </div>\n",
1609
+ "\n",
1610
+ " </div>\n",
1611
+ " </div>\n"
1612
+ ],
1613
+ "text/plain": [
1614
+ " date pm25 pm10 o3 no2 so2 name datetime tempmax \\\n",
1615
+ "0 11/09/2024 24 6 16 5 utrecht 11/09/2024 14.5 \n",
1616
+ "1 10/09/2024 26 16 27 3 utrecht 10/09/2024 16.6 \n",
1617
+ "2 09/09/2024 15 14 25 3 utrecht 09/09/2024 20.2 \n",
1618
+ "3 08/09/2024 17 12 31 9 utrecht 08/09/2024 21.9 \n",
1619
+ "4 07/09/2024 25 13 34 3 utrecht 07/09/2024 26.4 \n",
1620
+ "... ... ... ... .. ... ... ... ... ... \n",
1621
+ "3665 02/02/2014 17 11 17 1 utrecht 02/02/2014 7.7 \n",
1622
+ "3666 01/02/2014 22 18 8 utrecht 01/02/2014 8.4 \n",
1623
+ "3667 31/01/2014 48 22 6 utrecht 31/01/2014 7.1 \n",
1624
+ "3668 30/01/2014 38 17 21 1 utrecht 30/01/2014 4.4 \n",
1625
+ "3669 29/01/2014 4 17 1 utrecht 29/01/2014 3.2 \n",
1626
+ "\n",
1627
+ " tempmin ... solarenergy uvindex severerisk sunrise \\\n",
1628
+ "0 9.2 ... 17.3 7 10.0 2024-09-11T07:08:06 \n",
1629
+ "1 12.4 ... 6.8 5 10.0 2024-09-10T07:06:28 \n",
1630
+ "2 14.0 ... 16.0 6 10.0 2024-09-09T07:04:50 \n",
1631
+ "3 14.9 ... 17.7 7 10.0 2024-09-08T07:03:12 \n",
1632
+ "4 17.6 ... 16.5 6 10.0 2024-09-07T07:01:34 \n",
1633
+ "... ... ... ... ... ... ... \n",
1634
+ "3665 3.2 ... 6.1 3 NaN 2014-02-02T08:18:25 \n",
1635
+ "3666 5.4 ... 1.4 1 NaN 2014-02-01T08:20:01 \n",
1636
+ "3667 -2.6 ... 6.4 3 NaN 2014-01-31T08:21:34 \n",
1637
+ "3668 -2.3 ... 6.3 3 NaN 2014-01-30T08:23:06 \n",
1638
+ "3669 -1.8 ... 6.5 3 NaN 2014-01-29T08:24:35 \n",
1639
+ "\n",
1640
+ " sunset moonphase conditions \\\n",
1641
+ "0 2024-09-11T20:02:59 0.25 Rain, Partially cloudy \n",
1642
+ "1 2024-09-10T20:05:19 0.24 Rain, Overcast \n",
1643
+ "2 2024-09-09T20:07:39 0.21 Rain, Partially cloudy \n",
1644
+ "3 2024-09-08T20:09:58 0.18 Rain, Partially cloudy \n",
1645
+ "4 2024-09-07T20:12:18 0.14 Overcast \n",
1646
+ "... ... ... ... \n",
1647
+ "3665 2014-02-02T17:28:45 0.08 Partially cloudy \n",
1648
+ "3666 2014-02-01T17:26:54 0.05 Rain, Partially cloudy \n",
1649
+ "3667 2014-01-31T17:25:02 0.02 Partially cloudy \n",
1650
+ "3668 2014-01-30T17:23:12 0.00 Partially cloudy \n",
1651
+ "3669 2014-01-29T17:21:21 0.95 Partially cloudy \n",
1652
+ "\n",
1653
+ " description icon \\\n",
1654
+ "0 Partly cloudy throughout the day with a chance... rain \n",
1655
+ "1 Cloudy skies throughout the day with rain. rain \n",
1656
+ "2 Partly cloudy throughout the day with rain. rain \n",
1657
+ "3 Partly cloudy throughout the day with early mo... rain \n",
1658
+ "4 Cloudy skies throughout the day. cloudy \n",
1659
+ "... ... ... \n",
1660
+ "3665 Becoming cloudy in the afternoon. partly-cloudy-day \n",
1661
+ "3666 Partly cloudy throughout the day with a chance... rain \n",
1662
+ "3667 Becoming cloudy in the afternoon. partly-cloudy-day \n",
1663
+ "3668 Partly cloudy throughout the day. partly-cloudy-day \n",
1664
+ "3669 Partly cloudy throughout the day. partly-cloudy-day \n",
1665
+ "\n",
1666
+ " stations \n",
1667
+ "0 remote \n",
1668
+ "1 remote \n",
1669
+ "2 remote \n",
1670
+ "3 06260099999,remote \n",
1671
+ "4 06260099999 \n",
1672
+ "... ... \n",
1673
+ "3665 06260099999 \n",
1674
+ "3666 06260099999 \n",
1675
+ "3667 06260099999 \n",
1676
+ "3668 06260099999,remote \n",
1677
+ "3669 06260099999 \n",
1678
+ "\n",
1679
+ "[3670 rows x 39 columns]"
1680
+ ]
1681
+ },
1682
+ "execution_count": 15,
1683
+ "metadata": {},
1684
+ "output_type": "execute_result"
1685
+ }
1686
+ ],
1687
+ "source": [
1688
+ "merged_df"
1689
+ ]
1690
+ },
1691
+ {
1692
+ "cell_type": "code",
1693
+ "execution_count": null,
1694
+ "metadata": {
1695
+ "id": "gH6X91ctGXR6"
1696
+ },
1697
+ "outputs": [],
1698
+ "source": [
1699
+ "merged_df.to_csv('merged_weather_data.csv')"
1700
+ ]
1701
+ },
1702
+ {
1703
+ "cell_type": "code",
1704
+ "execution_count": null,
1705
+ "metadata": {
1706
+ "id": "x_8saTUjGj-e"
1707
+ },
1708
+ "outputs": [],
1709
+ "source": []
1710
+ }
1711
+ ],
1712
+ "metadata": {
1713
+ "colab": {
1714
+ "provenance": []
1715
+ },
1716
+ "kernelspec": {
1717
+ "display_name": "Python 3",
1718
+ "language": "python",
1719
+ "name": "python3"
1720
+ },
1721
+ "language_info": {
1722
+ "codemirror_mode": {
1723
+ "name": "ipython",
1724
+ "version": 3
1725
+ },
1726
+ "file_extension": ".py",
1727
+ "mimetype": "text/x-python",
1728
+ "name": "python",
1729
+ "nbconvert_exporter": "python",
1730
+ "pygments_lexer": "ipython3",
1731
+ "version": "3.11.0"
1732
+ }
1733
+ },
1734
+ "nbformat": 4,
1735
+ "nbformat_minor": 1
1736
+ }