Skip to content

Instantly share code, notes, and snippets.

@adamgreenhall
Created October 25, 2011 22:00
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save adamgreenhall/1314483 to your computer and use it in GitHub Desktop.
Save adamgreenhall/1314483 to your computer and use it in GitHub Desktop.
d3 stacked layout with time axis
times prices status: base power: base status: peaker power: peaker power: wind load power: Ireland
2010-04-27 00:00:00 30.0 1.0 2197.0 -0.0 0.0 303 2500
2010-04-27 00:15:00 30.0 1.0 2178.0 1.0 0.0 311 2489
2010-04-27 00:30:00 30.0 1.0 2092.0 1.0 0.0 340 2432
2010-04-27 00:45:00 30.0 1.0 2012.0 1.0 0.0 360 2372
2010-04-27 01:00:00 30.0 1.0 1975.0 1.0 0.0 345 2320
2010-04-27 01:15:00 30.0 1.0 1918.0 1.0 0.0 348 2266
2010-04-27 01:30:00 30.0 1.0 1824.0 1.0 0.0 411 2235
2010-04-27 01:45:00 30.0 1.0 1804.0 1.0 0.0 405 2209
2010-04-27 02:00:00 30.0 1.0 1759.0 1.0 0.0 411 2170
2010-04-27 02:15:00 30.0 1.0 1734.0 1.0 0.0 417 2151
2010-04-27 02:30:00 30.0 1.0 1699.0 1.0 0.0 433 2132
2010-04-27 02:45:00 30.0 1.0 1665.0 1.0 0.0 445 2110
2010-04-27 03:00:00 30.0 1.0 1645.0 1.0 0.0 450 2095
2010-04-27 03:15:00 30.0 1.0 1658.0 1.0 0.0 411 2069
2010-04-27 03:30:00 30.0 1.0 1616.0 1.0 0.0 457 2073
2010-04-27 03:45:00 30.0 1.0 1563.0 1.0 0.0 471 2034
2010-04-27 04:00:00 30.0 1.0 1576.0 1.0 0.0 455 2031
2010-04-27 04:15:00 30.0 1.0 1561.0 1.0 0.0 498 2059
2010-04-27 04:30:00 30.0 1.0 1530.0 1.0 0.0 516 2046
2010-04-27 04:45:00 30.0 1.0 1530.0 1.0 0.0 524 2054
2010-04-27 05:00:00 30.0 1.0 1545.0 1.0 0.0 525 2070
2010-04-27 05:15:00 30.0 1.0 1550.0 1.0 0.0 522 2072
2010-04-27 05:30:00 30.0 1.0 1571.0 1.0 0.0 513 2084
2010-04-27 05:45:00 30.0 1.0 1620.0 1.0 0.0 500 2120
2010-04-27 06:00:00 30.0 1.0 1614.0 1.0 0.0 534 2148
2010-04-27 06:15:00 30.0 1.0 1613.0 1.0 0.0 615 2228
2010-04-27 06:30:00 30.0 1.0 1623.0 1.0 0.0 650 2273
2010-04-27 06:45:00 30.0 1.0 1705.0 1.0 0.0 662 2367
2010-04-27 07:00:00 30.0 1.0 1817.0 1.0 0.0 672 2489
2010-04-27 07:15:00 30.0 1.0 2035.0 1.0 0.0 657 2692
2010-04-27 07:30:00 30.0 1.0 2192.0 1.0 0.0 630 2822
2010-04-27 07:45:00 30.0 1.0 2361.0 1.0 0.0 598 2959
2010-04-27 08:00:00 30.0 1.0 2415.0 1.0 0.0 651 3066
2010-04-27 08:15:00 30.0 1.0 2514.0 -0.0 0.0 691 3205
2010-04-27 08:30:00 30.0 1.0 2557.0 -0.0 0.0 702 3259
2010-04-27 08:45:00 30.0 1.0 2619.0 -0.0 0.0 627 3246
2010-04-27 09:00:00 30.0 1.0 2609.0 -0.0 0.0 636 3245
2010-04-27 09:15:00 30.0 1.0 2622.0 -0.0 0.0 693 3315
2010-04-27 09:30:00 30.0 1.0 2635.0 -0.0 0.0 699 3334
2010-04-27 09:45:00 30.0 1.0 2645.0 -0.0 0.0 712 3357
2010-04-27 10:00:00 30.0 1.0 2628.0 -0.0 0.0 723 3351
2010-04-27 10:15:00 30.0 1.0 2575.0 -0.0 0.0 767 3342
2010-04-27 10:30:00 30.0 1.0 2567.0 -0.0 0.0 801 3368
2010-04-27 10:45:00 30.0 1.0 2592.0 -0.0 0.0 784 3376
2010-04-27 11:00:00 30.0 1.0 2577.0 -0.0 0.0 797 3374
2010-04-27 11:15:00 30.0 1.0 2548.0 -0.0 0.0 808 3356
2010-04-27 11:30:00 30.0 1.0 2550.0 -0.0 0.0 813 3363
2010-04-27 11:45:00 30.0 1.0 2540.0 -0.0 0.0 829 3369
2010-04-27 12:00:00 30.0 1.0 2579.0 -0.0 0.0 784 3363
2010-04-27 12:15:00 30.0 1.0 2616.0 -0.0 0.0 729 3345
2010-04-27 12:30:00 30.0 1.0 2613.0 -0.0 0.0 766 3379
2010-04-27 12:45:00 30.0 1.0 2628.0 -0.0 0.0 766 3394
2010-04-27 13:00:00 30.0 1.0 2607.0 1.0 0.0 771 3378
2010-04-27 13:15:00 30.0 1.0 2573.0 1.0 0.0 757 3330
2010-04-27 13:30:00 30.0 1.0 2520.0 1.0 0.0 782 3302
2010-04-27 13:45:00 30.0 1.0 2488.0 1.0 0.0 799 3287
2010-04-27 14:00:00 30.0 1.0 2498.0 1.0 0.0 757 3255
2010-04-27 14:15:00 30.0 1.0 2502.0 1.0 0.0 777 3279
2010-04-27 14:30:00 30.0 1.0 2493.0 1.0 0.0 788 3281
2010-04-27 14:45:00 30.0 1.0 2490.0 1.0 0.0 781 3271
2010-04-27 15:00:00 30.0 1.0 2466.0 1.0 0.0 840 3306
2010-04-27 15:15:00 30.0 1.0 2503.0 -0.0 0.0 814 3317
2010-04-27 15:30:00 30.0 1.0 2514.0 -0.0 0.0 827 3341
2010-04-27 15:45:00 30.0 1.0 2527.0 -0.0 0.0 833 3360
2010-04-27 16:00:00 30.0 1.0 2542.0 -0.0 0.0 796 3338
2010-04-27 16:15:00 30.0 1.0 2600.0 -0.0 0.0 783 3383
2010-04-27 16:30:00 30.0 1.0 2672.0 -0.0 0.0 753 3425
2010-04-27 16:45:00 30.0 1.0 2741.0 -0.0 0.0 762 3503
2010-04-27 17:00:00 30.0 1.0 2746.0 -0.0 0.0 781 3527
2010-04-27 17:15:00 30.0 1.0 2774.0 -0.0 0.0 772 3546
2010-04-27 17:30:00 30.0 1.0 2840.0 -0.0 0.0 718 3558
2010-04-27 17:45:00 30.0 1.0 2860.0 -0.0 0.0 714 3574
2010-04-27 18:00:00 30.0 1.0 2832.0 -0.0 0.0 717 3549
2010-04-27 18:15:00 30.0 1.0 2793.0 -0.0 0.0 701 3494
2010-04-27 18:30:00 30.0 1.0 2758.0 -0.0 0.0 707 3465
2010-04-27 18:45:00 30.0 1.0 2725.0 -0.0 0.0 699 3424
2010-04-27 19:00:00 30.0 1.0 2691.0 -0.0 0.0 694 3385
2010-04-27 19:15:00 30.0 1.0 2674.0 -0.0 0.0 666 3340
2010-04-27 19:30:00 30.0 1.0 2595.0 -0.0 0.0 710 3305
2010-04-27 19:45:00 30.0 1.0 2559.0 -0.0 0.0 697 3256
2010-04-27 20:00:00 30.0 1.0 2535.0 -0.0 0.0 680 3215
2010-04-27 20:15:00 30.0 1.0 2553.0 -0.0 0.0 676 3229
2010-04-27 20:30:00 30.0 1.0 2624.0 -0.0 0.0 616 3240
2010-04-27 20:45:00 30.0 1.0 2736.0 -0.0 0.0 565 3301
2010-04-27 21:00:00 30.0 1.0 2785.0 -0.0 0.0 564 3349
2010-04-27 21:15:00 30.0 1.0 2809.0 -0.0 0.0 562 3371
2010-04-27 21:30:00 30.0 1.0 2770.0 -0.0 0.0 547 3317
2010-04-27 21:45:00 30.0 1.0 2672.0 -0.0 0.0 600 3272
2010-04-27 22:00:00 30.0 1.0 2589.0 -0.0 0.0 614 3203
2010-04-27 22:15:00 30.0 1.0 2513.0 -0.0 0.0 609 3122
2010-04-27 22:30:00 30.0 1.0 2317.0 1.0 0.0 691 3008
2010-04-27 22:45:00 30.0 1.0 2209.0 1.0 0.0 670 2879
2010-04-27 23:00:00 30.0 1.0 2142.0 1.0 0.0 677 2819
2010-04-27 23:15:00 30.0 1.0 2048.0 1.0 0.0 690 2738
2010-04-27 23:30:00 30.0 1.0 1863.0 1.0 0.0 741 2604
2010-04-27 23:45:00 30.0 1.0 1773.0 1.0 0.0 772 2545
2010-04-28 00:00:00 30.0 1.0 1782.0 -0.0 0.0 750 2532
2010-04-28 00:15:00 30.0 1.0 1754.0 1.0 0.0 775 2529
2010-04-28 00:30:00 30.0 1.0 1719.0 1.0 0.0 755 2474
2010-04-28 00:45:00 30.0 1.0 1695.0 1.0 0.0 701 2396
2010-04-28 01:00:00 30.0 1.0 1664.0 1.0 0.0 659 2323
2010-04-28 01:15:00 30.0 1.0 1637.0 1.0 0.0 660 2297
2010-04-28 01:30:00 30.0 1.0 1574.0 1.0 0.0 670 2244
2010-04-28 01:45:00 30.0 1.0 1546.0 1.0 0.0 682 2228
2010-04-28 02:00:00 30.0 1.0 1477.0 1.0 0.0 728 2205
2010-04-28 02:15:00 30.0 1.0 1449.0 1.0 0.0 722 2171
2010-04-28 02:30:00 30.0 1.0 1413.0 1.0 0.0 722 2135
2010-04-28 02:45:00 30.0 1.0 1363.0 1.0 0.0 768 2131
2010-04-28 03:00:00 30.0 1.0 1352.0 1.0 0.0 728 2080
2010-04-28 03:15:00 30.0 1.0 1347.0 1.0 0.0 729 2076
2010-04-28 03:30:00 30.0 1.0 1343.0 1.0 0.0 703 2046
2010-04-28 03:45:00 30.0 1.0 1350.0 1.0 0.0 710 2060
2010-04-28 04:00:00 30.0 1.0 1392.0 1.0 0.0 678 2070
2010-04-28 04:15:00 30.0 1.0 1399.0 1.0 0.0 655 2054
2010-04-28 04:30:00 30.0 1.0 1388.0 1.0 0.0 669 2057
2010-04-28 04:45:00 30.0 1.0 1375.0 1.0 0.0 711 2086
2010-04-28 05:00:00 30.0 1.0 1381.0 1.0 0.0 678 2059
2010-04-28 05:15:00 30.0 1.0 1379.0 1.0 0.0 720 2099
2010-04-28 05:30:00 30.0 1.0 1408.0 1.0 0.0 695 2103
2010-04-28 05:45:00 30.0 1.0 1434.0 1.0 0.0 696 2130
2010-04-28 06:00:00 30.0 1.0 1475.0 1.0 0.0 677 2152
2010-04-28 06:15:00 30.0 1.0 1573.0 1.0 0.0 647 2220
2010-04-28 06:30:00 30.0 1.0 1620.0 1.0 0.0 648 2268
2010-04-28 06:45:00 30.0 1.0 1736.0 1.0 0.0 614 2350
2010-04-28 07:00:00 30.0 1.0 1877.0 1.0 0.0 617 2494
2010-04-28 07:15:00 30.0 1.0 2095.0 1.0 0.0 598 2693
2010-04-28 07:30:00 30.0 1.0 2225.0 1.0 0.0 600 2825
2010-04-28 07:45:00 30.0 1.0 2378.0 1.0 0.0 576 2954
2010-04-28 08:00:00 30.0 1.0 2499.0 1.0 0.0 567 3066
2010-04-28 08:15:00 30.0 1.0 2650.0 1.0 0.0 565 3215
2010-04-28 08:30:00 30.0 1.0 2677.0 1.0 0.0 589 3266
2010-04-28 08:45:00 30.0 1.0 2691.0 -0.0 0.0 582 3273
2010-04-28 09:00:00 30.0 1.0 2709.0 -0.0 0.0 585 3294
2010-04-28 09:15:00 30.0 1.0 2756.0 -0.0 0.0 598 3354
2010-04-28 09:30:00 30.0 1.0 2768.0 -0.0 0.0 610 3378
2010-04-28 09:45:00 30.0 1.0 2744.0 -0.0 0.0 641 3385
2010-04-28 10:00:00 30.0 1.0 2721.0 -0.0 0.0 673 3394
2010-04-28 10:15:00 30.0 1.0 2683.0 -0.0 0.0 686 3369
2010-04-28 10:30:00 30.0 1.0 2709.0 -0.0 0.0 691 3400
2010-04-28 10:45:00 30.0 1.0 2687.0 -0.0 0.0 701 3388
2010-04-28 11:00:00 30.0 1.0 2683.0 -0.0 0.0 689 3372
2010-04-28 11:15:00 30.0 1.0 2665.0 -0.0 0.0 717 3382
2010-04-28 11:30:00 30.0 1.0 2633.0 -0.0 0.0 755 3388
2010-04-28 11:45:00 30.0 1.0 2630.0 -0.0 0.0 751 3381
2010-04-28 12:00:00 30.0 1.0 2611.0 -0.0 0.0 766 3377
2010-04-28 12:15:00 30.0 1.0 2621.0 -0.0 0.0 794 3415
2010-04-28 12:30:00 30.0 1.0 2612.0 -0.0 0.0 810 3422
2010-04-28 12:45:00 30.0 1.0 2635.0 -0.0 0.0 799 3434
2010-04-28 13:00:00 30.0 1.0 2648.0 -0.0 0.0 772 3420
2010-04-28 13:15:00 30.0 1.0 2622.0 -0.0 0.0 741 3363
2010-04-28 13:30:00 30.0 1.0 2574.0 -0.0 0.0 770 3344
2010-04-28 13:45:00 30.0 1.0 2544.0 -0.0 0.0 783 3327
2010-04-28 14:00:00 30.0 1.0 2535.0 -0.0 0.0 810 3345
2010-04-28 14:15:00 30.0 1.0 2586.0 -0.0 0.0 761 3347
2010-04-28 14:30:00 30.0 1.0 2585.0 -0.0 0.0 769 3354
2010-04-28 14:45:00 30.0 1.0 2592.0 -0.0 0.0 733 3325
2010-04-28 15:00:00 30.0 1.0 2586.0 -0.0 0.0 760 3346
2010-04-28 15:15:00 30.0 1.0 2617.0 -0.0 0.0 773 3390
2010-04-28 15:30:00 30.0 1.0 2582.0 -0.0 0.0 791 3373
2010-04-28 15:45:00 30.0 1.0 2631.0 -0.0 0.0 737 3368
2010-04-28 16:00:00 30.0 1.0 2652.0 -0.0 0.0 733 3385
2010-04-28 16:15:00 30.0 1.0 2680.0 -0.0 0.0 736 3416
2010-04-28 16:30:00 30.0 1.0 2733.0 -0.0 0.0 710 3443
2010-04-28 16:45:00 30.0 1.0 2779.0 -0.0 0.0 677 3456
2010-04-28 17:00:00 30.0 1.0 2807.0 -0.0 0.0 653 3460
2010-04-28 17:15:00 30.0 1.0 2839.0 -0.0 0.0 640 3479
2010-04-28 17:30:00 30.0 1.0 2862.0 -0.0 0.0 609 3471
2010-04-28 17:45:00 30.0 1.0 2859.0 -0.0 0.0 631 3490
2010-04-28 18:00:00 30.0 1.0 2814.0 -0.0 0.0 650 3464
2010-04-28 18:15:00 30.0 1.0 2761.0 -0.0 0.0 643 3404
2010-04-28 18:30:00 30.0 1.0 2751.0 -0.0 0.0 639 3390
2010-04-28 18:45:00 30.0 1.0 2719.0 -0.0 0.0 611 3330
2010-04-28 19:00:00 30.0 1.0 2712.0 -0.0 0.0 593 3305
2010-04-28 19:15:00 30.0 1.0 2755.0 -0.0 0.0 538 3293
2010-04-28 19:30:00 30.0 1.0 2758.0 -0.0 0.0 507 3265
2010-04-28 19:45:00 30.0 1.0 2763.0 -0.0 0.0 479 3242
2010-04-28 20:00:00 30.0 1.0 2784.0 -0.0 0.0 402 3186
2010-04-28 20:15:00 30.0 1.0 2755.0 -0.0 0.0 418 3173
2010-04-28 20:30:00 30.0 1.0 2801.0 -0.0 0.0 373 3174
2010-04-28 20:45:00 30.0 1.0 2885.0 -0.0 0.0 340 3225
2010-04-28 21:00:00 30.0 1.0 2937.0 0.0 0.0 341 3278
2010-04-28 21:15:00 50.0 1.0 3000.0 1.0 60.0 319 3379
2010-04-28 21:30:00 50.0 1.0 3000.0 1.0 49.0 288 3337
2010-04-28 21:45:00 50.0 1.0 3000.0 1.0 46.0 275 3321
2010-04-28 22:00:00 50.0 1.0 3000.0 1.0 5.0 265 3270
2010-04-28 22:15:00 30.0 1.0 2936.0 0.0 0.0 244 3180
2010-04-28 22:30:00 30.0 1.0 2829.0 -0.0 0.0 245 3074
2010-04-28 22:45:00 30.0 1.0 2709.0 -0.0 0.0 244 2953
2010-04-28 23:00:00 30.0 1.0 2595.0 -0.0 0.0 274 2869
2010-04-28 23:15:00 30.0 1.0 2517.0 -0.0 0.0 274 2791
2010-04-28 23:30:00 30.0 1.0 2413.0 1.0 0.0 264 2677
2010-04-28 23:45:00 30.0 1.0 2316.0 1.0 0.0 266 2582
2010-04-29 00:00:00 30.0 1.0 2268.0 -0.0 0.0 261 2529
2010-04-29 00:15:00 30.0 1.0 2234.0 1.0 0.0 315 2549
2010-04-29 00:30:00 30.0 1.0 2213.0 1.0 0.0 290 2503
2010-04-29 00:45:00 30.0 1.0 2191.0 1.0 0.0 237 2428
2010-04-29 01:00:00 30.0 1.0 2159.0 1.0 0.0 226 2385
2010-04-29 01:15:00 30.0 1.0 2119.0 1.0 0.0 213 2332
2010-04-29 01:30:00 30.0 1.0 2087.0 1.0 0.0 220 2307
2010-04-29 01:45:00 30.0 1.0 2037.0 1.0 0.0 217 2254
2010-04-29 02:00:00 30.0 1.0 2036.0 1.0 0.0 190 2226
2010-04-29 02:15:00 30.0 1.0 2033.0 1.0 0.0 158 2191
2010-04-29 02:30:00 30.0 1.0 2018.0 1.0 0.0 158 2176
2010-04-29 02:45:00 30.0 1.0 1984.0 1.0 0.0 159 2143
2010-04-29 03:00:00 30.0 1.0 1964.0 1.0 0.0 153 2117
2010-04-29 03:15:00 30.0 1.0 1953.0 1.0 0.0 155 2108
2010-04-29 03:30:00 30.0 1.0 1959.0 1.0 0.0 137 2096
2010-04-29 03:45:00 30.0 1.0 1933.0 1.0 0.0 166 2099
2010-04-29 04:00:00 30.0 1.0 1908.0 1.0 0.0 181 2089
2010-04-29 04:15:00 30.0 1.0 1950.0 1.0 0.0 133 2083
2010-04-29 04:30:00 30.0 1.0 1977.0 1.0 0.0 122 2099
2010-04-29 04:45:00 30.0 1.0 1975.0 1.0 0.0 129 2104
2010-04-29 05:00:00 30.0 1.0 2003.0 1.0 0.0 106 2109
2010-04-29 05:15:00 30.0 1.0 2019.0 1.0 0.0 114 2133
2010-04-29 05:30:00 30.0 1.0 2031.0 1.0 0.0 121 2152
2010-04-29 05:45:00 30.0 1.0 2041.0 1.0 0.0 106 2147
2010-04-29 06:00:00 30.0 1.0 2035.0 1.0 0.0 106 2141
2010-04-29 06:15:00 30.0 1.0 2088.0 1.0 0.0 106 2194
2010-04-29 06:30:00 30.0 1.0 2169.0 1.0 0.0 105 2274
2010-04-29 06:45:00 30.0 1.0 2266.0 1.0 0.0 112 2378
2010-04-29 07:00:00 30.0 1.0 2421.0 1.0 0.0 101 2522
2010-04-29 07:15:00 30.0 1.0 2634.0 1.0 0.0 102 2736
2010-04-29 07:30:00 30.0 1.0 2771.0 1.0 0.0 90 2861
2010-04-29 07:45:00 30.0 1.0 2927.0 1.0 0.0 92 3019
2010-04-29 08:00:00 50.0 1.0 3000.0 1.0 42.0 82 3124
2010-04-29 08:15:00 50.0 1.0 3000.0 1.0 178.0 84 3262
2010-04-29 08:30:00 50.0 1.0 3000.0 1.0 222.0 89 3311
2010-04-29 08:45:00 50.0 1.0 3000.0 1.0 238.0 87 3325
2010-04-29 09:00:00 50.0 1.0 3000.0 1.0 243.0 94 3337
2010-04-29 09:15:00 50.0 1.0 3000.0 1.0 257.0 100 3357
2010-04-29 09:30:00 50.0 1.0 3000.0 1.0 265.0 113 3378
2010-04-29 09:45:00 50.0 1.0 3000.0 1.0 264.0 120 3384
2010-04-29 10:00:00 50.0 1.0 3000.0 1.0 247.0 117 3364
2010-04-29 10:15:00 50.0 1.0 3000.0 1.0 220.0 132 3352
2010-04-29 10:30:00 50.0 1.0 3000.0 1.0 204.0 144 3348
2010-04-29 10:45:00 50.0 1.0 3000.0 1.0 180.0 186 3366
2010-04-29 11:00:00 50.0 1.0 3000.0 1.0 175.0 190 3365
2010-04-29 11:15:00 50.0 1.0 3000.0 1.0 154.0 199 3353
2010-04-29 11:30:00 50.0 1.0 3000.0 1.0 152.0 198 3350
2010-04-29 11:45:00 50.0 1.0 3000.0 1.0 141.0 221 3362
2010-04-29 12:00:00 50.0 1.0 3000.0 1.0 169.0 194 3363
2010-04-29 12:15:00 50.0 1.0 3000.0 1.0 160.0 201 3361
2010-04-29 12:30:00 50.0 1.0 3000.0 1.0 114.0 275 3389
2010-04-29 12:45:00 50.0 1.0 3000.0 1.0 138.0 231 3369
2010-04-29 13:00:00 50.0 1.0 3000.0 1.0 127.0 244 3371
2010-04-29 13:15:00 50.0 1.0 3000.0 1.0 96.0 238 3334
2010-04-29 13:30:00 50.0 1.0 3000.0 1.0 57.0 226 3283
2010-04-29 13:45:00 50.0 1.0 3000.0 1.0 42.0 235 3277
2010-04-29 14:00:00 30.0 1.0 2978.0 0.0 0.0 292 3270
2010-04-29 14:15:00 50.0 1.0 3000.0 1.0 20.0 234 3254
2010-04-29 14:30:00 50.0 1.0 3000.0 1.0 22.0 267 3289
2010-04-29 14:45:00 50.0 1.0 3000.0 1.0 6.0 267 3273
2010-04-29 15:00:00 50.0 1.0 3000.0 1.0 23.0 246 3269
2010-04-29 15:15:00 50.0 1.0 3000.0 1.0 43.0 244 3287
2010-04-29 15:30:00 50.0 1.0 3000.0 1.0 16.0 303 3319
2010-04-29 15:45:00 50.0 1.0 3000.0 1.0 44.0 289 3333
2010-04-29 16:00:00 50.0 1.0 3000.0 1.0 39.0 277 3316
2010-04-29 16:15:00 50.0 1.0 3000.0 1.0 85.0 255 3340
2010-04-29 16:30:00 50.0 1.0 3000.0 1.0 64.0 295 3359
2010-04-29 16:45:00 50.0 1.0 3000.0 1.0 53.0 328 3381
2010-04-29 17:00:00 50.0 1.0 3000.0 1.0 48.0 361 3409
2010-04-29 17:15:00 50.0 1.0 3000.0 1.0 92.0 324 3416
2010-04-29 17:30:00 50.0 1.0 3000.0 1.0 155.0 300 3455
2010-04-29 17:45:00 50.0 1.0 3000.0 1.0 199.0 247 3446
2010-04-29 18:00:00 50.0 1.0 3000.0 1.0 182.0 238 3420
2010-04-29 18:15:00 50.0 1.0 3000.0 1.0 148.0 228 3376
2010-04-29 18:30:00 50.0 1.0 3000.0 1.0 120.0 220 3340
2010-04-29 18:45:00 50.0 1.0 3000.0 1.0 82.0 221 3303
2010-04-29 19:00:00 50.0 1.0 3000.0 1.0 62.0 217 3279
2010-04-29 19:15:00 30.0 1.0 2996.0 1.0 0.0 264 3260
2010-04-29 19:30:00 50.0 1.0 3000.0 1.0 2.0 199 3201
2010-04-29 19:45:00 30.0 1.0 2984.0 -0.0 0.0 180 3164
2010-04-29 20:00:00 30.0 1.0 2952.0 -0.0 0.0 153 3105
2010-04-29 20:15:00 30.0 1.0 2962.0 -0.0 0.0 163 3125
2010-04-29 20:30:00 30.0 1.0 2942.0 -0.0 0.0 168 3110
2010-04-29 20:45:00 30.0 1.0 2977.0 -0.0 0.0 173 3150
2010-04-29 21:00:00 50.0 1.0 3000.0 1.0 57.0 190 3247
2010-04-29 21:15:00 50.0 1.0 3000.0 1.0 162.0 176 3338
2010-04-29 21:30:00 50.0 1.0 3000.0 1.0 175.0 151 3326
2010-04-29 21:45:00 50.0 1.0 3000.0 1.0 161.0 136 3297
2010-04-29 22:00:00 50.0 1.0 3000.0 1.0 103.0 134 3237
2010-04-29 22:15:00 50.0 1.0 3000.0 1.0 42.0 129 3171
2010-04-29 22:30:00 30.0 1.0 2912.0 1.0 0.0 150 3062
2010-04-29 22:45:00 30.0 1.0 2833.0 1.0 0.0 147 2980
2010-04-29 23:00:00 30.0 1.0 2744.0 1.0 0.0 145 2889
2010-04-29 23:15:00 30.0 1.0 2651.0 1.0 0.0 149 2800
2010-04-29 23:30:00 30.0 1.0 2530.0 1.0 0.0 163 2693
2010-04-29 23:45:00 30.0 1.0 2444.0 1.0 0.0 166 2610
2010-04-30 00:00:00 30.0 1.0 2397.0 1.0 0.0 167 2564
2010-04-30 00:15:00 30.0 1.0 2382.0 1.0 0.0 158 2540
2010-04-30 00:30:00 30.0 1.0 2344.0 1.0 0.0 157 2501
2010-04-30 00:45:00 30.0 1.0 2296.0 1.0 0.0 153 2449
2010-04-30 01:00:00 30.0 1.0 2242.0 1.0 0.0 156 2398
2010-04-30 01:15:00 30.0 1.0 2179.0 1.0 0.0 162 2341
2010-04-30 01:30:00 30.0 1.0 2150.0 1.0 0.0 149 2299
2010-04-30 01:45:00 30.0 1.0 2110.0 1.0 0.0 148 2258
2010-04-30 02:00:00 30.0 1.0 2071.0 1.0 0.0 155 2226
2010-04-30 02:15:00 30.0 1.0 2029.0 1.0 0.0 158 2187
2010-04-30 02:30:00 30.0 1.0 2000.0 1.0 0.0 154 2154
2010-04-30 02:45:00 30.0 1.0 1976.0 1.0 0.0 146 2122
2010-04-30 03:00:00 30.0 1.0 1955.0 1.0 0.0 154 2109
2010-04-30 03:15:00 30.0 1.0 1941.0 1.0 0.0 163 2104
2010-04-30 03:30:00 30.0 1.0 1950.0 1.0 0.0 143 2093
2010-04-30 03:45:00 30.0 1.0 1943.0 1.0 0.0 141 2084
2010-04-30 04:00:00 30.0 1.0 1946.0 1.0 0.0 132 2078
2010-04-30 04:15:00 30.0 1.0 1940.0 1.0 0.0 120 2060
2010-04-30 04:30:00 30.0 1.0 1959.0 1.0 0.0 113 2072
2010-04-30 04:45:00 30.0 1.0 1979.0 1.0 0.0 105 2084
2010-04-30 05:00:00 30.0 1.0 1996.0 1.0 0.0 99 2095
2010-04-30 05:15:00 30.0 1.0 2011.0 1.0 0.0 97 2108
2010-04-30 05:30:00 30.0 1.0 2013.0 1.0 0.0 98 2111
2010-04-30 05:45:00 30.0 1.0 2015.0 1.0 0.0 106 2121
2010-04-30 06:00:00 30.0 1.0 2035.0 1.0 0.0 97 2132
2010-04-30 06:15:00 30.0 1.0 2089.0 1.0 0.0 113 2202
2010-04-30 06:30:00 30.0 1.0 2129.0 1.0 0.0 117 2246
2010-04-30 06:45:00 30.0 1.0 2219.0 1.0 0.0 127 2346
2010-04-30 07:00:00 30.0 1.0 2361.0 1.0 0.0 123 2484
2010-04-30 07:15:00 30.0 1.0 2553.0 1.0 0.0 105 2658
2010-04-30 07:30:00 30.0 1.0 2669.0 -0.0 0.0 105 2774
2010-04-30 07:45:00 30.0 1.0 2827.0 -0.0 0.0 98 2925
2010-04-30 08:00:00 30.0 1.0 2960.0 0.0 0.0 97 3057
2010-04-30 08:15:00 50.0 1.0 3000.0 1.0 100.0 97 3197
2010-04-30 08:30:00 50.0 1.0 3000.0 1.0 138.0 112 3250
2010-04-30 08:45:00 50.0 1.0 3000.0 1.0 155.0 145 3300
2010-04-30 09:00:00 50.0 1.0 3000.0 1.0 191.0 132 3323
2010-04-30 09:15:00 50.0 1.0 3000.0 1.0 271.0 116 3387
2010-04-30 09:30:00 50.0 1.0 3000.0 1.0 267.0 122 3389
2010-04-30 09:45:00 50.0 1.0 3000.0 1.0 298.0 114 3412
2010-04-30 10:00:00 50.0 1.0 3000.0 1.0 291.0 124 3415
2010-04-30 10:15:00 50.0 1.0 3000.0 1.0 272.0 133 3405
2010-04-30 10:30:00 50.0 1.0 3000.0 1.0 274.0 142 3416
2010-04-30 10:45:00 50.0 1.0 3000.0 1.0 245.0 160 3405
2010-04-30 11:00:00 50.0 1.0 3000.0 1.0 220.0 181 3401
2010-04-30 11:15:00 50.0 1.0 3000.0 1.0 237.0 171 3408
2010-04-30 11:30:00 50.0 1.0 3000.0 1.0 177.0 232 3409
2010-04-30 11:45:00 50.0 1.0 3000.0 1.0 177.0 234 3411
2010-04-30 12:00:00 50.0 1.0 3000.0 1.0 201.0 211 3412
2010-04-30 12:15:00 50.0 1.0 3000.0 1.0 228.0 181 3409
2010-04-30 12:30:00 50.0 1.0 3000.0 1.0 216.0 186 3402
2010-04-30 12:45:00 50.0 1.0 3000.0 1.0 197.0 206 3403
2010-04-30 13:00:00 50.0 1.0 3000.0 1.0 195.0 181 3376
2010-04-30 13:15:00 50.0 1.0 3000.0 1.0 149.0 196 3345
2010-04-30 13:30:00 50.0 1.0 3000.0 1.0 77.0 216 3293
2010-04-30 13:45:00 50.0 1.0 3000.0 1.0 32.0 234 3266
2010-04-30 14:00:00 30.0 1.0 2978.0 -0.0 0.0 267 3245
2010-04-30 14:15:00 30.0 1.0 2962.0 -0.0 0.0 289 3251
2010-04-30 14:30:00 30.0 1.0 2940.0 -0.0 0.0 327 3267
2010-04-30 14:45:00 30.0 1.0 2951.0 -0.0 0.0 294 3245
2010-04-30 15:00:00 30.0 1.0 2932.0 -0.0 0.0 311 3243
2010-04-30 15:15:00 30.0 1.0 2928.0 -0.0 0.0 325 3253
2010-04-30 15:30:00 30.0 1.0 2913.0 -0.0 0.0 344 3257
2010-04-30 15:45:00 30.0 1.0 2946.0 -0.0 0.0 299 3245
2010-04-30 16:00:00 30.0 1.0 2933.0 -0.0 0.0 297 3230
2010-04-30 16:15:00 30.0 1.0 2938.0 -0.0 0.0 312 3250
2010-04-30 16:30:00 30.0 1.0 2988.0 -0.0 0.0 274 3262
2010-04-30 16:45:00 30.0 1.0 2997.0 -0.0 0.0 284 3281
2010-04-30 17:00:00 50.0 1.0 3000.0 1.0 54.0 237 3291
2010-04-30 17:15:00 50.0 1.0 3000.0 1.0 51.0 251 3302
2010-04-30 17:30:00 50.0 1.0 3000.0 1.0 48.0 263 3311
2010-04-30 17:45:00 50.0 1.0 3000.0 1.0 88.0 247 3335
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.time.js"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.csv.js"></script>
<!-- <script type="text/javascript" src="d3/d3.js"></script>
<script type="text/javascript" src="d3/d3.csv.js"></script>
<script type="text/javascript" src="d3/d3.time.js"></script>
<script type="text/javascript" src="d3/d3.layout.js"></script> -->
<link type="text/css" rel="stylesheet" href="style.css"/>
<style type="text/css">
#footer .times{font-size: 15px;}
#footer .legend{font-size: 30px; font-style: bold;}
svg {
font-size: 10px;
}
rect {
fill: #eeeeee;
}
path.area {
fill: #000;
fill-opacity: .75;
}
.axis line, .grid line {
stroke-width: .5px;
shape-rendering: crispEdges;
}
.grid line {
stroke: #fff;
}
.grid line.minor {
stroke-opacity: .5;
}
.grid text {
display: none;
}
.axis line {
stroke: #000;
}
.grid path, .axis path {
display: none;
}
</style>
</head>
<body>
<div id="chart">
<div id="footer">
<div class="title">Ireland Power [MW]</div>
<div class="legend"></div>
<div class="times"></div>
<div class="hint">click or option-click to toggle zoom</div>
</div>
</div>
<script type="text/javascript">
var m = [79, 80, 160, 79],
w = 1000 - m[1] - m[3],
h = 500 - m[0] - m[2],
parse = d3.time.format("%Y-%m-%d %H:%M:%S").parse,
format = d3.time.format("%Y-%m-%d %H:%M"),
colors = d3.scale.ordinal().range(["lightgray", "lightpink", "lightblue"])
// color = d3.interpolateRgb("#aad", "#556");
// Scales. Note the inverted domain for the y-scale: bigger is up!
var x = d3.time.scale().range([0, w]),
y = d3.scale.linear().range([h, 0]),
x_dom = [],
x_dom_zoom = [];
// Axes.
var xAxis = d3.svg.axis().scale(x).orient("bottom"),
yAxis = d3.svg.axis().scale(y).orient("left");
// The area generator.
var area = d3.svg.area()
.x(function(d) {return x(d.x) })
.y0(function(d){return y(d.y0) })
.y1(function(d){return y(d.y0+d.y) });
var svg = d3.select("#chart").append("svg:svg")
.attr("width", w + m[1] + m[3])
.attr("height", h + m[0] + m[2])
.append("svg:g")
.attr("transform", "translate(" + m[3] + "," + m[0] + ")");
svg.append("svg:rect")
.attr("width", w)
.attr("height", h);
svg.append("svg:clipPath")
.attr("id", "clip")
.append("svg:rect")
.attr("x", x(0))
.attr("y", y(1))
.attr("width", x(1) - x(0))
.attr("height", y(0) - y(1));
d3.csv("commitment.csv", function(data) {
// get header names
var header_row=d3.keys(data[0])
var gen_names = header_row.filter(function(s){return s.substring(0,7)=='power: '}).map(function(s){return s.substring(7,s.length)});
d3.select("#footer .legend").html(gen_names.map(function(name,i){return '<span style="color:'+colors(i)+'">'+name+'</span>'}).join(", "));
console.log(colors(0))
// Parse times and power for generators.
var stack_gens = d3.layout.stack()(gen_names.map(function(gen_kind) {
return data.map(function(d) {
return {x: parse(d.times), y: +d['power: '+gen_kind]};
});
}));
// console.log(stack_gens)
index_last_gen=stack_gens.length-1
index_last_time=stack_gens[0].length-1
// Compute the minimum and maximum date, and the maximum price.
// d0 = stack_gens[0].map(function(d){return d.x}); //the whole domain
x_dom = [stack_gens[0][0].x,stack_gens[0][index_last_time].x]
d3.select("#footer .times").text(x_dom.map(format).join(" to "));
x_dom_zoom = [new Date(2010,4-1,28,20), new Date(2010, 4-1, 29,0)]; //just a small part of domain
y_dom = [0, d3.max(stack_gens[index_last_gen], function(d) { return d.y0+d.y; })]
x.domain(x_dom);
y.domain(y_dom);
svg.append("svg:g")
.attr("class", "x grid")
.attr("transform", "translate(0," + h + ")")
.call(xAxis.tickSubdivide(0).tickSize(-h));
svg.append("svg:g")
.attr("class", "y grid")
.attr("transform", "translate(0,0)")
.call(yAxis.tickSubdivide(1).tickSize(-w));
svg.append("svg:g")
.attr("class", "x axis")
.attr("transform", "translate(0," + h + ")")
.call(xAxis.tickSubdivide(0).tickSize(6));
svg.append("svg:g")
.attr("class", "y axis")
.call(yAxis.tickSubdivide(0).tickSize(6));
svg.selectAll("g.generator")
.data(stack_gens)
.enter().append("svg:path")
.attr("class", "generator")
.style("fill", function(d,i){return colors(i)})
.style("stroke", function(d,i){return d3.rgb(colors(i)).darker()})
.attr("clip-path", "url(#clip)")
.attr("d", area)
});
// On click, update the x-axis.
svg.on("click", function() {
var new_dom = x.domain()[0] - x_dom[0] ? x_dom : x_dom_zoom;
x.domain(new_dom);
d3.select("#footer .times").text(new_dom.map(format).join(" to "));
var t = svg.transition().duration(d3.event.altKey ? 7500 : 750);
t.select("g.x.grid").call(xAxis.tickSubdivide(1).tickSize(-h));
t.select("g.y.grid").call(yAxis.tickSubdivide(1).tickSize(-w));
t.select("g.x.axis").call(xAxis.tickSubdivide(0).tickSize(6));
t.select("g.y.axis").call(yAxis.tickSubdivide(0).tickSize(6));
t.selectAll("path.generator").attr("d", area);
});
</script>
</body>
</html>
body {
overflow: hidden;
margin: 0;
font-size: 14px;
font-family: "Helvetica Neue", Helvetica;
}
#chart, #header, #footer {
position: absolute;
top: 0;
}
#header, #footer {
z-index: 1;
display: block;
font-size: 36px;
font-weight: 300;
text-shadow: 0 1px 0 #fff;
}
#header.inverted, #footer.inverted {
color: #fff;
text-shadow: 0 1px 4px #000;
}
#header {
top: 80px;
left: 140px;
width: 1000px;
}
#footer {
top: 680px;
right: 140px;
text-align: right;
}
rect {
fill: none;
pointer-events: all;
}
pre {
font-size: 18px;
}
line {
stroke: #000;
stroke-width: 1.5px;
}
.string, .regexp {
color: #f39;
}
.keyword {
color: #00c;
}
.comment {
color: #777;
font-style: oblique;
}
.number {
color: #369;
}
.class, .special {
color: #1181B8;
}
a:link, a:visited {
color: #000;
text-decoration: none;
}
a:hover {
color: #666;
}
.hint {
position: absolute;
right: 0;
width: 1000px;
font-size: 12px;
color: #999;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment