@explorable-viz/fluid 0.7.90 → 0.7.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fluid/fluid/lib/matrix.fld +18 -16
- package/dist/fluid/shared/fluid.mjs +210 -295
- package/dist/fluid/shared/load-figure.js +458 -700
- package/package.json +5 -3
- package/script/bundle-website.sh +13 -2
- package/website/article/README.md +3 -0
- package/website/article/convolution/index.html +90 -0
- package/website/article/convolution/spec.json +9 -0
- package/website/article/fluid/convolution/emboss.fld +5 -0
- package/website/article/fluid/convolution/test-image.fld +7 -0
- package/website/article/fluid/convolution.fld +24 -0
- package/website/article/fluid/dataset/methane-emissions.fld +123 -0
- package/website/article/fluid/dataset/non-renewables.fld +67 -0
- package/website/article/fluid/dataset/renewables-new.fld +301 -0
- package/website/article/fluid/dataset/scigen/1805.02474v1-10.fld +17 -0
- package/website/article/fluid/moving-average.fld +19 -0
- package/website/article/fluid/non-renewables.fld +21 -0
- package/website/article/fluid/scigen.fld +50 -0
- package/website/article/fluid/util.fld +36 -0
- package/website/article/image/fluid-logo.png +0 -0
- package/website/article/image/iccs-full-logo.png +0 -0
- package/website/article/image/schmidtsciences_primary_color.png +0 -0
- package/website/article/index.html +26 -0
- package/website/article/moving-average/index.html +57 -0
- package/website/article/moving-average/spec.json +9 -0
- package/website/article/non-renewables/index.html +46 -0
- package/website/article/non-renewables/spec.json +9 -0
- package/website/article/test.mjs +10 -0
- package/.spago/aff/v7.0.0/.editorconfig +0 -13
- package/.spago/aff/v7.0.0/.eslintrc.json +0 -28
- package/.spago/aff/v7.0.0/.gitignore +0 -14
- package/.spago/aff/v7.0.0/.tidyrc.json +0 -10
- package/.spago/affjax/v13.0.0/.editorconfig +0 -13
- package/.spago/affjax/v13.0.0/.eslintrc.json +0 -28
- package/.spago/affjax/v13.0.0/.gitignore +0 -14
- package/.spago/affjax/v13.0.0/.tidyrc.json +0 -10
- package/.spago/affjax-web/v1.0.0/.editorconfig +0 -13
- package/.spago/affjax-web/v1.0.0/.eslintrc.json +0 -30
- package/.spago/affjax-web/v1.0.0/.gitignore +0 -14
- package/.spago/affjax-web/v1.0.0/.tidyrc.json +0 -10
- package/.spago/argonaut-codecs/v9.0.0/.editorconfig +0 -13
- package/.spago/argonaut-codecs/v9.0.0/.gitignore +0 -9
- package/.spago/argonaut-codecs/v9.0.0/.tidyrc.json +0 -10
- package/.spago/argonaut-core/v7.0.0/.editorconfig +0 -13
- package/.spago/argonaut-core/v7.0.0/.eslintrc.json +0 -29
- package/.spago/argonaut-core/v7.0.0/.gitignore +0 -14
- package/.spago/argonaut-core/v7.0.0/.tidyrc.json +0 -10
- package/.spago/arraybuffer-types/v3.0.2/.editorconfig +0 -13
- package/.spago/arraybuffer-types/v3.0.2/.gitignore +0 -9
- package/.spago/arraybuffer-types/v3.0.2/.tidyrc.json +0 -10
- package/.spago/arrays/v7.0.0/.eslintrc.json +0 -26
- package/.spago/arrays/v7.0.0/.gitignore +0 -9
- package/.spago/assert/v6.0.0/.eslintrc.json +0 -26
- package/.spago/assert/v6.0.0/.gitignore +0 -8
- package/.spago/bifunctors/v6.0.0/.gitignore +0 -7
- package/.spago/catenable-lists/v7.0.0/.gitignore +0 -7
- package/.spago/console/v6.0.0/.eslintrc.json +0 -30
- package/.spago/console/v6.0.0/.gitignore +0 -9
- package/.spago/const/v6.0.0/.gitignore +0 -7
- package/.spago/contravariant/v6.0.0/.gitignore +0 -7
- package/.spago/control/v6.0.0/.gitignore +0 -7
- package/.spago/datetime/v6.1.0/.eslintrc.json +0 -26
- package/.spago/datetime/v6.1.0/.gitignore +0 -8
- package/.spago/debug/v6.0.0/.eslintrc.json +0 -36
- package/.spago/debug/v6.0.0/.gitignore +0 -8
- package/.spago/distributive/v6.0.0/.gitignore +0 -7
- package/.spago/effect/v4.0.0/.eslintrc.json +0 -26
- package/.spago/effect/v4.0.0/.gitignore +0 -8
- package/.spago/either/v6.1.0/.gitignore +0 -7
- package/.spago/enums/v6.0.0/.gitignore +0 -7
- package/.spago/exceptions/v6.0.0/.eslintrc.json +0 -26
- package/.spago/exceptions/v6.0.0/.gitignore +0 -8
- package/.spago/exists/v6.0.0/.gitignore +0 -7
- package/.spago/filterable/v5.0.0/.gitignore +0 -11
- package/.spago/foldable-traversable/v6.0.0/.eslintrc.json +0 -26
- package/.spago/foldable-traversable/v6.0.0/.gitignore +0 -8
- package/.spago/foreign/v7.0.0/.eslintrc.json +0 -26
- package/.spago/foreign/v7.0.0/.gitignore +0 -8
- package/.spago/foreign-object/v4.0.0/.eslintrc.json +0 -26
- package/.spago/foreign-object/v4.0.0/.gitignore +0 -8
- package/.spago/form-urlencoded/v7.0.0/.editorconfig +0 -13
- package/.spago/form-urlencoded/v7.0.0/.gitignore +0 -9
- package/.spago/form-urlencoded/v7.0.0/.tidyrc.json +0 -10
- package/.spago/free/v7.0.0/.gitignore +0 -8
- package/.spago/functions/v6.0.0/.eslintrc.json +0 -26
- package/.spago/functions/v6.0.0/.gitignore +0 -8
- package/.spago/functors/v5.0.0/.gitignore +0 -7
- package/.spago/gen/v4.0.0/.gitignore +0 -8
- package/.spago/graphs/v8.0.0/.gitignore +0 -7
- package/.spago/http-methods/v6.0.0/.editorconfig +0 -13
- package/.spago/http-methods/v6.0.0/.gitignore +0 -9
- package/.spago/http-methods/v6.0.0/.tidyrc.json +0 -10
- package/.spago/identity/v6.0.0/.gitignore +0 -7
- package/.spago/integers/v6.0.0/.eslintrc.json +0 -26
- package/.spago/integers/v6.0.0/.gitignore +0 -8
- package/.spago/invariant/v6.0.0/.gitignore +0 -7
- package/.spago/js-date/v8.0.0/.editorconfig +0 -13
- package/.spago/js-date/v8.0.0/.eslintrc.json +0 -29
- package/.spago/js-date/v8.0.0/.gitignore +0 -14
- package/.spago/js-date/v8.0.0/.tidyrc.json +0 -10
- package/.spago/js-uri/v3.0.0/.eslintrc.json +0 -30
- package/.spago/js-uri/v3.0.0/.gitignore +0 -14
- package/.spago/js-uri/v3.0.0/.tidyrc.json +0 -10
- package/.spago/lazy/v6.0.0/.eslintrc.json +0 -26
- package/.spago/lazy/v6.0.0/.gitignore +0 -8
- package/.spago/lcg/v4.0.0/.gitignore +0 -8
- package/.spago/lists/v7.0.0/.gitignore +0 -7
- package/.spago/maybe/v6.0.0/.gitignore +0 -7
- package/.spago/media-types/v6.0.0/.editorconfig +0 -13
- package/.spago/media-types/v6.0.0/.gitignore +0 -9
- package/.spago/media-types/v6.0.0/.tidyrc.json +0 -10
- package/.spago/newtype/v5.0.0/.gitignore +0 -7
- package/.spago/node-buffer/v8.0.0/.eslintrc.json +0 -26
- package/.spago/node-buffer/v8.0.0/.gitignore +0 -8
- package/.spago/node-child-process/v9.0.0/.eslintrc.json +0 -29
- package/.spago/node-child-process/v9.0.0/.gitignore +0 -8
- package/.spago/node-fs/v9.1.0/.eslintrc.json +0 -29
- package/.spago/node-fs/v9.1.0/.gitignore +0 -9
- package/.spago/node-path/v5.0.0/.eslintrc.json +0 -26
- package/.spago/node-path/v5.0.0/.gitignore +0 -8
- package/.spago/node-process/v10.0.0/.eslintrc.json +0 -29
- package/.spago/node-process/v10.0.0/.gitignore +0 -8
- package/.spago/node-streams/v7.0.0/.eslintrc.json +0 -29
- package/.spago/node-streams/v7.0.0/.gitignore +0 -8
- package/.spago/nonempty/v7.0.0/.gitignore +0 -7
- package/.spago/now/v6.0.0/.editorconfig +0 -13
- package/.spago/now/v6.0.0/.eslintrc.json +0 -29
- package/.spago/now/v6.0.0/.gitignore +0 -14
- package/.spago/now/v6.0.0/.tidyrc.json +0 -10
- package/.spago/nullable/v6.0.0/.editorconfig +0 -13
- package/.spago/nullable/v6.0.0/.eslintrc.json +0 -29
- package/.spago/nullable/v6.0.0/.gitignore +0 -14
- package/.spago/nullable/v6.0.0/.tidyrc.json +0 -10
- package/.spago/optparse/v5.0.0/.gitignore +0 -8
- package/.spago/optparse/v5.0.0/.npmrc +0 -1
- package/.spago/ordered-collections/v3.0.0/.gitignore +0 -8
- package/.spago/orders/v6.0.0/.gitignore +0 -7
- package/.spago/parallel/v6.0.0/.gitignore +0 -7
- package/.spago/parsing/v10.0.0/.editorconfig +0 -13
- package/.spago/parsing/v10.0.0/.gitignore +0 -10
- package/.spago/parsing/v10.0.0/.tidyoperators +0 -231
- package/.spago/parsing/v10.0.0/.tidyrc.json +0 -10
- package/.spago/partial/v4.0.0/.eslintrc.json +0 -26
- package/.spago/partial/v4.0.0/.gitignore +0 -8
- package/.spago/posix-types/v6.0.0/.gitignore +0 -7
- package/.spago/prelude/v6.0.0/.eslintrc.json +0 -26
- package/.spago/prelude/v6.0.0/.gitignore +0 -8
- package/.spago/profunctor/v6.0.0/.gitignore +0 -7
- package/.spago/psci-support/v6.0.0/.eslintrc.json +0 -28
- package/.spago/psci-support/v6.0.0/.gitignore +0 -8
- package/.spago/quickcheck/v8.0.1/.eslintrc.json +0 -26
- package/.spago/quickcheck/v8.0.1/.gitignore +0 -8
- package/.spago/random/v6.0.0/.eslintrc.json +0 -26
- package/.spago/random/v6.0.0/.gitignore +0 -8
- package/.spago/record/v4.0.0/.eslintrc.json +0 -26
- package/.spago/record/v4.0.0/.gitignore +0 -8
- package/.spago/refs/v6.0.0/.eslintrc.json +0 -26
- package/.spago/refs/v6.0.0/.gitignore +0 -8
- package/.spago/st/v6.0.0/.eslintrc.json +0 -26
- package/.spago/st/v6.0.0/.gitignore +0 -8
- package/.spago/strings/v6.0.0/.eslintrc.json +0 -26
- package/.spago/strings/v6.0.0/.gitignore +0 -8
- package/.spago/tailrec/v6.0.0/.gitignore +0 -7
- package/.spago/transformers/v6.0.0/.gitignore +0 -7
- package/.spago/tuples/v7.0.0/.gitignore +0 -7
- package/.spago/type-equality/v4.0.1/.gitignore +0 -7
- package/.spago/typelevel-prelude/v7.0.0/.gitignore +0 -8
- package/.spago/unfoldable/v6.0.0/.eslintrc.json +0 -26
- package/.spago/unfoldable/v6.0.0/.gitignore +0 -8
- package/.spago/unicode/v6.0.0/.editorconfig +0 -13
- package/.spago/unicode/v6.0.0/.gitattributes +0 -2
- package/.spago/unicode/v6.0.0/.gitignore +0 -19
- package/.spago/unicode/v6.0.0/.tidyrc.json +0 -10
- package/.spago/unsafe-coerce/v6.0.0/.eslintrc.json +0 -26
- package/.spago/unsafe-coerce/v6.0.0/.gitignore +0 -8
- package/.spago/web-dom/v6.0.0/.eslintrc.json +0 -29
- package/.spago/web-dom/v6.0.0/.gitignore +0 -9
- package/.spago/web-events/v4.0.0/.eslintrc.json +0 -29
- package/.spago/web-events/v4.0.0/.gitignore +0 -8
- package/.spago/web-file/v4.0.0/.eslintrc.json +0 -29
- package/.spago/web-file/v4.0.0/.gitignore +0 -8
- package/.spago/web-html/v4.0.0/.eslintrc.json +0 -29
- package/.spago/web-html/v4.0.0/.gitignore +0 -8
- package/.spago/web-storage/v5.0.0/.eslintrc.json +0 -29
- package/.spago/web-storage/v5.0.0/.gitignore +0 -8
- package/.spago/web-xhr/v5.0.0/.eslintrc.json +0 -29
- package/.spago/web-xhr/v5.0.0/.gitignore +0 -8
@@ -0,0 +1,301 @@
|
|
1
|
+
[
|
2
|
+
{ year: 2013, country: "BRA", energyType: "Bio", output: 39.27, capacity: 101.62},
|
3
|
+
{ year: 2013, country: "BRA", energyType: "Hydro", output: 390.99, capacity: 753.54},
|
4
|
+
{ year: 2013, country: "BRA", energyType: "Solar", output: 0.0, capacity: 0.09},
|
5
|
+
{ year: 2013, country: "BRA", energyType: "Wind", output: 6.58, capacity: 19.27},
|
6
|
+
|
7
|
+
{ year: 2013, country: "CHN", energyType: "Bio", output: 37.13, capacity: 38.46},
|
8
|
+
{ year: 2013, country: "CHN", energyType: "Hydro", output: 909.61, capacity: 2268.05},
|
9
|
+
{ year: 2013, country: "CHN", energyType: "Solar", output: 8.37, capacity: 155.58},
|
10
|
+
{ year: 2013, country: "CHN", energyType: "Wind", output: 138.26, capacity: 672.15},
|
11
|
+
|
12
|
+
{ year: 2013, country: "DEU", energyType: "Bio", output: 45.51, capacity: 61.58},
|
13
|
+
{ year: 2013, country: "DEU", energyType: "Hydro", output: 23.0, capacity: 48.97},
|
14
|
+
{ year: 2013, country: "DEU", energyType: "Solar", output: 30.62, capacity: 321.58},
|
15
|
+
{ year: 2013, country: "DEU", energyType: "Wind", output: 52.74, capacity: 293.28},
|
16
|
+
|
17
|
+
{ year: 2013, country: "FRA", energyType: "Bio", output: 5.68, capacity: 6.66},
|
18
|
+
{ year: 2013, country: "FRA", energyType: "Hydro", output: 71.92, capacity: 208.84},
|
19
|
+
{ year: 2013, country: "FRA", energyType: "Solar", output: 5.19, capacity: 46.25},
|
20
|
+
{ year: 2013, country: "FRA", energyType: "Wind", output: 16.13, capacity: 71.48},
|
21
|
+
|
22
|
+
{ year: 2013, country: "EGY", energyType: "Bio", output: 0.0, capacity: 0.61},
|
23
|
+
{ year: 2013, country: "EGY", energyType: "Hydro", output: 13.22, capacity: 24.53},
|
24
|
+
{ year: 2013, country: "EGY", energyType: "Solar", output: 0.11, capacity: 0.26},
|
25
|
+
{ year: 2013, country: "EGY", energyType: "Wind", output: 1.33, capacity: 4.91},
|
26
|
+
|
27
|
+
{ year: 2013, country: "IND", energyType: "Bio", output: 22.48, capacity: 35.74},
|
28
|
+
{ year: 2013, country: "IND", energyType: "Hydro", output: 131.98, capacity: 345.06},
|
29
|
+
{ year: 2013, country: "IND", energyType: "Solar", output: 3.43, capacity: 14.02},
|
30
|
+
{ year: 2013, country: "IND", energyType: "Wind", output: 30.01, capacity: 161.36},
|
31
|
+
|
32
|
+
{ year: 2013, country: "JPN", energyType: "Bio", output: 23.18, capacity: 5.78},
|
33
|
+
{ year: 2013, country: "JPN", energyType: "Hydro", output: 79.33, capacity: 243.62},
|
34
|
+
{ year: 2013, country: "JPN", energyType: "Solar", output: 12.91, capacity: 119.14},
|
35
|
+
{ year: 2013, country: "JPN", energyType: "Wind", output: 5.13, capacity: 23.21},
|
36
|
+
|
37
|
+
{ year: 2013, country: "MEX", energyType: "Bio", output: 6.89, capacity: 4.47},
|
38
|
+
{ year: 2013, country: "MEX", energyType: "Hydro", output: 27.72, capacity: 101.88},
|
39
|
+
{ year: 2013, country: "MEX", energyType: "Solar", output: 0.11, capacity: 0.96},
|
40
|
+
{ year: 2013, country: "MEX", energyType: "Wind", output: 4.17, capacity: 18.57},
|
41
|
+
|
42
|
+
{ year: 2013, country: "NGA", energyType: "Bio", output: 0.02, capacity: 0.09},
|
43
|
+
{ year: 2013, country: "NGA", energyType: "Hydro", output: 5.27, capacity: 18.48},
|
44
|
+
{ year: 2013, country: "NGA", energyType: "Solar", output: 0.02, capacity: 0.00},
|
45
|
+
{ year: 2013, country: "NGA", energyType: "Wind", output: 0.0, capacity: 0.00},
|
46
|
+
|
47
|
+
{ year: 2013, country: "USA", energyType: "Bio", output: 60.86, capacity: 97.85},
|
48
|
+
{ year: 2013, country: "USA", energyType: "Hydro", output: 263.88, capacity: 727.17},
|
49
|
+
{ year: 2013, country: "USA", energyType: "Solar", output: 9.04, capacity: 116.07},
|
50
|
+
{ year: 2013, country: "USA", energyType: "Wind", output: 167.84, capacity: 527.35},
|
51
|
+
|
52
|
+
{ year: 2014, country: "BRA", energyType: "Bio", output: 45.15, capacity: 108.10},
|
53
|
+
{ year: 2014, country: "BRA", energyType: "Hydro", output: 373.44, capacity: 781.30},
|
54
|
+
{ year: 2014, country: "BRA", energyType: "Solar", output: 0.02, capacity: 0.18},
|
55
|
+
{ year: 2014, country: "BRA", energyType: "Wind", output: 12.21, capacity: 42.84},
|
56
|
+
|
57
|
+
{ year: 2014, country: "CHN", energyType: "Bio", output: 46.27, capacity: 41.70},
|
58
|
+
{ year: 2014, country: "CHN", energyType: "Hydro", output: 1059.69, capacity: 2476.89},
|
59
|
+
{ year: 2014, country: "CHN", energyType: "Solar", output: 23.51, capacity: 248.78},
|
60
|
+
{ year: 2014, country: "CHN", energyType: "Wind", output: 159.76, capacity: 848.14},
|
61
|
+
|
62
|
+
{ year: 2014, country: "DEU", energyType: "Bio", output: 48.29, capacity: 63.60},
|
63
|
+
{ year: 2014, country: "DEU", energyType: "Hydro", output: 19.59, capacity: 48.88},
|
64
|
+
{ year: 2014, country: "DEU", energyType: "Solar", output: 35.45, capacity: 332.00},
|
65
|
+
{ year: 2014, country: "DEU", energyType: "Wind", output: 58.5, capacity: 338.22},
|
66
|
+
|
67
|
+
{ year: 2014, country: "FRA", energyType: "Bio", output: 5.99, capacity: 7.18},
|
68
|
+
{ year: 2014, country: "FRA", energyType: "Hydro", output: 63.77, capacity: 208.93},
|
69
|
+
{ year: 2014, country: "FRA", energyType: "Solar", output: 6.39, capacity: 52.82},
|
70
|
+
{ year: 2014, country: "FRA", energyType: "Wind", output: 17.32, capacity: 80.59},
|
71
|
+
|
72
|
+
{ year: 2014, country: "EGY", energyType: "Bio", output: 0.0, capacity: 0.61},
|
73
|
+
{ year: 2014, country: "EGY", energyType: "Hydro", output: 13.68, capacity: 24.53},
|
74
|
+
{ year: 2014, country: "EGY", energyType: "Solar", output: 0.24, capacity: 0.26},
|
75
|
+
{ year: 2014, country: "EGY", energyType: "Wind", output: 1.44, capacity: 4.91},
|
76
|
+
|
77
|
+
{ year: 2014, country: "IND", energyType: "Bio", output: 24.68, capacity: 43.01},
|
78
|
+
{ year: 2014, country: "IND", energyType: "Hydro", output: 139.0, capacity: 355.83},
|
79
|
+
{ year: 2014, country: "IND", energyType: "Solar", output: 4.91, capacity: 33.11},
|
80
|
+
{ year: 2014, country: "IND", energyType: "Wind", output: 33.45, capacity: 196.84},
|
81
|
+
|
82
|
+
{ year: 2014, country: "JPN", energyType: "Bio", output: 23.63, capacity: 6.57},
|
83
|
+
{ year: 2014, country: "JPN", energyType: "Hydro", output: 81.71, capacity: 244.14},
|
84
|
+
{ year: 2014, country: "JPN", energyType: "Solar", output: 23.55, capacity: 204.46},
|
85
|
+
{ year: 2014, country: "JPN", energyType: "Wind", output: 5.01, capacity: 24.09},
|
86
|
+
|
87
|
+
{ year: 2014, country: "MEX", energyType: "Bio", output: 6.62, capacity: 5.34},
|
88
|
+
{ year: 2014, country: "MEX", energyType: "Hydro", output: 38.55, capacity: 109.15},
|
89
|
+
{ year: 2014, country: "MEX", energyType: "Solar", output: 0.22, capacity: 1.49},
|
90
|
+
{ year: 2014, country: "MEX", energyType: "Wind", output: 6.35, capacity: 22.51},
|
91
|
+
|
92
|
+
{ year: 2014, country: "NGA", energyType: "Bio", output: 0.03, capacity: 0.09},
|
93
|
+
{ year: 2014, country: "NGA", energyType: "Hydro", output: 5.29, capacity: 18.48},
|
94
|
+
{ year: 2014, country: "NGA", energyType: "Solar", output: 0.02, capacity: 0.00},
|
95
|
+
{ year: 2014, country: "NGA", energyType: "Wind", output: 0.0, capacity: 0.00},
|
96
|
+
|
97
|
+
{ year: 2014, country: "USA", energyType: "Bio", output: 63.99, capacity: 98.99},
|
98
|
+
{ year: 2014, country: "USA", energyType: "Hydro", output: 253.19, capacity: 731.37},
|
99
|
+
{ year: 2014, country: "USA", energyType: "Solar", output: 28.92, capacity: 158.64},
|
100
|
+
{ year: 2014, country: "USA", energyType: "Wind", output: 181.65, capacity: 564.41},
|
101
|
+
|
102
|
+
{ year: 2015, country: "BRA", energyType: "Bio", output: 47.54, capacity: 116.60},
|
103
|
+
{ year: 2015, country: "BRA", energyType: "Hydro", output: 359.74, capacity: 802.85},
|
104
|
+
{ year: 2015, country: "BRA", energyType: "Solar", output: 0.06, capacity: 0.44},
|
105
|
+
{ year: 2015, country: "BRA", energyType: "Wind", output: 21.47, capacity: 66.84},
|
106
|
+
|
107
|
+
{ year: 2015, country: "CHN", energyType: "Bio", output: 54.07, capacity: 49.41},
|
108
|
+
{ year: 2015, country: "CHN", energyType: "Hydro", output: 1114.52, capacity: 2597.34},
|
109
|
+
{ year: 2015, country: "CHN", energyType: "Solar", output: 39.48, capacity: 381.50},
|
110
|
+
{ year: 2015, country: "CHN", energyType: "Wind", output: 185.59, capacity: 1148.00},
|
111
|
+
|
112
|
+
{ year: 2015, country: "DEU", energyType: "Bio", output: 50.33, capacity: 65.44},
|
113
|
+
{ year: 2015, country: "DEU", energyType: "Hydro", output: 18.98, capacity: 48.97},
|
114
|
+
{ year: 2015, country: "DEU", energyType: "Solar", output: 38.08, capacity: 343.57},
|
115
|
+
{ year: 2015, country: "DEU", energyType: "Wind", output: 80.62, capacity: 390.52},
|
116
|
+
|
117
|
+
{ year: 2015, country: "FRA", energyType: "Bio", output: 6.53, capacity: 8.15},
|
118
|
+
{ year: 2015, country: "FRA", energyType: "Hydro", output: 55.56, capacity: 208.66},
|
119
|
+
{ year: 2015, country: "FRA", energyType: "Solar", output: 7.75, capacity: 62.55},
|
120
|
+
{ year: 2015, country: "FRA", energyType: "Wind", output: 21.42, capacity: 90.23},
|
121
|
+
|
122
|
+
{ year: 2015, country: "EGY", energyType: "Bio", output: 0.0, capacity: 0.61},
|
123
|
+
{ year: 2015, country: "EGY", energyType: "Hydro", output: 13.41, capacity: 24.53},
|
124
|
+
{ year: 2015, country: "EGY", energyType: "Solar", output: 0.17, capacity: 0.35},
|
125
|
+
{ year: 2015, country: "EGY", energyType: "Wind", output: 2.06, capacity: 6.57},
|
126
|
+
|
127
|
+
{ year: 2015, country: "IND", energyType: "Bio", output: 30.62, capacity: 46.78},
|
128
|
+
{ year: 2015, country: "IND", energyType: "Hydro", output: 133.28, capacity: 370.72},
|
129
|
+
{ year: 2015, country: "IND", energyType: "Solar", output: 6.57, capacity: 49.93},
|
130
|
+
{ year: 2015, country: "IND", energyType: "Wind", output: 32.74, capacity: 219.79},
|
131
|
+
|
132
|
+
{ year: 2015, country: "JPN", energyType: "Bio", output: 28.49, capacity: 8.76},
|
133
|
+
{ year: 2015, country: "JPN", energyType: "Hydro", output: 85.77, capacity: 246.24},
|
134
|
+
{ year: 2015, country: "JPN", energyType: "Solar", output: 34.54, capacity: 299.15},
|
135
|
+
{ year: 2015, country: "JPN", energyType: "Wind", output: 5.22, capacity: 24.62},
|
136
|
+
|
137
|
+
{ year: 2015, country: "MEX", energyType: "Bio", output: 7.12, capacity: 6.31},
|
138
|
+
{ year: 2015, country: "MEX", energyType: "Hydro", output: 30.61, capacity: 107.05},
|
139
|
+
{ year: 2015, country: "MEX", energyType: "Solar", output: 0.24, capacity: 2.54},
|
140
|
+
{ year: 2015, country: "MEX", energyType: "Wind", output: 8.45, capacity: 28.65},
|
141
|
+
|
142
|
+
{ year: 2015, country: "NGA", energyType: "Bio", output: 0.02, capacity: 0.09},
|
143
|
+
{ year: 2015, country: "NGA", energyType: "Hydro", output: 5.66, capacity: 18.48},
|
144
|
+
{ year: 2015, country: "NGA", energyType: "Solar", output: 0.03, capacity: 0.09},
|
145
|
+
{ year: 2015, country: "NGA", energyType: "Wind", output: 0.0, capacity: 0.00},
|
146
|
+
|
147
|
+
{ year: 2015, country: "USA", energyType: "Bio", output: 63.63, capacity: 103.81},
|
148
|
+
{ year: 2015, country: "USA", energyType: "Hydro", output: 243.99, capacity: 731.46},
|
149
|
+
{ year: 2015, country: "USA", energyType: "Solar", output: 39.03, capacity: 212.34},
|
150
|
+
{ year: 2015, country: "USA", energyType: "Wind", output: 190.72, capacity: 637.47},
|
151
|
+
|
152
|
+
{ year: 2016, country: "BRA", energyType: "Bio", output: 49.14, capacity: 124.22},
|
153
|
+
{ year: 2016, country: "BRA", energyType: "Hydro", output: 380.91, capacity: 849.11},
|
154
|
+
{ year: 2016, country: "BRA", energyType: "Solar", output: 0.08, capacity: 1.14},
|
155
|
+
{ year: 2016, country: "BRA", energyType: "Wind", output: 33.24, capacity: 88.74},
|
156
|
+
|
157
|
+
{ year: 2016, country: "CHN", energyType: "Bio", output: 62.13, capacity: 56.06},
|
158
|
+
{ year: 2016, country: "CHN", energyType: "Hydro", output: 1153.27, capacity: 2675.13},
|
159
|
+
{ year: 2016, country: "CHN", energyType: "Solar", output: 66.53, capacity: 681.70},
|
160
|
+
{ year: 2016, country: "CHN", energyType: "Wind", output: 240.86, capacity: 1301.04},
|
161
|
+
|
162
|
+
{ year: 2016, country: "DEU", energyType: "Bio", output: 50.93, capacity: 67.28},
|
163
|
+
{ year: 2016, country: "DEU", energyType: "Hydro", output: 20.55, capacity: 49.32},
|
164
|
+
{ year: 2016, country: "DEU", energyType: "Solar", output: 37.56, capacity: 356.36},
|
165
|
+
{ year: 2016, country: "DEU", energyType: "Wind", output: 79.92, capacity: 433.09},
|
166
|
+
|
167
|
+
{ year: 2016, country: "FRA", energyType: "Bio", output: 7.52, capacity: 9.11},
|
168
|
+
{ year: 2016, country: "FRA", energyType: "Hydro", output: 60.84, capacity: 209.28},
|
169
|
+
{ year: 2016, country: "FRA", energyType: "Solar", output: 8.66, capacity: 67.45},
|
170
|
+
{ year: 2016, country: "FRA", energyType: "Wind", output: 21.38, capacity: 101.35},
|
171
|
+
|
172
|
+
{ year: 2016, country: "EGY", energyType: "Bio", output: 0.0, capacity: 0.61},
|
173
|
+
{ year: 2016, country: "EGY", energyType: "Hydro", output: 12.72, capacity: 24.53},
|
174
|
+
{ year: 2016, country: "EGY", energyType: "Solar", output: 0.58, capacity: 0.53},
|
175
|
+
{ year: 2016, country: "EGY", energyType: "Wind", output: 2.2, capacity: 6.57},
|
176
|
+
|
177
|
+
{ year: 2016, country: "IND", energyType: "Bio", output: 24.82, capacity: 76.74},
|
178
|
+
{ year: 2016, country: "IND", energyType: "Hydro", output: 128.38, capacity: 375.28},
|
179
|
+
{ year: 2016, country: "IND", energyType: "Solar", output: 11.56, capacity: 87.42},
|
180
|
+
{ year: 2016, country: "IND", energyType: "Wind", output: 43.45, capacity: 251.41},
|
181
|
+
|
182
|
+
{ year: 2016, country: "JPN", energyType: "Bio", output: 23.67, capacity: 11.30},
|
183
|
+
{ year: 2016, country: "JPN", energyType: "Hydro", output: 79.43, capacity: 246.68},
|
184
|
+
{ year: 2016, country: "JPN", energyType: "Solar", output: 43.33, capacity: 368.27},
|
185
|
+
{ year: 2016, country: "JPN", energyType: "Wind", output: 5.34, capacity: 28.12},
|
186
|
+
|
187
|
+
{ year: 2016, country: "MEX", energyType: "Bio", output: 7.02, capacity: 7.36},
|
188
|
+
{ year: 2016, country: "MEX", energyType: "Hydro", output: 29.74, capacity: 110.20},
|
189
|
+
{ year: 2016, country: "MEX", energyType: "Solar", output: 0.46, capacity: 5.52},
|
190
|
+
{ year: 2016, country: "MEX", energyType: "Wind", output: 9.93, capacity: 35.48},
|
191
|
+
|
192
|
+
{ year: 2016, country: "NGA", energyType: "Bio", output: 0.02, capacity: 0.09},
|
193
|
+
{ year: 2016, country: "NGA", energyType: "Hydro", output: 8.07, capacity: 18.48},
|
194
|
+
{ year: 2016, country: "NGA", energyType: "Solar", output: 0.03, capacity: 0.09},
|
195
|
+
{ year: 2016, country: "NGA", energyType: "Wind", output: 0.0, capacity: 0.00},
|
196
|
+
|
197
|
+
{ year: 2016, country: "USA", energyType: "Bio", output: 62.76, capacity: 103.19},
|
198
|
+
{ year: 2016, country: "USA", energyType: "Hydro", output: 261.13, capacity: 734.26},
|
199
|
+
{ year: 2016, country: "USA", energyType: "Solar", output: 54.87, capacity: 310.37},
|
200
|
+
{ year: 2016, country: "USA", energyType: "Wind", output: 226.99, capacity: 713.94},
|
201
|
+
|
202
|
+
{ year: 2017, country: "BRA", energyType: "Bio", output: 50.6, capacity: 127.63},
|
203
|
+
{ year: 2017, country: "BRA", energyType: "Hydro", output: 370.91, capacity: 878.89},
|
204
|
+
{ year: 2017, country: "BRA", energyType: "Solar", output: 0.83, capacity: 10.60},
|
205
|
+
{ year: 2017, country: "BRA", energyType: "Wind", output: 42.06, capacity: 107.75},
|
206
|
+
|
207
|
+
{ year: 2017, country: "CHN", energyType: "Bio", output: 79.6, capacity: 66.49},
|
208
|
+
{ year: 2017, country: "CHN", energyType: "Hydro", output: 1165.06, capacity: 2753.97},
|
209
|
+
{ year: 2017, country: "CHN", energyType: "Solar", output: 117.8, capacity: 1146.07},
|
210
|
+
{ year: 2017, country: "CHN", energyType: "Wind", output: 304.6, capacity: 1439.88},
|
211
|
+
|
212
|
+
{ year: 2017, country: "DEU", energyType: "Bio", output: 50.92, capacity: 69.90},
|
213
|
+
{ year: 2017, country: "DEU", energyType: "Hydro", output: 20.15, capacity: 49.32},
|
214
|
+
{ year: 2017, country: "DEU", energyType: "Solar", output: 38.76, capacity: 370.46},
|
215
|
+
{ year: 2017, country: "DEU", energyType: "Wind", output: 105.69, capacity: 486.88},
|
216
|
+
|
217
|
+
{ year: 2017, country: "FRA", energyType: "Bio", output: 7.78, capacity: 9.55},
|
218
|
+
{ year: 2017, country: "FRA", energyType: "Hydro", output: 50.0, capacity: 210.06},
|
219
|
+
{ year: 2017, country: "FRA", energyType: "Solar", output: 9.59, capacity: 75.42},
|
220
|
+
{ year: 2017, country: "FRA", energyType: "Wind", output: 24.61, capacity: 118.26},
|
221
|
+
|
222
|
+
{ year: 2017, country: "EGY", energyType: "Bio", output: 0.0, capacity: 0.61},
|
223
|
+
{ year: 2017, country: "EGY", energyType: "Hydro", output: 12.6, capacity: 24.53},
|
224
|
+
{ year: 2017, country: "EGY", energyType: "Solar", output: 0.6, capacity: 1.58},
|
225
|
+
{ year: 2017, country: "EGY", energyType: "Wind", output: 2.33, capacity: 6.57},
|
226
|
+
|
227
|
+
{ year: 2017, country: "IND", energyType: "Bio", output: 24.91, capacity: 81.21},
|
228
|
+
{ year: 2017, country: "IND", energyType: "Hydro", output: 135.82, capacity: 391.92},
|
229
|
+
{ year: 2017, country: "IND", energyType: "Solar", output: 21.54, capacity: 159.96},
|
230
|
+
{ year: 2017, country: "IND", energyType: "Wind", output: 52.63, capacity: 287.77},
|
231
|
+
|
232
|
+
{ year: 2017, country: "JPN", energyType: "Bio", output: 27.39, capacity: 14.63},
|
233
|
+
{ year: 2017, country: "JPN", energyType: "Hydro", output: 79.29, capacity: 246.33},
|
234
|
+
{ year: 2017, country: "JPN", energyType: "Solar", output: 54.24, capacity: 433.62},
|
235
|
+
{ year: 2017, country: "JPN", energyType: "Wind", output: 5.83, capacity: 30.48},
|
236
|
+
|
237
|
+
{ year: 2017, country: "MEX", energyType: "Bio", output: 7.4, capacity: 7.62},
|
238
|
+
{ year: 2017, country: "MEX", energyType: "Hydro", output: 31.74, capacity: 110.64},
|
239
|
+
{ year: 2017, country: "MEX", energyType: "Solar", output: 1.07, capacity: 9.90},
|
240
|
+
{ year: 2017, country: "MEX", energyType: "Wind", output: 9.91, capacity: 36.62},
|
241
|
+
|
242
|
+
{ year: 2017, country: "NGA", energyType: "Bio", output: 0.02, capacity: 0.09},
|
243
|
+
{ year: 2017, country: "NGA", energyType: "Hydro", output: 7.67, capacity: 18.48},
|
244
|
+
{ year: 2017, country: "NGA", energyType: "Solar", output: 0.03, capacity: 0.18},
|
245
|
+
{ year: 2017, country: "NGA", energyType: "Wind", output: 0.0, capacity: 0.00},
|
246
|
+
|
247
|
+
{ year: 2017, country: "USA", energyType: "Bio", output: 62.73, capacity: 102.67},
|
248
|
+
{ year: 2017, country: "USA", energyType: "Hydro", output: 293.84, capacity: 734.00},
|
249
|
+
{ year: 2017, country: "USA", energyType: "Solar", output: 77.28, capacity: 383.43},
|
250
|
+
{ year: 2017, country: "USA", energyType: "Wind", output: 254.3, capacity: 769.39},
|
251
|
+
|
252
|
+
{ year: 2018, country: "BRA", energyType: "Bio", output: 52.13, capacity: 129.74},
|
253
|
+
{ year: 2018, country: "BRA", energyType: "Hydro", output: 388.97, capacity: 915.24},
|
254
|
+
{ year: 2018, country: "BRA", energyType: "Solar", output: 3.44, capacity: 21.37},
|
255
|
+
{ year: 2018, country: "BRA", energyType: "Wind", output: 48.12, capacity: 130.00},
|
256
|
+
|
257
|
+
{ year: 2018, country: "CHN", energyType: "Bio", output: 93.73, capacity: 75.86},
|
258
|
+
{ year: 2018, country: "CHN", energyType: "Hydro", output: 1198.89, capacity: 2823.09},
|
259
|
+
{ year: 2018, country: "CHN", energyType: "Solar", output: 176.9, capacity: 1535.28},
|
260
|
+
{ year: 2018, country: "CHN", energyType: "Wind", output: 365.8, capacity: 1617.62},
|
261
|
+
|
262
|
+
{ year: 2018, country: "DEU", energyType: "Bio", output: 50.79, capacity: 75.34},
|
263
|
+
{ year: 2018, country: "DEU", energyType: "Hydro", output: 17.69, capacity: 46.69},
|
264
|
+
{ year: 2018, country: "DEU", energyType: "Solar", output: 44.32, capacity: 395.60},
|
265
|
+
{ year: 2018, country: "DEU", energyType: "Wind", output: 109.95, capacity: 514.39},
|
266
|
+
|
267
|
+
{ year: 2018, country: "FRA", energyType: "Bio", output: 8.38, capacity: 11.48},
|
268
|
+
{ year: 2018, country: "FRA", energyType: "Hydro", output: 65.11, capacity: 210.24},
|
269
|
+
{ year: 2018, country: "FRA", energyType: "Solar", output: 10.81, capacity: 84.71},
|
270
|
+
{ year: 2018, country: "FRA", energyType: "Wind", output: 28.6, capacity: 130.52},
|
271
|
+
|
272
|
+
{ year: 2018, country: "EGY", energyType: "Bio", output: 0.0, capacity: 0.61},
|
273
|
+
{ year: 2018, country: "EGY", energyType: "Hydro", output: 12.77, capacity: 24.79},
|
274
|
+
{ year: 2018, country: "EGY", energyType: "Solar", output: 1.52, capacity: 6.66},
|
275
|
+
{ year: 2018, country: "EGY", energyType: "Wind", output: 3.02, capacity: 9.90},
|
276
|
+
|
277
|
+
{ year: 2018, country: "IND", energyType: "Bio", output: 27.22, capacity: 87.42},
|
278
|
+
{ year: 2018, country: "IND", energyType: "Hydro", output: 139.75, capacity: 397.00},
|
279
|
+
{ year: 2018, country: "IND", energyType: "Solar", output: 36.33, capacity: 240.72},
|
280
|
+
{ year: 2018, country: "IND", energyType: "Wind", output: 60.31, capacity: 309.14},
|
281
|
+
|
282
|
+
{ year: 2018, country: "JPN", energyType: "Bio", output: 30.13, capacity: 18.22},
|
283
|
+
{ year: 2018, country: "JPN", energyType: "Hydro", output: 81.11, capacity: 246.51},
|
284
|
+
{ year: 2018, country: "JPN", energyType: "Solar", output: 62.11, capacity: 491.96},
|
285
|
+
{ year: 2018, country: "JPN", energyType: "Wind", output: 6.44, capacity: 30.66},
|
286
|
+
|
287
|
+
{ year: 2018, country: "MEX", energyType: "Bio", output: 6.85, capacity: 7.62},
|
288
|
+
{ year: 2018, country: "MEX", energyType: "Hydro", output: 32.3, capacity: 110.73},
|
289
|
+
{ year: 2018, country: "MEX", energyType: "Solar", output: 1.36, capacity: 22.60},
|
290
|
+
{ year: 2018, country: "MEX", energyType: "Wind", output: 12.53, capacity: 36.62},
|
291
|
+
|
292
|
+
{ year: 2018, country: "NGA", energyType: "Bio", output: 0.02, capacity: 0.09},
|
293
|
+
{ year: 2018, country: "NGA", energyType: "Hydro", output: 7.69, capacity: 18.48},
|
294
|
+
{ year: 2018, country: "NGA", energyType: "Solar", output: 0.03, capacity: 0.18},
|
295
|
+
{ year: 2018, country: "NGA", energyType: "Wind", output: 0.0, capacity: 0.00},
|
296
|
+
|
297
|
+
{ year: 2018, country: "USA", energyType: "Bio", output: 61.83, capacity: 100.74},
|
298
|
+
{ year: 2018, country: "USA", energyType: "Hydro", output: 286.62, capacity: 734.79},
|
299
|
+
{ year: 2018, country: "USA", energyType: "Solar", output: 93.36, capacity: 455.43},
|
300
|
+
{ year: 2018, country: "USA", energyType: "Wind", output: 272.67, capacity: 829.31}
|
301
|
+
]
|
@@ -0,0 +1,17 @@
|
|
1
|
+
[
|
2
|
+
{model: "LSTM", time_s: 99.0, acc: 80.72, param: 5977},
|
3
|
+
{model: "BiLSTM", time_s: 106, acc: 81.73, param: 7059},
|
4
|
+
{model: "2 stacked BiLSTM", time_s: 207, acc: 81.97, param: 9221},
|
5
|
+
{model: "3 stacked BiLSTM", time_s: 310, acc: 81.53, param: 11383},
|
6
|
+
{model: "4 stacked BiLSTM", time_s: 411, acc: 81.37, param: 13546},
|
7
|
+
{model: "S-LSTM", time_s: 65, acc: 82.64, param: 8768},
|
8
|
+
{model: "CNN", time_s: 34, acc: 80.35, param: 5637},
|
9
|
+
{model: "2 stacked CNN", time_s: 40, acc: 80.97, param: 5717},
|
10
|
+
{model: "3 stacked CNN", time_s: 47, acc: 81.46, param: 5808},
|
11
|
+
{model: "4 stacked CNN", time_s: 51, acc: 81.39, param: 5855},
|
12
|
+
{model: "Transformer (N=6)", time_s: 138, acc: 81.03, param: 7234},
|
13
|
+
{model: "Transformer (N=8)", time_s: 174, acc: 81.86, param: 7615},
|
14
|
+
{model: "Transformer (N=10)", time_s: 214, acc: 81.63, param: 8004},
|
15
|
+
{model: "BiLSTM+Attention", time_s: 126, acc: 82.37, param: 7419},
|
16
|
+
{model: "S-LSTM+Attention", time_s: 87, acc: "83.07*", param: 8858}
|
17
|
+
]
|
@@ -0,0 +1,19 @@
|
|
1
|
+
let nthPad n xs =
|
2
|
+
nth (min (max n 0) (length xs - 1)) xs;
|
3
|
+
movingAvg ys window =
|
4
|
+
[ sum [ nthPad n ys | n <- [ i - window .. i + window ] ] / (1 + 2 * window)
|
5
|
+
| i <- [ 0 .. length ys - 1 ] ];
|
6
|
+
movingAvg' rs window =
|
7
|
+
zipWith
|
8
|
+
(fun x y -> {x: x, y: y})
|
9
|
+
(map (fun r -> r.x) rs)
|
10
|
+
(movingAvg (map (fun r -> r.y) rs) window);
|
11
|
+
let points =
|
12
|
+
[ { x: r.year, y: r.emissions } | r <- methane, r.type == "Agriculture" ]
|
13
|
+
in LineChart {
|
14
|
+
tickLabels: { x: Rotated, y: Default },
|
15
|
+
size: { width: 330, height: 285 },
|
16
|
+
caption: "SSP5-8.5 projected methane emissions (Agriculture)",
|
17
|
+
plots: [ LinePlot { name: "Moving average", points: movingAvg' points 1 },
|
18
|
+
LinePlot { name: "Original curve", points: points } ]
|
19
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
let countries = ["BRA", "EGY", "IND", "JPN"];
|
2
|
+
let totalFor year country =
|
3
|
+
let [ row ] = [ row | row <- nonRenewables, row.year == year, row.country == country ]
|
4
|
+
in row.nuclearOut + row.gasOut + row.coalOut + row.petrolOut;
|
5
|
+
let stack year = [ { y: country, z: totalFor year country } | country <- countries ];
|
6
|
+
let yearData year = [ row | row <- nonRenewables, row.year == year, row.country `elem` countries ]
|
7
|
+
in MultiView {
|
8
|
+
barChart: BarChart {
|
9
|
+
caption: "Non-renewables output",
|
10
|
+
size: { width: 275, height: 185 },
|
11
|
+
stackedBars: [ { x: numToStr year, segments: stack year } | year <- [2014..2018] ]
|
12
|
+
},
|
13
|
+
scatterPlot: ScatterPlot {
|
14
|
+
caption: "",
|
15
|
+
points: [ {
|
16
|
+
x: sum [ row.nuclearOut | row <- yearData year ],
|
17
|
+
y: sum [ row.nuclearCap | row <- yearData year ]
|
18
|
+
} | year <- [2014..2018] ],
|
19
|
+
labels: { x: "Nuclear capacity", y: "Nuclear output" }
|
20
|
+
}
|
21
|
+
}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
let ordinalMap = [
|
2
|
+
{ lastDigit: 1, suffix: "st" },
|
3
|
+
{ lastDigit: 2, suffix: "nd" },
|
4
|
+
{ lastDigit: 3, suffix: "rd" }
|
5
|
+
];
|
6
|
+
|
7
|
+
let ordinal n =
|
8
|
+
if n <= 0 then error "n <= 0 not supported"
|
9
|
+
else if (n < 4) then
|
10
|
+
(findWithKey' "lastDigit" n ordinalMap).suffix
|
11
|
+
else if (n >= 4) `and` (n <= 20) then "th"
|
12
|
+
else error "n > 20 not supported";
|
13
|
+
|
14
|
+
let rankLabel word n =
|
15
|
+
if n == 1 then word
|
16
|
+
else ordinal n ++ "-" ++ word;
|
17
|
+
|
18
|
+
let trendWord n1 n2 compareWord =
|
19
|
+
compareWord (compare n1 n2);
|
20
|
+
|
21
|
+
let growShrink EQ = "unchanging";
|
22
|
+
growShrink LT = "shrinking";
|
23
|
+
growShrink GT = "growing";
|
24
|
+
|
25
|
+
let smallerHigher EQ = "equal";
|
26
|
+
smallerHigher LT = "smaller";
|
27
|
+
smallerHigher GT = "larger";
|
28
|
+
|
29
|
+
let shorterLonger EQ = "equal";
|
30
|
+
shorterLonger LT = "shorter";
|
31
|
+
shorterLonger GT = "longer";
|
32
|
+
|
33
|
+
let betterWorse EQ = "equal";
|
34
|
+
betterWorse LT = "worse";
|
35
|
+
betterWorse GT = "better";
|
36
|
+
|
37
|
+
let underOverPerforming EQ = "equal performance to that of";
|
38
|
+
underOverPerforming LT = "underperforming";
|
39
|
+
underOverPerforming GT = "outperforming";
|
40
|
+
|
41
|
+
-- (a -> Number) -> List a -> a
|
42
|
+
let maximumBy f lst =
|
43
|
+
let helper [] current = current;
|
44
|
+
helper (x: xs) current =
|
45
|
+
if f x > f current then helper xs x else helper xs current
|
46
|
+
in match lst as {
|
47
|
+
[] -> error "Empty list!";
|
48
|
+
(x: xs) -> helper xs x
|
49
|
+
};
|
50
|
+
|
@@ -0,0 +1,36 @@
|
|
1
|
+
let insert cmp x sorted =
|
2
|
+
let helper [] = [x];
|
3
|
+
helper (y: ys) =
|
4
|
+
if cmp x y
|
5
|
+
then x : (y: ys)
|
6
|
+
else y : helper ys
|
7
|
+
in helper sorted;
|
8
|
+
|
9
|
+
let insertionSort cmp lst =
|
10
|
+
let helper [] sorted = sorted;
|
11
|
+
helper (x: xs) sorted = helper xs (insert cmp x sorted)
|
12
|
+
in helper lst [];
|
13
|
+
|
14
|
+
let findIndex fName x ys =
|
15
|
+
let helper [] rank = -1;
|
16
|
+
helper (y: ys') rank =
|
17
|
+
if y.[fName] == x then rank
|
18
|
+
else helper ys' (rank + 1)
|
19
|
+
in helper ys 1;
|
20
|
+
|
21
|
+
let findWithKey' fName x table =
|
22
|
+
fromSome (findWithKey fName x table);
|
23
|
+
|
24
|
+
let findWhere pred table =
|
25
|
+
fromSome (find pred table);
|
26
|
+
|
27
|
+
let cmpTime a b = a.time_s < b.time_s;
|
28
|
+
let cmpParam a b = a.param < b.param;
|
29
|
+
|
30
|
+
-- (a -> Number) -> List a -> a
|
31
|
+
let maximumBy f [] = error "Empty list!";
|
32
|
+
maximumBy f (x: xs) =
|
33
|
+
let helper [] current = current;
|
34
|
+
helper (y: ys) current =
|
35
|
+
if f y > f current then helper ys y else helper ys current
|
36
|
+
in helper xs x;
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
7
|
+
<title>Fluid Article Examples</title>
|
8
|
+
<link href="css/styles.css" rel="stylesheet" type="text/css">
|
9
|
+
<script src="https://kit.fontawesome.com/20cf8b42c0.js" crossorigin="anonymous"></script>
|
10
|
+
</head>
|
11
|
+
<body>
|
12
|
+
|
13
|
+
<div class="grid-container double-size">
|
14
|
+
<div></div>
|
15
|
+
<div></div>
|
16
|
+
<div class="flex-left-align">
|
17
|
+
<div></div>
|
18
|
+
<h2>Fluid Article Demos</h2>
|
19
|
+
|
20
|
+
<a href="non-renewables">Non-renewable energy</a><br>
|
21
|
+
<a href="moving-average">Moving average</a><br>
|
22
|
+
<a href="convolution">Matrix convolution</a><br>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,57 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<link rel="icon" href="../favicon.ico" type="image/x-icon">
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
8
|
+
<title>Fluid: Data-Linked Visualisations</title>
|
9
|
+
<link href="../css/styles.css" rel="stylesheet" type="text/css">
|
10
|
+
<link href="../css/view-styles.css" rel="stylesheet" type="text/css">
|
11
|
+
<script src="https://kit.fontawesome.com/20cf8b42c0.js" crossorigin="anonymous"></script>
|
12
|
+
<script src="../shared/util.js"></script>
|
13
|
+
<style>
|
14
|
+
:root {
|
15
|
+
--text-pane-width: 400px;
|
16
|
+
}
|
17
|
+
.data-pane {
|
18
|
+
max-width: 300px;
|
19
|
+
}
|
20
|
+
</style>
|
21
|
+
</head>
|
22
|
+
<body>
|
23
|
+
<div id="grid" class="grid-container data-pane-hidden">
|
24
|
+
<div></div>
|
25
|
+
<div></div>
|
26
|
+
<div class="flex-left-align">
|
27
|
+
<h4>Moving Average</h4>
|
28
|
+
<p>The following chart shows a moving average (or rolling average) plot for methane
|
29
|
+
emissions under projected emissions scenario <a
|
30
|
+
href="https://en.wikipedia.org/wiki/Shared_Socioeconomic_Pathways">SSP5-8.5</a>.
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<div class="flex-right-align data-pane">
|
34
|
+
<p>Every <code>year</code> value is used in both the original curve and its moving average.
|
35
|
+
|
36
|
+
<div id="fig-input"></div>
|
37
|
+
|
38
|
+
<p>With <code>emissions</code>, each value contributes to
|
39
|
+
<span class="highlight">one</span> point in the original curve but <span class="highlight">three</span>
|
40
|
+
in the moving average.</p>
|
41
|
+
</div>
|
42
|
+
<div onclick="toggleDataPane('grid')">
|
43
|
+
<i class="data-pane-button toggle-button fa-solid fa-eye-slash"></i>
|
44
|
+
</div>
|
45
|
+
<div class="flex-left-align">
|
46
|
+
<div id="fig">
|
47
|
+
<div class="fig-loading">loading figure(s)</div>
|
48
|
+
</div>
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
<script type="module">
|
53
|
+
import { loadFigure } from "../shared/load-figure.js"
|
54
|
+
loadFigure("spec.json")()
|
55
|
+
</script>
|
56
|
+
</body>
|
57
|
+
</html>
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<link rel="icon" href="../favicon.ico" type="image/x-icon">
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
8
|
+
<title>Fluid: Data-Linked Visualisations</title>
|
9
|
+
<link href="../css/styles.css" rel="stylesheet" type="text/css">
|
10
|
+
<link href="../css/view-styles.css" rel="stylesheet" type="text/css">
|
11
|
+
<script src="https://kit.fontawesome.com/20cf8b42c0.js" crossorigin="anonymous"></script>
|
12
|
+
<script src="../shared/util.js"></script>
|
13
|
+
<style>
|
14
|
+
.data-pane {
|
15
|
+
max-width: 475px;
|
16
|
+
}
|
17
|
+
</style>
|
18
|
+
</head>
|
19
|
+
<body>
|
20
|
+
|
21
|
+
<div id="grid" class="grid-container data-pane-hidden">
|
22
|
+
<div></div>
|
23
|
+
<div></div>
|
24
|
+
<div class="flex-left-align">
|
25
|
+
<h4>Non-Renewable Energy plots</h4>
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<div class="flex-right-align data-pane">
|
29
|
+
<div id="fig-input"></div>
|
30
|
+
</div>
|
31
|
+
<div onclick="toggleDataPane('grid')">
|
32
|
+
<i class="data-pane-button toggle-button fa-solid fa-eye-slash"></i>
|
33
|
+
</div>
|
34
|
+
<div class="flex-left-align">
|
35
|
+
<div id="fig">
|
36
|
+
<div class="fig-loading">loading figure(s)</div>
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<script type="module">
|
42
|
+
import { drawCode, loadFigure } from "../shared/load-figure.js"
|
43
|
+
loadFigure("spec.json")()
|
44
|
+
</script>
|
45
|
+
</body>
|
46
|
+
</html>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { runTests, testURL, waitFor } from "./shared/webtest-lib.js"
|
2
|
+
|
3
|
+
export const main = async () => {
|
4
|
+
await runTests(testURL("convolution")([ page => waitFor("svg#fig-output")(page) ]))()
|
5
|
+
await runTests(testURL("moving-average")([ page => waitFor("svg")(page) ]))()
|
6
|
+
await runTests(testURL("non-renewables")([
|
7
|
+
page => waitFor("#fig-output > svg:nth-child(1)")(page),
|
8
|
+
page => waitFor("#fig-output > svg:nth-child(2)")(page),
|
9
|
+
]))()
|
10
|
+
}
|