Skip to content

Commit 9e4c4b6

Browse files
committed
Added headings and fixed import/export paths for NYC time series notebook
1 parent 267d41d commit 9e4c4b6

File tree

1 file changed

+36
-16
lines changed

1 file changed

+36
-16
lines changed

NYC-notebooks/NYC-time-series-work.ipynb

+36-16
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"metadata": {},
3636
"outputs": [],
3737
"source": [
38-
"NYC = pd.read_pickle('./datasets/air-quality-reports/aggregates/NYC.pkl')"
38+
"NYC = pd.read_pickle('../datasets/air-quality-reports/aggregates/NYC/NYC.pkl')"
3939
]
4040
},
4141
{
@@ -197,14 +197,6 @@
197197
"predictions = test.copy(deep=True)"
198198
]
199199
},
200-
{
201-
"cell_type": "code",
202-
"execution_count": null,
203-
"id": "bce298b6-7219-4770-bc60-fcc0d36dc9cf",
204-
"metadata": {},
205-
"outputs": [],
206-
"source": []
207-
},
208200
{
209201
"cell_type": "code",
210202
"execution_count": 8,
@@ -238,6 +230,10 @@
238230
"execution_count": 9,
239231
"id": "afe217b1-04ad-447a-a7bf-0d1f9fa8ea92",
240232
"metadata": {
233+
"collapsed": true,
234+
"jupyter": {
235+
"outputs_hidden": true
236+
},
241237
"tags": []
242238
},
243239
"outputs": [
@@ -262,10 +258,10 @@
262258
" <th>Seasonal:</th> <td>Multiplicative</td> <th> AICC </th> <td>11052.040</td> \n",
263259
"</tr>\n",
264260
"<tr>\n",
265-
" <th>Seasonal Periods:</th> <td>365</td> <th> Date: </th> <td>Wed, 19 May 2021</td>\n",
261+
" <th>Seasonal Periods:</th> <td>365</td> <th> Date: </th> <td>Fri, 21 May 2021</td>\n",
266262
"</tr>\n",
267263
"<tr>\n",
268-
" <th>Box-Cox:</th> <td>False</td> <th> Time: </th> <td>10:21:59</td> \n",
264+
" <th>Box-Cox:</th> <td>False</td> <th> Time: </th> <td>12:02:51</td> \n",
269265
"</tr>\n",
270266
"<tr>\n",
271267
" <th>Box-Cox Coeff.:</th> <td>None</td> <th> </th> <td> </td> \n",
@@ -1397,8 +1393,8 @@
13971393
"Optimized: True AIC 10862.202\n",
13981394
"Trend: Multiplicative BIC 12895.349\n",
13991395
"Seasonal: Multiplicative AICC 11052.040\n",
1400-
"Seasonal Periods: 365 Date: Wed, 19 May 2021\n",
1401-
"Box-Cox: False Time: 10:21:59\n",
1396+
"Seasonal Periods: 365 Date: Fri, 21 May 2021\n",
1397+
"Box-Cox: False Time: 12:02:51\n",
14021398
"Box-Cox Coeff.: None \n",
14031399
"==================================================================================\n",
14041400
" coeff code optimized \n",
@@ -1861,6 +1857,14 @@
18611857
"predictions['hw']"
18621858
]
18631859
},
1860+
{
1861+
"cell_type": "markdown",
1862+
"id": "b439e2ed-c201-4139-bc18-67bb0aceeee8",
1863+
"metadata": {},
1864+
"source": [
1865+
"### Visualize the predictions"
1866+
]
1867+
},
18641868
{
18651869
"cell_type": "code",
18661870
"execution_count": 34,
@@ -1897,6 +1901,14 @@
18971901
"## Gonna try weekly now"
18981902
]
18991903
},
1904+
{
1905+
"cell_type": "markdown",
1906+
"id": "ef7d2d94-91da-4cb5-99b3-1673e411425d",
1907+
"metadata": {},
1908+
"source": [
1909+
"### Resample the data to be weekly"
1910+
]
1911+
},
19001912
{
19011913
"cell_type": "code",
19021914
"execution_count": 14,
@@ -2340,6 +2352,14 @@
23402352
"weekly_preds['hw'] = hw2.forecast(len(test_wk))"
23412353
]
23422354
},
2355+
{
2356+
"cell_type": "markdown",
2357+
"id": "7366bf80-357e-43f0-8490-367080cf5ac2",
2358+
"metadata": {},
2359+
"source": [
2360+
"### Visualize the weekly predictions"
2361+
]
2362+
},
23432363
{
23442364
"cell_type": "code",
23452365
"execution_count": 37,
@@ -2802,7 +2822,7 @@
28022822
"metadata": {},
28032823
"outputs": [],
28042824
"source": [
2805-
"predictions.to_csv('./datasets/air-quality-reports/aggregates/nyc_daily_predictions.csv')"
2825+
"predictions.to_csv('../predictions/nyc_daily_predictions.csv')"
28062826
]
28072827
},
28082828
{
@@ -2812,7 +2832,7 @@
28122832
"metadata": {},
28132833
"outputs": [],
28142834
"source": [
2815-
"weekly_preds.to_csv('./datasets/air-quality-reports/aggregates/nyc_weekly_predictions.csv')"
2835+
"weekly_preds.to_csv('../predictions/nyc_weekly_predictions.csv')"
28162836
]
28172837
},
28182838
{
@@ -3074,7 +3094,7 @@
30743094
"metadata": {},
30753095
"outputs": [],
30763096
"source": [
3077-
"weekly.to_csv('./datasets/air-quality-reports/aggregates/nyc_weekly_aqi.csv')"
3097+
"weekly.to_csv('../datasets/air-quality-reports/aggregates/NYC/nyc_weekly_aqi.csv')"
30783098
]
30793099
},
30803100
{

0 commit comments

Comments
 (0)