ibnummuhammad commited on
Commit
a39f8ea
1 Parent(s): 2c0c0ca

Add datetime filter for fred data

Browse files
Files changed (1) hide show
  1. coal-price-forecast.ipynb +1225 -11
coal-price-forecast.ipynb CHANGED
@@ -214,20 +214,1234 @@
214
  },
215
  {
216
  "cell_type": "code",
217
- "execution_count": null,
218
  "metadata": {},
219
- "outputs": [],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
220
  "source": [
221
  "y = \"newcastle\"\n",
222
- "fig = px.line(df_coal, x=\"datetime\", y=y, labels={\"Month\": \"Date\"})"
223
- ]
224
- },
225
- {
226
- "cell_type": "code",
227
- "execution_count": null,
228
- "metadata": {},
229
- "outputs": [],
230
- "source": [
231
  "fig.update_layout(\n",
232
  " template=\"simple_white\",\n",
233
  " font=dict(size=18),\n",
 
214
  },
215
  {
216
  "cell_type": "code",
217
+ "execution_count": 6,
218
  "metadata": {},
219
+ "outputs": [
220
+ {
221
+ "data": {
222
+ "application/vnd.plotly.v1+json": {
223
+ "config": {
224
+ "plotlyServerURL": "https://plot.ly"
225
+ },
226
+ "data": [
227
+ {
228
+ "hovertemplate": "datetime=%{x}<br>newcastle=%{y}<extra></extra>",
229
+ "legendgroup": "",
230
+ "line": {
231
+ "color": "#636efa",
232
+ "dash": "solid"
233
+ },
234
+ "marker": {
235
+ "symbol": "circle"
236
+ },
237
+ "mode": "lines",
238
+ "name": "",
239
+ "orientation": "v",
240
+ "showlegend": false,
241
+ "type": "scatter",
242
+ "x": [
243
+ "2023-12-01T00:00:00",
244
+ "2023-11-01T00:00:00",
245
+ "2023-10-01T00:00:00",
246
+ "2023-09-01T00:00:00",
247
+ "2023-08-01T00:00:00",
248
+ "2023-07-01T00:00:00",
249
+ "2023-06-01T00:00:00",
250
+ "2023-05-01T00:00:00",
251
+ "2023-04-01T00:00:00",
252
+ "2023-03-01T00:00:00",
253
+ "2023-02-01T00:00:00",
254
+ "2023-01-01T00:00:00",
255
+ "2022-12-01T00:00:00",
256
+ "2022-11-01T00:00:00",
257
+ "2022-10-01T00:00:00",
258
+ "2022-09-01T00:00:00",
259
+ "2022-08-01T00:00:00",
260
+ "2022-07-01T00:00:00",
261
+ "2022-06-01T00:00:00",
262
+ "2022-05-01T00:00:00",
263
+ "2022-04-01T00:00:00",
264
+ "2022-03-01T00:00:00",
265
+ "2022-02-01T00:00:00",
266
+ "2022-01-01T00:00:00",
267
+ "2021-12-01T00:00:00",
268
+ "2021-11-01T00:00:00",
269
+ "2021-10-01T00:00:00",
270
+ "2021-09-01T00:00:00",
271
+ "2021-08-01T00:00:00",
272
+ "2021-07-01T00:00:00",
273
+ "2021-06-01T00:00:00",
274
+ "2021-05-01T00:00:00",
275
+ "2021-04-01T00:00:00",
276
+ "2021-03-01T00:00:00",
277
+ "2021-02-01T00:00:00",
278
+ "2021-01-01T00:00:00",
279
+ "2020-12-01T00:00:00",
280
+ "2020-11-01T00:00:00",
281
+ "2020-10-01T00:00:00",
282
+ "2020-09-01T00:00:00",
283
+ "2020-08-01T00:00:00",
284
+ "2020-07-01T00:00:00",
285
+ "2020-06-01T00:00:00",
286
+ "2020-05-01T00:00:00",
287
+ "2020-04-01T00:00:00",
288
+ "2020-03-01T00:00:00",
289
+ "2020-02-01T00:00:00",
290
+ "2020-01-01T00:00:00",
291
+ "2019-12-01T00:00:00",
292
+ "2019-11-01T00:00:00",
293
+ "2019-10-01T00:00:00",
294
+ "2019-09-01T00:00:00",
295
+ "2019-08-01T00:00:00",
296
+ "2019-07-01T00:00:00",
297
+ "2019-06-01T00:00:00",
298
+ "2019-05-01T00:00:00",
299
+ "2019-04-01T00:00:00",
300
+ "2019-03-01T00:00:00",
301
+ "2019-02-01T00:00:00",
302
+ "2019-01-01T00:00:00",
303
+ "2018-12-01T00:00:00",
304
+ "2018-11-01T00:00:00",
305
+ "2018-10-01T00:00:00",
306
+ "2018-09-01T00:00:00",
307
+ "2018-08-01T00:00:00",
308
+ "2018-07-01T00:00:00",
309
+ "2018-06-01T00:00:00",
310
+ "2018-05-01T00:00:00",
311
+ "2018-04-01T00:00:00",
312
+ "2018-03-01T00:00:00",
313
+ "2018-02-01T00:00:00",
314
+ "2018-01-01T00:00:00",
315
+ "2017-12-01T00:00:00",
316
+ "2017-11-01T00:00:00",
317
+ "2017-10-01T00:00:00",
318
+ "2017-09-01T00:00:00",
319
+ "2017-08-01T00:00:00",
320
+ "2017-07-01T00:00:00",
321
+ "2017-06-01T00:00:00",
322
+ "2017-05-01T00:00:00",
323
+ "2017-04-01T00:00:00",
324
+ "2017-03-01T00:00:00",
325
+ "2017-02-01T00:00:00",
326
+ "2017-01-01T00:00:00",
327
+ "2016-12-01T00:00:00",
328
+ "2016-11-01T00:00:00",
329
+ "2016-10-01T00:00:00",
330
+ "2016-09-01T00:00:00",
331
+ "2016-08-01T00:00:00",
332
+ "2016-07-01T00:00:00",
333
+ "2016-06-01T00:00:00",
334
+ "2016-05-01T00:00:00",
335
+ "2016-04-01T00:00:00",
336
+ "2016-03-01T00:00:00",
337
+ "2016-02-01T00:00:00",
338
+ "2016-01-01T00:00:00",
339
+ "2015-12-01T00:00:00",
340
+ "2015-11-01T00:00:00",
341
+ "2015-10-01T00:00:00",
342
+ "2015-09-01T00:00:00",
343
+ "2015-08-01T00:00:00",
344
+ "2015-07-01T00:00:00",
345
+ "2015-06-01T00:00:00",
346
+ "2015-05-01T00:00:00",
347
+ "2015-04-01T00:00:00",
348
+ "2015-03-01T00:00:00",
349
+ "2015-02-01T00:00:00",
350
+ "2015-01-01T00:00:00",
351
+ "2014-12-01T00:00:00",
352
+ "2014-11-01T00:00:00",
353
+ "2014-10-01T00:00:00",
354
+ "2014-09-01T00:00:00",
355
+ "2014-08-01T00:00:00",
356
+ "2014-07-01T00:00:00",
357
+ "2014-06-01T00:00:00",
358
+ "2014-05-01T00:00:00",
359
+ "2014-04-01T00:00:00",
360
+ "2014-03-01T00:00:00",
361
+ "2014-02-01T00:00:00",
362
+ "2014-01-01T00:00:00",
363
+ "2013-12-01T00:00:00",
364
+ "2013-11-01T00:00:00",
365
+ "2013-10-01T00:00:00",
366
+ "2013-09-01T00:00:00",
367
+ "2013-08-01T00:00:00",
368
+ "2013-07-01T00:00:00",
369
+ "2013-06-01T00:00:00",
370
+ "2013-05-01T00:00:00",
371
+ "2013-04-01T00:00:00",
372
+ "2013-03-01T00:00:00",
373
+ "2013-02-01T00:00:00",
374
+ "2013-01-01T00:00:00",
375
+ "2012-12-01T00:00:00",
376
+ "2012-11-01T00:00:00",
377
+ "2012-10-01T00:00:00",
378
+ "2012-09-01T00:00:00",
379
+ "2012-08-01T00:00:00",
380
+ "2012-07-01T00:00:00",
381
+ "2012-06-01T00:00:00",
382
+ "2012-05-01T00:00:00",
383
+ "2012-04-01T00:00:00",
384
+ "2012-03-01T00:00:00",
385
+ "2012-02-01T00:00:00",
386
+ "2012-01-01T00:00:00",
387
+ "2011-12-01T00:00:00"
388
+ ],
389
+ "xaxis": "x",
390
+ "y": [
391
+ 146.25,
392
+ 132.15,
393
+ 121.1,
394
+ 160.01,
395
+ 156,
396
+ 137.3,
397
+ 128.05,
398
+ 135,
399
+ 189.7,
400
+ 177.25,
401
+ 192.85,
402
+ 251.75,
403
+ 404.15,
404
+ 398.5,
405
+ 356.3,
406
+ 433.7,
407
+ 425,
408
+ 407.9,
409
+ 385.95,
410
+ 427,
411
+ 326.6,
412
+ 259,
413
+ 274.5,
414
+ 222.75,
415
+ 169.6,
416
+ 152,
417
+ 223.45,
418
+ 218,
419
+ 174.25,
420
+ 149.75,
421
+ 134.7,
422
+ 118.9,
423
+ 93.3,
424
+ 96.25,
425
+ 85.1,
426
+ 86.2,
427
+ 80.5,
428
+ 70.3,
429
+ 58.2,
430
+ 58.6,
431
+ 51.95,
432
+ 51.95,
433
+ 52.15,
434
+ 52,
435
+ 52.35,
436
+ 67.85,
437
+ 67.4,
438
+ 68.5,
439
+ 67.7,
440
+ 67.85,
441
+ 66.9,
442
+ 70.05,
443
+ 65.75,
444
+ 69.45,
445
+ 70.9,
446
+ 83.4,
447
+ 87.3,
448
+ 92.75,
449
+ 96.05,
450
+ 99,
451
+ 102.05,
452
+ 101.7,
453
+ 105.2,
454
+ 113.85,
455
+ 118,
456
+ 117.55,
457
+ 114.4,
458
+ 110.15,
459
+ 99.4,
460
+ 96.4,
461
+ 104.25,
462
+ 104.35,
463
+ 100.8,
464
+ 96.8,
465
+ 99.9,
466
+ 97.25,
467
+ 95.3,
468
+ 93.2,
469
+ 81,
470
+ 73.45,
471
+ 83.55,
472
+ 80.75,
473
+ 83.45,
474
+ 83,
475
+ 88.4,
476
+ 87.45,
477
+ 108.6,
478
+ 72.2,
479
+ 68.75,
480
+ 61.15,
481
+ 56.95,
482
+ 53.5,
483
+ 50.75,
484
+ 51.1,
485
+ 50.5,
486
+ 48.8,
487
+ 50.6,
488
+ 53.55,
489
+ 53.05,
490
+ 53.85,
491
+ 58.5,
492
+ 60.3,
493
+ 60.8,
494
+ 60.05,
495
+ 62.05,
496
+ 56.8,
497
+ 71.05,
498
+ 62.45,
499
+ 62.3,
500
+ 63.45,
501
+ 64.3,
502
+ 64.65,
503
+ 69.25,
504
+ 68.95,
505
+ 71.1,
506
+ 73.9,
507
+ 73.35,
508
+ 74.55,
509
+ 77.55,
510
+ 82.35,
511
+ 87.25,
512
+ 84.55,
513
+ 84.15,
514
+ 79.15,
515
+ 78.55,
516
+ 77.05,
517
+ 83,
518
+ 87.7,
519
+ 87,
520
+ 90.65,
521
+ 94.25,
522
+ 95.2,
523
+ 93.75,
524
+ 85.9,
525
+ 83.6,
526
+ 89.5,
527
+ 91.75,
528
+ 90.15,
529
+ 88.4,
530
+ 91.45,
531
+ 100.75,
532
+ 107,
533
+ 112.1,
534
+ 117.45,
535
+ 112.25
536
+ ],
537
+ "yaxis": "y"
538
+ }
539
+ ],
540
+ "layout": {
541
+ "font": {
542
+ "size": 18
543
+ },
544
+ "height": 400,
545
+ "legend": {
546
+ "tracegroupgap": 0
547
+ },
548
+ "margin": {
549
+ "t": 60
550
+ },
551
+ "template": {
552
+ "data": {
553
+ "bar": [
554
+ {
555
+ "error_x": {
556
+ "color": "rgb(36,36,36)"
557
+ },
558
+ "error_y": {
559
+ "color": "rgb(36,36,36)"
560
+ },
561
+ "marker": {
562
+ "line": {
563
+ "color": "white",
564
+ "width": 0.5
565
+ },
566
+ "pattern": {
567
+ "fillmode": "overlay",
568
+ "size": 10,
569
+ "solidity": 0.2
570
+ }
571
+ },
572
+ "type": "bar"
573
+ }
574
+ ],
575
+ "barpolar": [
576
+ {
577
+ "marker": {
578
+ "line": {
579
+ "color": "white",
580
+ "width": 0.5
581
+ },
582
+ "pattern": {
583
+ "fillmode": "overlay",
584
+ "size": 10,
585
+ "solidity": 0.2
586
+ }
587
+ },
588
+ "type": "barpolar"
589
+ }
590
+ ],
591
+ "carpet": [
592
+ {
593
+ "aaxis": {
594
+ "endlinecolor": "rgb(36,36,36)",
595
+ "gridcolor": "white",
596
+ "linecolor": "white",
597
+ "minorgridcolor": "white",
598
+ "startlinecolor": "rgb(36,36,36)"
599
+ },
600
+ "baxis": {
601
+ "endlinecolor": "rgb(36,36,36)",
602
+ "gridcolor": "white",
603
+ "linecolor": "white",
604
+ "minorgridcolor": "white",
605
+ "startlinecolor": "rgb(36,36,36)"
606
+ },
607
+ "type": "carpet"
608
+ }
609
+ ],
610
+ "choropleth": [
611
+ {
612
+ "colorbar": {
613
+ "outlinewidth": 1,
614
+ "tickcolor": "rgb(36,36,36)",
615
+ "ticks": "outside"
616
+ },
617
+ "type": "choropleth"
618
+ }
619
+ ],
620
+ "contour": [
621
+ {
622
+ "colorbar": {
623
+ "outlinewidth": 1,
624
+ "tickcolor": "rgb(36,36,36)",
625
+ "ticks": "outside"
626
+ },
627
+ "colorscale": [
628
+ [
629
+ 0,
630
+ "#440154"
631
+ ],
632
+ [
633
+ 0.1111111111111111,
634
+ "#482878"
635
+ ],
636
+ [
637
+ 0.2222222222222222,
638
+ "#3e4989"
639
+ ],
640
+ [
641
+ 0.3333333333333333,
642
+ "#31688e"
643
+ ],
644
+ [
645
+ 0.4444444444444444,
646
+ "#26828e"
647
+ ],
648
+ [
649
+ 0.5555555555555556,
650
+ "#1f9e89"
651
+ ],
652
+ [
653
+ 0.6666666666666666,
654
+ "#35b779"
655
+ ],
656
+ [
657
+ 0.7777777777777778,
658
+ "#6ece58"
659
+ ],
660
+ [
661
+ 0.8888888888888888,
662
+ "#b5de2b"
663
+ ],
664
+ [
665
+ 1,
666
+ "#fde725"
667
+ ]
668
+ ],
669
+ "type": "contour"
670
+ }
671
+ ],
672
+ "contourcarpet": [
673
+ {
674
+ "colorbar": {
675
+ "outlinewidth": 1,
676
+ "tickcolor": "rgb(36,36,36)",
677
+ "ticks": "outside"
678
+ },
679
+ "type": "contourcarpet"
680
+ }
681
+ ],
682
+ "heatmap": [
683
+ {
684
+ "colorbar": {
685
+ "outlinewidth": 1,
686
+ "tickcolor": "rgb(36,36,36)",
687
+ "ticks": "outside"
688
+ },
689
+ "colorscale": [
690
+ [
691
+ 0,
692
+ "#440154"
693
+ ],
694
+ [
695
+ 0.1111111111111111,
696
+ "#482878"
697
+ ],
698
+ [
699
+ 0.2222222222222222,
700
+ "#3e4989"
701
+ ],
702
+ [
703
+ 0.3333333333333333,
704
+ "#31688e"
705
+ ],
706
+ [
707
+ 0.4444444444444444,
708
+ "#26828e"
709
+ ],
710
+ [
711
+ 0.5555555555555556,
712
+ "#1f9e89"
713
+ ],
714
+ [
715
+ 0.6666666666666666,
716
+ "#35b779"
717
+ ],
718
+ [
719
+ 0.7777777777777778,
720
+ "#6ece58"
721
+ ],
722
+ [
723
+ 0.8888888888888888,
724
+ "#b5de2b"
725
+ ],
726
+ [
727
+ 1,
728
+ "#fde725"
729
+ ]
730
+ ],
731
+ "type": "heatmap"
732
+ }
733
+ ],
734
+ "heatmapgl": [
735
+ {
736
+ "colorbar": {
737
+ "outlinewidth": 1,
738
+ "tickcolor": "rgb(36,36,36)",
739
+ "ticks": "outside"
740
+ },
741
+ "colorscale": [
742
+ [
743
+ 0,
744
+ "#440154"
745
+ ],
746
+ [
747
+ 0.1111111111111111,
748
+ "#482878"
749
+ ],
750
+ [
751
+ 0.2222222222222222,
752
+ "#3e4989"
753
+ ],
754
+ [
755
+ 0.3333333333333333,
756
+ "#31688e"
757
+ ],
758
+ [
759
+ 0.4444444444444444,
760
+ "#26828e"
761
+ ],
762
+ [
763
+ 0.5555555555555556,
764
+ "#1f9e89"
765
+ ],
766
+ [
767
+ 0.6666666666666666,
768
+ "#35b779"
769
+ ],
770
+ [
771
+ 0.7777777777777778,
772
+ "#6ece58"
773
+ ],
774
+ [
775
+ 0.8888888888888888,
776
+ "#b5de2b"
777
+ ],
778
+ [
779
+ 1,
780
+ "#fde725"
781
+ ]
782
+ ],
783
+ "type": "heatmapgl"
784
+ }
785
+ ],
786
+ "histogram": [
787
+ {
788
+ "marker": {
789
+ "line": {
790
+ "color": "white",
791
+ "width": 0.6
792
+ }
793
+ },
794
+ "type": "histogram"
795
+ }
796
+ ],
797
+ "histogram2d": [
798
+ {
799
+ "colorbar": {
800
+ "outlinewidth": 1,
801
+ "tickcolor": "rgb(36,36,36)",
802
+ "ticks": "outside"
803
+ },
804
+ "colorscale": [
805
+ [
806
+ 0,
807
+ "#440154"
808
+ ],
809
+ [
810
+ 0.1111111111111111,
811
+ "#482878"
812
+ ],
813
+ [
814
+ 0.2222222222222222,
815
+ "#3e4989"
816
+ ],
817
+ [
818
+ 0.3333333333333333,
819
+ "#31688e"
820
+ ],
821
+ [
822
+ 0.4444444444444444,
823
+ "#26828e"
824
+ ],
825
+ [
826
+ 0.5555555555555556,
827
+ "#1f9e89"
828
+ ],
829
+ [
830
+ 0.6666666666666666,
831
+ "#35b779"
832
+ ],
833
+ [
834
+ 0.7777777777777778,
835
+ "#6ece58"
836
+ ],
837
+ [
838
+ 0.8888888888888888,
839
+ "#b5de2b"
840
+ ],
841
+ [
842
+ 1,
843
+ "#fde725"
844
+ ]
845
+ ],
846
+ "type": "histogram2d"
847
+ }
848
+ ],
849
+ "histogram2dcontour": [
850
+ {
851
+ "colorbar": {
852
+ "outlinewidth": 1,
853
+ "tickcolor": "rgb(36,36,36)",
854
+ "ticks": "outside"
855
+ },
856
+ "colorscale": [
857
+ [
858
+ 0,
859
+ "#440154"
860
+ ],
861
+ [
862
+ 0.1111111111111111,
863
+ "#482878"
864
+ ],
865
+ [
866
+ 0.2222222222222222,
867
+ "#3e4989"
868
+ ],
869
+ [
870
+ 0.3333333333333333,
871
+ "#31688e"
872
+ ],
873
+ [
874
+ 0.4444444444444444,
875
+ "#26828e"
876
+ ],
877
+ [
878
+ 0.5555555555555556,
879
+ "#1f9e89"
880
+ ],
881
+ [
882
+ 0.6666666666666666,
883
+ "#35b779"
884
+ ],
885
+ [
886
+ 0.7777777777777778,
887
+ "#6ece58"
888
+ ],
889
+ [
890
+ 0.8888888888888888,
891
+ "#b5de2b"
892
+ ],
893
+ [
894
+ 1,
895
+ "#fde725"
896
+ ]
897
+ ],
898
+ "type": "histogram2dcontour"
899
+ }
900
+ ],
901
+ "mesh3d": [
902
+ {
903
+ "colorbar": {
904
+ "outlinewidth": 1,
905
+ "tickcolor": "rgb(36,36,36)",
906
+ "ticks": "outside"
907
+ },
908
+ "type": "mesh3d"
909
+ }
910
+ ],
911
+ "parcoords": [
912
+ {
913
+ "line": {
914
+ "colorbar": {
915
+ "outlinewidth": 1,
916
+ "tickcolor": "rgb(36,36,36)",
917
+ "ticks": "outside"
918
+ }
919
+ },
920
+ "type": "parcoords"
921
+ }
922
+ ],
923
+ "pie": [
924
+ {
925
+ "automargin": true,
926
+ "type": "pie"
927
+ }
928
+ ],
929
+ "scatter": [
930
+ {
931
+ "fillpattern": {
932
+ "fillmode": "overlay",
933
+ "size": 10,
934
+ "solidity": 0.2
935
+ },
936
+ "type": "scatter"
937
+ }
938
+ ],
939
+ "scatter3d": [
940
+ {
941
+ "line": {
942
+ "colorbar": {
943
+ "outlinewidth": 1,
944
+ "tickcolor": "rgb(36,36,36)",
945
+ "ticks": "outside"
946
+ }
947
+ },
948
+ "marker": {
949
+ "colorbar": {
950
+ "outlinewidth": 1,
951
+ "tickcolor": "rgb(36,36,36)",
952
+ "ticks": "outside"
953
+ }
954
+ },
955
+ "type": "scatter3d"
956
+ }
957
+ ],
958
+ "scattercarpet": [
959
+ {
960
+ "marker": {
961
+ "colorbar": {
962
+ "outlinewidth": 1,
963
+ "tickcolor": "rgb(36,36,36)",
964
+ "ticks": "outside"
965
+ }
966
+ },
967
+ "type": "scattercarpet"
968
+ }
969
+ ],
970
+ "scattergeo": [
971
+ {
972
+ "marker": {
973
+ "colorbar": {
974
+ "outlinewidth": 1,
975
+ "tickcolor": "rgb(36,36,36)",
976
+ "ticks": "outside"
977
+ }
978
+ },
979
+ "type": "scattergeo"
980
+ }
981
+ ],
982
+ "scattergl": [
983
+ {
984
+ "marker": {
985
+ "colorbar": {
986
+ "outlinewidth": 1,
987
+ "tickcolor": "rgb(36,36,36)",
988
+ "ticks": "outside"
989
+ }
990
+ },
991
+ "type": "scattergl"
992
+ }
993
+ ],
994
+ "scattermapbox": [
995
+ {
996
+ "marker": {
997
+ "colorbar": {
998
+ "outlinewidth": 1,
999
+ "tickcolor": "rgb(36,36,36)",
1000
+ "ticks": "outside"
1001
+ }
1002
+ },
1003
+ "type": "scattermapbox"
1004
+ }
1005
+ ],
1006
+ "scatterpolar": [
1007
+ {
1008
+ "marker": {
1009
+ "colorbar": {
1010
+ "outlinewidth": 1,
1011
+ "tickcolor": "rgb(36,36,36)",
1012
+ "ticks": "outside"
1013
+ }
1014
+ },
1015
+ "type": "scatterpolar"
1016
+ }
1017
+ ],
1018
+ "scatterpolargl": [
1019
+ {
1020
+ "marker": {
1021
+ "colorbar": {
1022
+ "outlinewidth": 1,
1023
+ "tickcolor": "rgb(36,36,36)",
1024
+ "ticks": "outside"
1025
+ }
1026
+ },
1027
+ "type": "scatterpolargl"
1028
+ }
1029
+ ],
1030
+ "scatterternary": [
1031
+ {
1032
+ "marker": {
1033
+ "colorbar": {
1034
+ "outlinewidth": 1,
1035
+ "tickcolor": "rgb(36,36,36)",
1036
+ "ticks": "outside"
1037
+ }
1038
+ },
1039
+ "type": "scatterternary"
1040
+ }
1041
+ ],
1042
+ "surface": [
1043
+ {
1044
+ "colorbar": {
1045
+ "outlinewidth": 1,
1046
+ "tickcolor": "rgb(36,36,36)",
1047
+ "ticks": "outside"
1048
+ },
1049
+ "colorscale": [
1050
+ [
1051
+ 0,
1052
+ "#440154"
1053
+ ],
1054
+ [
1055
+ 0.1111111111111111,
1056
+ "#482878"
1057
+ ],
1058
+ [
1059
+ 0.2222222222222222,
1060
+ "#3e4989"
1061
+ ],
1062
+ [
1063
+ 0.3333333333333333,
1064
+ "#31688e"
1065
+ ],
1066
+ [
1067
+ 0.4444444444444444,
1068
+ "#26828e"
1069
+ ],
1070
+ [
1071
+ 0.5555555555555556,
1072
+ "#1f9e89"
1073
+ ],
1074
+ [
1075
+ 0.6666666666666666,
1076
+ "#35b779"
1077
+ ],
1078
+ [
1079
+ 0.7777777777777778,
1080
+ "#6ece58"
1081
+ ],
1082
+ [
1083
+ 0.8888888888888888,
1084
+ "#b5de2b"
1085
+ ],
1086
+ [
1087
+ 1,
1088
+ "#fde725"
1089
+ ]
1090
+ ],
1091
+ "type": "surface"
1092
+ }
1093
+ ],
1094
+ "table": [
1095
+ {
1096
+ "cells": {
1097
+ "fill": {
1098
+ "color": "rgb(237,237,237)"
1099
+ },
1100
+ "line": {
1101
+ "color": "white"
1102
+ }
1103
+ },
1104
+ "header": {
1105
+ "fill": {
1106
+ "color": "rgb(217,217,217)"
1107
+ },
1108
+ "line": {
1109
+ "color": "white"
1110
+ }
1111
+ },
1112
+ "type": "table"
1113
+ }
1114
+ ]
1115
+ },
1116
+ "layout": {
1117
+ "annotationdefaults": {
1118
+ "arrowhead": 0,
1119
+ "arrowwidth": 1
1120
+ },
1121
+ "autotypenumbers": "strict",
1122
+ "coloraxis": {
1123
+ "colorbar": {
1124
+ "outlinewidth": 1,
1125
+ "tickcolor": "rgb(36,36,36)",
1126
+ "ticks": "outside"
1127
+ }
1128
+ },
1129
+ "colorscale": {
1130
+ "diverging": [
1131
+ [
1132
+ 0,
1133
+ "rgb(103,0,31)"
1134
+ ],
1135
+ [
1136
+ 0.1,
1137
+ "rgb(178,24,43)"
1138
+ ],
1139
+ [
1140
+ 0.2,
1141
+ "rgb(214,96,77)"
1142
+ ],
1143
+ [
1144
+ 0.3,
1145
+ "rgb(244,165,130)"
1146
+ ],
1147
+ [
1148
+ 0.4,
1149
+ "rgb(253,219,199)"
1150
+ ],
1151
+ [
1152
+ 0.5,
1153
+ "rgb(247,247,247)"
1154
+ ],
1155
+ [
1156
+ 0.6,
1157
+ "rgb(209,229,240)"
1158
+ ],
1159
+ [
1160
+ 0.7,
1161
+ "rgb(146,197,222)"
1162
+ ],
1163
+ [
1164
+ 0.8,
1165
+ "rgb(67,147,195)"
1166
+ ],
1167
+ [
1168
+ 0.9,
1169
+ "rgb(33,102,172)"
1170
+ ],
1171
+ [
1172
+ 1,
1173
+ "rgb(5,48,97)"
1174
+ ]
1175
+ ],
1176
+ "sequential": [
1177
+ [
1178
+ 0,
1179
+ "#440154"
1180
+ ],
1181
+ [
1182
+ 0.1111111111111111,
1183
+ "#482878"
1184
+ ],
1185
+ [
1186
+ 0.2222222222222222,
1187
+ "#3e4989"
1188
+ ],
1189
+ [
1190
+ 0.3333333333333333,
1191
+ "#31688e"
1192
+ ],
1193
+ [
1194
+ 0.4444444444444444,
1195
+ "#26828e"
1196
+ ],
1197
+ [
1198
+ 0.5555555555555556,
1199
+ "#1f9e89"
1200
+ ],
1201
+ [
1202
+ 0.6666666666666666,
1203
+ "#35b779"
1204
+ ],
1205
+ [
1206
+ 0.7777777777777778,
1207
+ "#6ece58"
1208
+ ],
1209
+ [
1210
+ 0.8888888888888888,
1211
+ "#b5de2b"
1212
+ ],
1213
+ [
1214
+ 1,
1215
+ "#fde725"
1216
+ ]
1217
+ ],
1218
+ "sequentialminus": [
1219
+ [
1220
+ 0,
1221
+ "#440154"
1222
+ ],
1223
+ [
1224
+ 0.1111111111111111,
1225
+ "#482878"
1226
+ ],
1227
+ [
1228
+ 0.2222222222222222,
1229
+ "#3e4989"
1230
+ ],
1231
+ [
1232
+ 0.3333333333333333,
1233
+ "#31688e"
1234
+ ],
1235
+ [
1236
+ 0.4444444444444444,
1237
+ "#26828e"
1238
+ ],
1239
+ [
1240
+ 0.5555555555555556,
1241
+ "#1f9e89"
1242
+ ],
1243
+ [
1244
+ 0.6666666666666666,
1245
+ "#35b779"
1246
+ ],
1247
+ [
1248
+ 0.7777777777777778,
1249
+ "#6ece58"
1250
+ ],
1251
+ [
1252
+ 0.8888888888888888,
1253
+ "#b5de2b"
1254
+ ],
1255
+ [
1256
+ 1,
1257
+ "#fde725"
1258
+ ]
1259
+ ]
1260
+ },
1261
+ "colorway": [
1262
+ "#1F77B4",
1263
+ "#FF7F0E",
1264
+ "#2CA02C",
1265
+ "#D62728",
1266
+ "#9467BD",
1267
+ "#8C564B",
1268
+ "#E377C2",
1269
+ "#7F7F7F",
1270
+ "#BCBD22",
1271
+ "#17BECF"
1272
+ ],
1273
+ "font": {
1274
+ "color": "rgb(36,36,36)"
1275
+ },
1276
+ "geo": {
1277
+ "bgcolor": "white",
1278
+ "lakecolor": "white",
1279
+ "landcolor": "white",
1280
+ "showlakes": true,
1281
+ "showland": true,
1282
+ "subunitcolor": "white"
1283
+ },
1284
+ "hoverlabel": {
1285
+ "align": "left"
1286
+ },
1287
+ "hovermode": "closest",
1288
+ "mapbox": {
1289
+ "style": "light"
1290
+ },
1291
+ "paper_bgcolor": "white",
1292
+ "plot_bgcolor": "white",
1293
+ "polar": {
1294
+ "angularaxis": {
1295
+ "gridcolor": "rgb(232,232,232)",
1296
+ "linecolor": "rgb(36,36,36)",
1297
+ "showgrid": false,
1298
+ "showline": true,
1299
+ "ticks": "outside"
1300
+ },
1301
+ "bgcolor": "white",
1302
+ "radialaxis": {
1303
+ "gridcolor": "rgb(232,232,232)",
1304
+ "linecolor": "rgb(36,36,36)",
1305
+ "showgrid": false,
1306
+ "showline": true,
1307
+ "ticks": "outside"
1308
+ }
1309
+ },
1310
+ "scene": {
1311
+ "xaxis": {
1312
+ "backgroundcolor": "white",
1313
+ "gridcolor": "rgb(232,232,232)",
1314
+ "gridwidth": 2,
1315
+ "linecolor": "rgb(36,36,36)",
1316
+ "showbackground": true,
1317
+ "showgrid": false,
1318
+ "showline": true,
1319
+ "ticks": "outside",
1320
+ "zeroline": false,
1321
+ "zerolinecolor": "rgb(36,36,36)"
1322
+ },
1323
+ "yaxis": {
1324
+ "backgroundcolor": "white",
1325
+ "gridcolor": "rgb(232,232,232)",
1326
+ "gridwidth": 2,
1327
+ "linecolor": "rgb(36,36,36)",
1328
+ "showbackground": true,
1329
+ "showgrid": false,
1330
+ "showline": true,
1331
+ "ticks": "outside",
1332
+ "zeroline": false,
1333
+ "zerolinecolor": "rgb(36,36,36)"
1334
+ },
1335
+ "zaxis": {
1336
+ "backgroundcolor": "white",
1337
+ "gridcolor": "rgb(232,232,232)",
1338
+ "gridwidth": 2,
1339
+ "linecolor": "rgb(36,36,36)",
1340
+ "showbackground": true,
1341
+ "showgrid": false,
1342
+ "showline": true,
1343
+ "ticks": "outside",
1344
+ "zeroline": false,
1345
+ "zerolinecolor": "rgb(36,36,36)"
1346
+ }
1347
+ },
1348
+ "shapedefaults": {
1349
+ "fillcolor": "black",
1350
+ "line": {
1351
+ "width": 0
1352
+ },
1353
+ "opacity": 0.3
1354
+ },
1355
+ "ternary": {
1356
+ "aaxis": {
1357
+ "gridcolor": "rgb(232,232,232)",
1358
+ "linecolor": "rgb(36,36,36)",
1359
+ "showgrid": false,
1360
+ "showline": true,
1361
+ "ticks": "outside"
1362
+ },
1363
+ "baxis": {
1364
+ "gridcolor": "rgb(232,232,232)",
1365
+ "linecolor": "rgb(36,36,36)",
1366
+ "showgrid": false,
1367
+ "showline": true,
1368
+ "ticks": "outside"
1369
+ },
1370
+ "bgcolor": "white",
1371
+ "caxis": {
1372
+ "gridcolor": "rgb(232,232,232)",
1373
+ "linecolor": "rgb(36,36,36)",
1374
+ "showgrid": false,
1375
+ "showline": true,
1376
+ "ticks": "outside"
1377
+ }
1378
+ },
1379
+ "title": {
1380
+ "x": 0.05
1381
+ },
1382
+ "xaxis": {
1383
+ "automargin": true,
1384
+ "gridcolor": "rgb(232,232,232)",
1385
+ "linecolor": "rgb(36,36,36)",
1386
+ "showgrid": false,
1387
+ "showline": true,
1388
+ "ticks": "outside",
1389
+ "title": {
1390
+ "standoff": 15
1391
+ },
1392
+ "zeroline": false,
1393
+ "zerolinecolor": "rgb(36,36,36)"
1394
+ },
1395
+ "yaxis": {
1396
+ "automargin": true,
1397
+ "gridcolor": "rgb(232,232,232)",
1398
+ "linecolor": "rgb(36,36,36)",
1399
+ "showgrid": false,
1400
+ "showline": true,
1401
+ "ticks": "outside",
1402
+ "title": {
1403
+ "standoff": 15
1404
+ },
1405
+ "zeroline": false,
1406
+ "zerolinecolor": "rgb(36,36,36)"
1407
+ }
1408
+ }
1409
+ },
1410
+ "title": {
1411
+ "text": "Coal Price",
1412
+ "x": 0.5
1413
+ },
1414
+ "width": 650,
1415
+ "xaxis": {
1416
+ "anchor": "y",
1417
+ "domain": [
1418
+ 0,
1419
+ 1
1420
+ ],
1421
+ "title": {
1422
+ "text": "datetime"
1423
+ }
1424
+ },
1425
+ "yaxis": {
1426
+ "anchor": "x",
1427
+ "domain": [
1428
+ 0,
1429
+ 1
1430
+ ],
1431
+ "title": {
1432
+ "text": "newcastle"
1433
+ }
1434
+ }
1435
+ }
1436
+ }
1437
+ },
1438
+ "metadata": {},
1439
+ "output_type": "display_data"
1440
+ }
1441
+ ],
1442
  "source": [
1443
  "y = \"newcastle\"\n",
1444
+ "fig = px.line(df[\"coal_price_data\"], x=\"datetime\", y=y, labels={\"Month\": \"Date\"})\n",
 
 
 
 
 
 
 
 
1445
  "fig.update_layout(\n",
1446
  " template=\"simple_white\",\n",
1447
  " font=dict(size=18),\n",