@explorable-viz/fluid 0.7.64 → 0.7.65
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/fluid/fluid/lib/graphics.fld +6 -6
- package/dist/fluid/shared/fluid.mjs +4 -3
- package/dist/fluid/shared/load-figure.js +338 -168
- package/package.json +3 -2
- package/script/bundle-website.sh +4 -1
- package/dist/fluid/fluid/dataset/methane-emissions.fld +0 -123
- package/dist/fluid/fluid/dataset/mini-non-renewables.fld +0 -3
- package/dist/fluid/fluid/dataset/mini-renewables.fld +0 -6
- package/dist/fluid/fluid/dataset/non-renewables.fld +0 -67
- package/dist/fluid/fluid/dataset/renewables-new.fld +0 -301
- package/dist/fluid/fluid/dataset/renewables-restricted.fld +0 -139
- package/dist/fluid/fluid/dataset/renewables.fld +0 -100
- package/dist/fluid/fluid/dataset/ssp126-2081-2100.fld +0 -194
- package/dist/fluid/fluid/example/arithmetic.fld +0 -1
- package/dist/fluid/fluid/example/array.fld +0 -2
- package/dist/fluid/fluid/example/compose.fld +0 -2
- package/dist/fluid/fluid/example/desugar/list-comp-1.fld +0 -1
- package/dist/fluid/fluid/example/desugar/list-comp-10.fld +0 -1
- package/dist/fluid/fluid/example/desugar/list-comp-2.fld +0 -1
- package/dist/fluid/fluid/example/desugar/list-comp-3.fld +0 -1
- package/dist/fluid/fluid/example/desugar/list-comp-4.fld +0 -1
- package/dist/fluid/fluid/example/desugar/list-comp-5.fld +0 -1
- package/dist/fluid/fluid/example/desugar/list-comp-6.fld +0 -1
- package/dist/fluid/fluid/example/desugar/list-comp-7.fld +0 -1
- package/dist/fluid/fluid/example/desugar/list-comp-8.fld +0 -1
- package/dist/fluid/fluid/example/desugar/list-comp-9.fld +0 -1
- package/dist/fluid/fluid/example/desugar/list-enum.fld +0 -1
- package/dist/fluid/fluid/example/dict-list-comp.fld +0 -1
- package/dist/fluid/fluid/example/dicts.fld +0 -10
- package/dist/fluid/fluid/example/div-mod-quot-rem.fld +0 -4
- package/dist/fluid/fluid/example/factorial.fld +0 -6
- package/dist/fluid/fluid/example/filter.fld +0 -1
- package/dist/fluid/fluid/example/first-class-constr.fld +0 -1
- package/dist/fluid/fluid/example/flatten.fld +0 -12
- package/dist/fluid/fluid/example/foldr-sumSquares.fld +0 -1
- package/dist/fluid/fluid/example/graphics/background.fld +0 -7
- package/dist/fluid/fluid/example/graphics/grouped-bar-chart.fld +0 -9
- package/dist/fluid/fluid/example/graphics/line-chart.fld +0 -13
- package/dist/fluid/fluid/example/graphics/stacked-bar-chart.fld +0 -3
- package/dist/fluid/fluid/example/include-input-into-output.fld +0 -1
- package/dist/fluid/fluid/example/length.fld +0 -1
- package/dist/fluid/fluid/example/lexicalScoping.fld +0 -3
- package/dist/fluid/fluid/example/lib/some-constants.fld +0 -1
- package/dist/fluid/fluid/example/linked-inputs/energyscatter.fld +0 -23
- package/dist/fluid/fluid/example/linked-inputs/mini-energyscatter.fld +0 -29
- package/dist/fluid/fluid/example/linked-outputs/convolution-data.fld +0 -5
- package/dist/fluid/fluid/example/linked-outputs/convolution.fld +0 -12
- package/dist/fluid/fluid/example/linked-outputs/line-chart.fld +0 -15
- package/dist/fluid/fluid/example/linked-outputs/moving-average.fld +0 -19
- package/dist/fluid/fluid/example/linked-outputs/pairs-data.fld +0 -1
- package/dist/fluid/fluid/example/lookup.fld +0 -15
- package/dist/fluid/fluid/example/map.fld +0 -1
- package/dist/fluid/fluid/example/mergeSort.fld +0 -22
- package/dist/fluid/fluid/example/normalise.fld +0 -3
- package/dist/fluid/fluid/example/nub.fld +0 -1
- package/dist/fluid/fluid/example/pattern-match.fld +0 -12
- package/dist/fluid/fluid/example/percent.fld +0 -1
- package/dist/fluid/fluid/example/plot/methane.fld +0 -14
- package/dist/fluid/fluid/example/plot/non-renewables.fld +0 -21
- package/dist/fluid/fluid/example/range.fld +0 -4
- package/dist/fluid/fluid/example/record-lookup.fld +0 -3
- package/dist/fluid/fluid/example/records.expect.fld +0 -0
- package/dist/fluid/fluid/example/records.fld +0 -11
- package/dist/fluid/fluid/example/reverse.fld +0 -1
- package/dist/fluid/fluid/example/scratchpad.fld +0 -6
- package/dist/fluid/fluid/example/slicing/add.expect.fld +0 -1
- package/dist/fluid/fluid/example/slicing/add.fld +0 -1
- package/dist/fluid/fluid/example/slicing/array/array.expect.fld +0 -2
- package/dist/fluid/fluid/example/slicing/array/array.fld +0 -4
- package/dist/fluid/fluid/example/slicing/array/dims.expect.fld +0 -3
- package/dist/fluid/fluid/example/slicing/array/dims.fld +0 -3
- package/dist/fluid/fluid/example/slicing/array/lookup.expect.fld +0 -3
- package/dist/fluid/fluid/example/slicing/array/lookup.fld +0 -5
- package/dist/fluid/fluid/example/slicing/array/renewables.fld +0 -100
- package/dist/fluid/fluid/example/slicing/convolution/edgeDetect.expect.fld +0 -1
- package/dist/fluid/fluid/example/slicing/convolution/edgeDetect.fld +0 -1
- package/dist/fluid/fluid/example/slicing/convolution/emboss-wrap.fld +0 -1
- package/dist/fluid/fluid/example/slicing/convolution/emboss.expect.fld +0 -1
- package/dist/fluid/fluid/example/slicing/convolution/emboss.fld +0 -1
- package/dist/fluid/fluid/example/slicing/convolution/filter/edge-detect.fld +0 -5
- package/dist/fluid/fluid/example/slicing/convolution/filter/emboss.fld +0 -5
- package/dist/fluid/fluid/example/slicing/convolution/filter/gaussian.fld +0 -5
- package/dist/fluid/fluid/example/slicing/convolution/gaussian.expect.fld +0 -1
- package/dist/fluid/fluid/example/slicing/convolution/gaussian.fld +0 -1
- package/dist/fluid/fluid/example/slicing/convolution/test-image.fld +0 -7
- package/dist/fluid/fluid/example/slicing/dict/create.expect.fld +0 -2
- package/dist/fluid/fluid/example/slicing/dict/create.fld +0 -1
- package/dist/fluid/fluid/example/slicing/dict/difference.expect.fld +0 -4
- package/dist/fluid/fluid/example/slicing/dict/difference.fld +0 -3
- package/dist/fluid/fluid/example/slicing/dict/disjointUnion.expect.fld +0 -2
- package/dist/fluid/fluid/example/slicing/dict/disjointUnion.fld +0 -1
- package/dist/fluid/fluid/example/slicing/dict/foldl.expect.fld +0 -3
- package/dist/fluid/fluid/example/slicing/dict/foldl.fld +0 -1
- package/dist/fluid/fluid/example/slicing/dict/get.expect.fld +0 -5
- package/dist/fluid/fluid/example/slicing/dict/get.fld +0 -3
- package/dist/fluid/fluid/example/slicing/dict/intersectionWith.expect.fld +0 -5
- package/dist/fluid/fluid/example/slicing/dict/intersectionWith.fld +0 -4
- package/dist/fluid/fluid/example/slicing/dict/map.expect.fld +0 -8
- package/dist/fluid/fluid/example/slicing/dict/map.fld +0 -5
- package/dist/fluid/fluid/example/slicing/dict/match.expect.fld +0 -6
- package/dist/fluid/fluid/example/slicing/dict/match.fld +0 -5
- package/dist/fluid/fluid/example/slicing/divide.expect.fld +0 -1
- package/dist/fluid/fluid/example/slicing/divide.fld +0 -1
- package/dist/fluid/fluid/example/slicing/dtw/average-series.expect.fld +0 -8
- package/dist/fluid/fluid/example/slicing/dtw/average-series.fld +0 -8
- package/dist/fluid/fluid/example/slicing/dtw/compute-dtw.expect.fld +0 -6
- package/dist/fluid/fluid/example/slicing/dtw/compute-dtw.fld +0 -6
- package/dist/fluid/fluid/example/slicing/explained.expect.fld +0 -1
- package/dist/fluid/fluid/example/slicing/explained.fld +0 -1
- package/dist/fluid/fluid/example/slicing/filter.expect.fld +0 -4
- package/dist/fluid/fluid/example/slicing/filter.fld +0 -6
- package/dist/fluid/fluid/example/slicing/intersperse-1.expect.fld +0 -4
- package/dist/fluid/fluid/example/slicing/intersperse-2.expect.fld +0 -4
- package/dist/fluid/fluid/example/slicing/intersperse.fld +0 -5
- package/dist/fluid/fluid/example/slicing/length.expect.fld +0 -1
- package/dist/fluid/fluid/example/slicing/length.fld +0 -1
- package/dist/fluid/fluid/example/slicing/linked-outputs/bar-chart-line-chart.expect.fld +0 -0
- package/dist/fluid/fluid/example/slicing/linked-outputs/bar-chart-line-chart.fld +0 -29
- package/dist/fluid/fluid/example/slicing/linked-outputs/stacked-bar-scatter-plot.expect.fld +0 -0
- package/dist/fluid/fluid/example/slicing/linked-outputs/stacked-bar-scatter-plot.fld +0 -38
- package/dist/fluid/fluid/example/slicing/list-comp-1.expect.fld +0 -6
- package/dist/fluid/fluid/example/slicing/list-comp-2.expect.fld +0 -6
- package/dist/fluid/fluid/example/slicing/list-comp.fld +0 -8
- package/dist/fluid/fluid/example/slicing/lookup.expect.fld +0 -6
- package/dist/fluid/fluid/example/slicing/lookup.fld +0 -14
- package/dist/fluid/fluid/example/slicing/map.expect.fld +0 -1
- package/dist/fluid/fluid/example/slicing/map.fld +0 -1
- package/dist/fluid/fluid/example/slicing/matrix-update.expect.fld +0 -5
- package/dist/fluid/fluid/example/slicing/matrix-update.fld +0 -10
- package/dist/fluid/fluid/example/slicing/multiply.expect.fld +0 -1
- package/dist/fluid/fluid/example/slicing/multiply.fld +0 -1
- package/dist/fluid/fluid/example/slicing/nth.expect.fld +0 -1
- package/dist/fluid/fluid/example/slicing/nth.fld +0 -1
- package/dist/fluid/fluid/example/slicing/output-not-source.expect.fld +0 -2
- package/dist/fluid/fluid/example/slicing/output-not-source.fld +0 -1
- package/dist/fluid/fluid/example/slicing/qcut.expect.fld +0 -0
- package/dist/fluid/fluid/example/slicing/qcut.fld +0 -2
- package/dist/fluid/fluid/example/slicing/section-5-example-1.expect.fld +0 -10
- package/dist/fluid/fluid/example/slicing/section-5-example-2.expect.fld +0 -10
- package/dist/fluid/fluid/example/slicing/section-5-example-3.expect.fld +0 -10
- package/dist/fluid/fluid/example/slicing/section-5-example.fld +0 -14
- package/dist/fluid/fluid/example/slicing/zeros-1.expect.fld +0 -3
- package/dist/fluid/fluid/example/slicing/zeros-2.expect.fld +0 -3
- package/dist/fluid/fluid/example/slicing/zeros.fld +0 -4
- package/dist/fluid/fluid/example/slicing/zipWith-1.expect.fld +0 -4
- package/dist/fluid/fluid/example/slicing/zipWith.fld +0 -4
- package/dist/fluid/fluid/example/text-viz/datasets/ssp126.fld +0 -898
- package/dist/fluid/fluid/example/text-viz/datasets/ssp245.fld +0 -954
- package/dist/fluid/fluid/example/text-viz/datasets/ssp370.fld +0 -842
- package/dist/fluid/fluid/example/text-viz/datasets/ssp585.fld +0 -954
- package/dist/fluid/fluid/example/text-viz/explainable-table.fld +0 -7
- package/dist/fluid/fluid/example/text-viz/fake-probabilities.fld +0 -3
- package/dist/fluid/fluid/example/text-viz/figure-spm-4.fld +0 -42
- package/dist/fluid/fluid/example/text-viz/left-barchart-table.fld +0 -5
- package/dist/fluid/fluid/example/text-viz/likelihoods.fld +0 -9
- package/dist/fluid/fluid/example/text-viz/right-barchart-table.fld +0 -5
- package/dist/fluid/fluid/example/text-viz/table-spm-1.fld +0 -30
@@ -1,7 +0,0 @@
|
|
1
|
-
[
|
2
|
-
{ scenario: "SSP1-1.9", bestEstNear: 1.5, lowNear: 1.2, highNear: 1.7, bestEstMid: 1.6, lowMid: 1.2, highMid: 2.0, bestEstLate: 1.4, lowLate: 1.0, highLate: 1.8},
|
3
|
-
{ scenario: "SSP1-2.6", bestEstNear: 1.5, lowNear: 1.2, highNear: 1.8, bestEstMid: 1.7, lowMid: 1.3, highMid: 2.2, bestEstLate: 1.8, lowLate: 1.3, highLate: 2.4},
|
4
|
-
{ scenario: "SSP2-4.5", bestEstNear: 1.5, lowNear: 1.2, highNear: 1.8, bestEstMid: 2.0, lowMid: 1.6, highMid: 2.5, bestEstLate: 2.7, lowLate: 2.1, highLate: 3.5},
|
5
|
-
{ scenario: "SSP3-7.0", bestEstNear: 1.5, lowNear: 1.2, highNear: 1.8, bestEstMid: 2.1, lowMid: 1.7, highMid: 2.6, bestEstLate: 3.6, lowLate: 2.8, highLate: 4.6},
|
6
|
-
{ scenario: "SSP5-8.5", bestEstNear: 1.6, lowNear: 1.3, highNear: 1.9, bestEstMid: 2.4, lowMid: 1.9, highMid: 3.0, bestEstLate: 4.4, lowLate: 3.3, highLate: 5.7}
|
7
|
-
]
|
@@ -1,42 +0,0 @@
|
|
1
|
-
let getByX x table = fromSome (findWithKey "x" x table);
|
2
|
-
|
3
|
-
let referToBar bar = "the bar representing scenario " ++ bar.x ++ " has a z value of " ++ (numToStr (head bar.bars).z);
|
4
|
-
|
5
|
-
let stackedBarHeight stackedBar = sum [ bar.z | bar <- stackedBar.bars ];
|
6
|
-
|
7
|
-
let getTotal (BarChart record) = fromSome (findWithKey "x" "Total" record.stackedBars);
|
8
|
-
let getCO2 (BarChart record)= fromSome (findWithKey "x" "CO2" record.stackedBars);
|
9
|
-
let getNonCO2 (BarChart record) = fromSome (findWithKey "x" "Non-CO2" record.stackedBars);
|
10
|
-
|
11
|
-
|
12
|
-
let barHeight (BarChart bc) x =
|
13
|
-
let bar = fromSome (findWithKey "x" x bc.stackedBars)
|
14
|
-
in sum [ segment.z | segment <- bar.bars ];
|
15
|
-
|
16
|
-
let explainBars bars x =
|
17
|
-
if length bars == length (filter (fun bar -> bar.x == x) bars)
|
18
|
-
then "(°C; " ++ x ++ " bar)"
|
19
|
-
else error "absurd";
|
20
|
-
|
21
|
-
let mkBarChart scenName table =
|
22
|
-
BarChart {
|
23
|
-
caption: "Example bar chart for scenario " ++ scenName,
|
24
|
-
size: { width: 275, height: 185 },
|
25
|
-
stackedBars: map (fun record -> { x: record.type, bars: [ { y: "emissions", z: record.emissions } ]}) table
|
26
|
-
};
|
27
|
-
|
28
|
-
let getHeight bar offset = (head bar.bars).z + offset;
|
29
|
-
|
30
|
-
let ssp119 = mkBarChart "SSP1-1.9" ssp119Source;
|
31
|
-
ssp245 = mkBarChart "SSP2-4.5" ssp245Source;
|
32
|
-
total = map getTotal [ssp119, ssp245];
|
33
|
-
co2 = map getCO2 [ssp119, ssp245];
|
34
|
-
nonco2 = map getNonCO2 [ssp119, ssp245];
|
35
|
-
meanTotal = (sum (map stackedBarHeight total)) / (length total)
|
36
|
-
in MultiView {
|
37
|
-
leftBarChart: ssp119,
|
38
|
-
rightBarChart: ssp245,
|
39
|
-
explanation:
|
40
|
-
LinkedText [ "Within each scenario bar plot, the bars represent: total warming ", explainBars total "Total",
|
41
|
-
", warming contributions from CO2 ", explainBars co2 "CO2", " and from non-CO2 GHG's ", explainBars nonco2 "Non-CO2"]
|
42
|
-
}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
[
|
2
|
-
{ prob: 0.99, msg: "virtually certain" },
|
3
|
-
{ prob: 0.9, msg: "very likely"},
|
4
|
-
{ prob: 0.66, msg: "likely"},
|
5
|
-
{ prob: 0.33, msg: "about as likely as not"},
|
6
|
-
{ prob: 0.1, msg: "unlikely"},
|
7
|
-
{ prob: 0.01, msg: "very unlikely"},
|
8
|
-
{ prob: 0.0, msg: "exceptionally unlikely"}
|
9
|
-
]
|
@@ -1,30 +0,0 @@
|
|
1
|
-
let newDataTable offset = map (fun s -> { scenario: s.scenario, beNear: s.bestEstNear + offset, nearRange: (s.lowNear, s.highNear), beMid: s.bestEstMid, midRange: (s.lowMid, s.highMid), beLong: s.bestEstLate, longRange: (s.lowLate, s.highLate)}) tableData;
|
2
|
-
|
3
|
-
let getByScenario data scenario = fromSome (findWithKey "scenario" scenario data);
|
4
|
-
|
5
|
-
let probAsText = likelihoodMap likelihoods;
|
6
|
-
|
7
|
-
let mean list = (sum list) / (length list);
|
8
|
-
|
9
|
-
let calcLikelihood (min, max) target =
|
10
|
-
if max < target
|
11
|
-
then 0.05
|
12
|
-
else if target <= min
|
13
|
-
then 0.95
|
14
|
-
else (target - min)/(max - min);
|
15
|
-
|
16
|
-
let realTable = newDataTable 0;
|
17
|
-
getByScenario' = getByScenario realTable;
|
18
|
-
ssp119 = getByScenario' "SSP1-1.9";
|
19
|
-
ssp245 = getByScenario' "SSP2-4.5"
|
20
|
-
in MultiView {
|
21
|
-
explanation119:
|
22
|
-
LinkedText [ "Under the low GHG emissions scenario (SSP1-1.9), global warming of 2°C would ",
|
23
|
-
probAsText (calcLikelihood ssp119.longRange 2.0),
|
24
|
-
" be exceeded at the end of the 21st century." ],
|
25
|
-
explanation245:
|
26
|
-
LinkedText [ "Under the intermediate GHG emissions scenario (SSP2-4.5), global warming of 2°C would ",
|
27
|
-
probAsText (calcLikelihood ssp245.longRange 2.0),
|
28
|
-
" be exceeded by the end of the 21st century. In the mid-term period (2041-2060)",
|
29
|
-
" crossing the 2°C mark is ", probAsText (calcLikelihood ssp245.midRange 2.0), "to occur" ]
|
30
|
-
}
|