Spaces:
Sleeping
Sleeping
File size: 18,543 Bytes
f226f2c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 |
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd \n",
"from datetime import datetime \n",
"import matplotlib.pyplot as plt\n",
"import seaborn as sns\n"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>date</th>\n",
" <th>zone_017_hw_valve</th>\n",
" <th>rtu_004_sat_sp_tn</th>\n",
" <th>zone_017_temp</th>\n",
" <th>zone_017_fan_spd</th>\n",
" <th>rtu_004_fltrd_sa_flow_tn</th>\n",
" <th>rtu_004_sa_temp</th>\n",
" <th>rtu_004_pa_static_stpt_tn</th>\n",
" <th>rtu_004_oa_flow_tn</th>\n",
" <th>rtu_004_oadmpr_pct</th>\n",
" <th>...</th>\n",
" <th>zone_017_heating_sp</th>\n",
" <th>hvac_S</th>\n",
" <th>hp_hws_temp</th>\n",
" <th>aru_001_cwr_temp</th>\n",
" <th>aru_001_cws_fr_gpm</th>\n",
" <th>aru_001_cws_temp</th>\n",
" <th>aru_001_hwr_temp</th>\n",
" <th>aru_001_hws_fr_gpm</th>\n",
" <th>aru_001_hws_temp</th>\n",
" <th>hp_hws_temp</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>2018-01-01 00:00:00</td>\n",
" <td>100.0</td>\n",
" <td>69.0</td>\n",
" <td>66.7</td>\n",
" <td>20.0</td>\n",
" <td>9265.604</td>\n",
" <td>66.1</td>\n",
" <td>0.06</td>\n",
" <td>0.000000</td>\n",
" <td>28.0</td>\n",
" <td>...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>75.3</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>75.3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>2018-01-01 00:01:00</td>\n",
" <td>100.0</td>\n",
" <td>69.0</td>\n",
" <td>66.7</td>\n",
" <td>20.0</td>\n",
" <td>9265.604</td>\n",
" <td>66.0</td>\n",
" <td>0.06</td>\n",
" <td>6572.099162</td>\n",
" <td>28.0</td>\n",
" <td>...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>75.3</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>75.3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>2018-01-01 00:02:00</td>\n",
" <td>100.0</td>\n",
" <td>69.0</td>\n",
" <td>66.7</td>\n",
" <td>20.0</td>\n",
" <td>9708.240</td>\n",
" <td>66.1</td>\n",
" <td>0.06</td>\n",
" <td>7628.832542</td>\n",
" <td>28.0</td>\n",
" <td>...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>75.3</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>75.3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>2018-01-01 00:03:00</td>\n",
" <td>100.0</td>\n",
" <td>69.0</td>\n",
" <td>66.7</td>\n",
" <td>20.0</td>\n",
" <td>9611.638</td>\n",
" <td>66.1</td>\n",
" <td>0.06</td>\n",
" <td>7710.294617</td>\n",
" <td>28.0</td>\n",
" <td>...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>75.3</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>75.3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>2018-01-01 00:04:00</td>\n",
" <td>100.0</td>\n",
" <td>69.0</td>\n",
" <td>66.7</td>\n",
" <td>20.0</td>\n",
" <td>9215.110</td>\n",
" <td>66.0</td>\n",
" <td>0.06</td>\n",
" <td>7139.184090</td>\n",
" <td>28.0</td>\n",
" <td>...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>75.3</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>75.3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2072149</th>\n",
" <td>2020-12-31 23:58:00</td>\n",
" <td>100.0</td>\n",
" <td>68.0</td>\n",
" <td>63.5</td>\n",
" <td>40.0</td>\n",
" <td>18884.834</td>\n",
" <td>64.4</td>\n",
" <td>0.06</td>\n",
" <td>2938.320000</td>\n",
" <td>23.4</td>\n",
" <td>...</td>\n",
" <td>71.0</td>\n",
" <td>23.145000</td>\n",
" <td>123.8</td>\n",
" <td>56.25</td>\n",
" <td>54.71</td>\n",
" <td>56.4</td>\n",
" <td>123.42</td>\n",
" <td>61.6</td>\n",
" <td>122.36</td>\n",
" <td>123.8</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2072150</th>\n",
" <td>2020-12-31 23:58:00</td>\n",
" <td>100.0</td>\n",
" <td>68.0</td>\n",
" <td>63.5</td>\n",
" <td>40.0</td>\n",
" <td>18884.834</td>\n",
" <td>64.4</td>\n",
" <td>0.06</td>\n",
" <td>2938.320000</td>\n",
" <td>23.4</td>\n",
" <td>...</td>\n",
" <td>71.0</td>\n",
" <td>23.145000</td>\n",
" <td>123.8</td>\n",
" <td>56.25</td>\n",
" <td>54.71</td>\n",
" <td>56.4</td>\n",
" <td>123.42</td>\n",
" <td>61.6</td>\n",
" <td>122.36</td>\n",
" <td>123.8</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2072151</th>\n",
" <td>2020-12-31 23:59:00</td>\n",
" <td>100.0</td>\n",
" <td>68.0</td>\n",
" <td>63.5</td>\n",
" <td>40.0</td>\n",
" <td>19345.508</td>\n",
" <td>64.3</td>\n",
" <td>0.06</td>\n",
" <td>3154.390000</td>\n",
" <td>23.4</td>\n",
" <td>...</td>\n",
" <td>71.0</td>\n",
" <td>23.145000</td>\n",
" <td>123.8</td>\n",
" <td>56.25</td>\n",
" <td>54.71</td>\n",
" <td>56.4</td>\n",
" <td>123.42</td>\n",
" <td>61.6</td>\n",
" <td>122.36</td>\n",
" <td>123.8</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2072152</th>\n",
" <td>2020-12-31 23:59:00</td>\n",
" <td>100.0</td>\n",
" <td>68.0</td>\n",
" <td>63.5</td>\n",
" <td>40.0</td>\n",
" <td>19345.508</td>\n",
" <td>64.3</td>\n",
" <td>0.06</td>\n",
" <td>3154.390000</td>\n",
" <td>23.4</td>\n",
" <td>...</td>\n",
" <td>71.0</td>\n",
" <td>23.145000</td>\n",
" <td>123.8</td>\n",
" <td>56.25</td>\n",
" <td>54.71</td>\n",
" <td>56.4</td>\n",
" <td>123.42</td>\n",
" <td>61.6</td>\n",
" <td>122.36</td>\n",
" <td>123.8</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2072153</th>\n",
" <td>2021-01-01 00:00:00</td>\n",
" <td>100.0</td>\n",
" <td>68.0</td>\n",
" <td>63.5</td>\n",
" <td>40.0</td>\n",
" <td>18650.232</td>\n",
" <td>64.1</td>\n",
" <td>0.06</td>\n",
" <td>3076.270000</td>\n",
" <td>22.9</td>\n",
" <td>...</td>\n",
" <td>71.0</td>\n",
" <td>23.788947</td>\n",
" <td>123.8</td>\n",
" <td>56.25</td>\n",
" <td>54.71</td>\n",
" <td>56.4</td>\n",
" <td>123.42</td>\n",
" <td>61.6</td>\n",
" <td>122.36</td>\n",
" <td>123.8</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>2072154 rows × 29 columns</p>\n",
"</div>"
],
"text/plain": [
" date zone_017_hw_valve rtu_004_sat_sp_tn \\\n",
"0 2018-01-01 00:00:00 100.0 69.0 \n",
"1 2018-01-01 00:01:00 100.0 69.0 \n",
"2 2018-01-01 00:02:00 100.0 69.0 \n",
"3 2018-01-01 00:03:00 100.0 69.0 \n",
"4 2018-01-01 00:04:00 100.0 69.0 \n",
"... ... ... ... \n",
"2072149 2020-12-31 23:58:00 100.0 68.0 \n",
"2072150 2020-12-31 23:58:00 100.0 68.0 \n",
"2072151 2020-12-31 23:59:00 100.0 68.0 \n",
"2072152 2020-12-31 23:59:00 100.0 68.0 \n",
"2072153 2021-01-01 00:00:00 100.0 68.0 \n",
"\n",
" zone_017_temp zone_017_fan_spd rtu_004_fltrd_sa_flow_tn \\\n",
"0 66.7 20.0 9265.604 \n",
"1 66.7 20.0 9265.604 \n",
"2 66.7 20.0 9708.240 \n",
"3 66.7 20.0 9611.638 \n",
"4 66.7 20.0 9215.110 \n",
"... ... ... ... \n",
"2072149 63.5 40.0 18884.834 \n",
"2072150 63.5 40.0 18884.834 \n",
"2072151 63.5 40.0 19345.508 \n",
"2072152 63.5 40.0 19345.508 \n",
"2072153 63.5 40.0 18650.232 \n",
"\n",
" rtu_004_sa_temp rtu_004_pa_static_stpt_tn rtu_004_oa_flow_tn \\\n",
"0 66.1 0.06 0.000000 \n",
"1 66.0 0.06 6572.099162 \n",
"2 66.1 0.06 7628.832542 \n",
"3 66.1 0.06 7710.294617 \n",
"4 66.0 0.06 7139.184090 \n",
"... ... ... ... \n",
"2072149 64.4 0.06 2938.320000 \n",
"2072150 64.4 0.06 2938.320000 \n",
"2072151 64.3 0.06 3154.390000 \n",
"2072152 64.3 0.06 3154.390000 \n",
"2072153 64.1 0.06 3076.270000 \n",
"\n",
" rtu_004_oadmpr_pct ... zone_017_heating_sp hvac_S hp_hws_temp \\\n",
"0 28.0 ... NaN NaN 75.3 \n",
"1 28.0 ... NaN NaN 75.3 \n",
"2 28.0 ... NaN NaN 75.3 \n",
"3 28.0 ... NaN NaN 75.3 \n",
"4 28.0 ... NaN NaN 75.3 \n",
"... ... ... ... ... ... \n",
"2072149 23.4 ... 71.0 23.145000 123.8 \n",
"2072150 23.4 ... 71.0 23.145000 123.8 \n",
"2072151 23.4 ... 71.0 23.145000 123.8 \n",
"2072152 23.4 ... 71.0 23.145000 123.8 \n",
"2072153 22.9 ... 71.0 23.788947 123.8 \n",
"\n",
" aru_001_cwr_temp aru_001_cws_fr_gpm aru_001_cws_temp \\\n",
"0 NaN NaN NaN \n",
"1 NaN NaN NaN \n",
"2 NaN NaN NaN \n",
"3 NaN NaN NaN \n",
"4 NaN NaN NaN \n",
"... ... ... ... \n",
"2072149 56.25 54.71 56.4 \n",
"2072150 56.25 54.71 56.4 \n",
"2072151 56.25 54.71 56.4 \n",
"2072152 56.25 54.71 56.4 \n",
"2072153 56.25 54.71 56.4 \n",
"\n",
" aru_001_hwr_temp aru_001_hws_fr_gpm aru_001_hws_temp hp_hws_temp \n",
"0 NaN NaN NaN 75.3 \n",
"1 NaN NaN NaN 75.3 \n",
"2 NaN NaN NaN 75.3 \n",
"3 NaN NaN NaN 75.3 \n",
"4 NaN NaN NaN 75.3 \n",
"... ... ... ... ... \n",
"2072149 123.42 61.6 122.36 123.8 \n",
"2072150 123.42 61.6 122.36 123.8 \n",
"2072151 123.42 61.6 122.36 123.8 \n",
"2072152 123.42 61.6 122.36 123.8 \n",
"2072153 123.42 61.6 122.36 123.8 \n",
"\n",
"[2072154 rows x 29 columns]"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"merged = pd.read_csv(r'data/long_merge.csv')\n",
"\n",
"zone = \"17\"\n",
"\n",
"if zone in [\"36\", \"37\", \"38\", \"39\", \"40\", \"41\", \"42\", \"64\", \"65\", \"66\", \"67\", \"68\", \"69\", \"70\"]:\n",
" rtu = \"rtu_001\"\n",
" wing = \"hvac_N\"\n",
"elif zone in [\"18\", \"25\", \"26\", \"45\", \"48\", \"55\", \"56\", \"61\"]:\n",
" rtu = \"rtu_003\"\n",
" wing = \"hvac_S\"\n",
"elif zone in [\"16\", \"17\", \"21\", \"22\", \"23\", \"24\", \"46\", \"47\", \"51\", \"52\", \"53\", \"54\"]:\n",
" rtu = \"rtu_004\"\n",
" wing = \"hvac_S\"\n",
"else:\n",
" rtu = \"rtu_002\"\n",
" wing = \"hvac_N\"\n",
"#merged is the dataframe\n",
"sorted = merged[[\"date\"]+[col for col in merged.columns if zone in col or rtu in col or wing in col]+[\"hp_hws_temp\", \"aru_001_cwr_temp\" , \"aru_001_cws_fr_gpm\" ,\"aru_001_cws_temp\",\"aru_001_hwr_temp\" ,\"aru_001_hws_fr_gpm\" ,\"aru_001_hws_temp\",\"hp_hws_temp\"]]\n",
"sorted"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "base",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.8"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
|