From 26386072288887d1535f68ece0b1a6bb9ca132bc Mon Sep 17 00:00:00 2001 From: Ozzie Gooen Date: Thu, 27 Feb 2020 09:45:46 +0000 Subject: [PATCH] Minor cleanup --- src/components/DistBuilder.re | 8 +- src/components/charts/DistPlusPlot.re | 78 +++++++++---------- .../DistributionPlot/DistributionPlot.re | 2 +- src/index.html | 2 +- 4 files changed, 45 insertions(+), 45 deletions(-) diff --git a/src/components/DistBuilder.re b/src/components/DistBuilder.re index fc5d891d..7b322e00 100644 --- a/src/components/DistBuilder.re +++ b/src/components/DistBuilder.re @@ -140,9 +140,9 @@ let make = () => {
{DistPlusIngredients.make(~guesstimatorString, ~domain, ~unit, ()) |> DistPlusIngredients.toDistPlus( - ~sampleCount=10000, - ~outputXYPoints=2000, - ~truncateTo=Some(1000), + ~sampleCount=1000, + ~outputXYPoints=1000, + ~truncateTo=Some(100), ) |> E.O.React.fmapOrNull(distPlus => )}
@@ -275,4 +275,4 @@ let make = () => { ; -}; +}; \ No newline at end of file diff --git a/src/components/charts/DistPlusPlot.re b/src/components/charts/DistPlusPlot.re index 38a09448..d3f57772 100644 --- a/src/components/charts/DistPlusPlot.re +++ b/src/components/charts/DistPlusPlot.re @@ -40,7 +40,7 @@ module DistPlusChart = { height=120 ?discrete ?continuous - color={`hex("333")} + color={`hex("5f6b7e")} onHover timeScale />; @@ -71,7 +71,7 @@ module IntegralChart = { maxX height=80 ?continuous - color={`hex("333")} + color={`hex("5f6b7e")} timeScale onHover />; @@ -94,78 +94,78 @@ let make = (~distPlus: DistTypes.distPlus) => {
chart chart2 - +
- - + -
{"X Point" |> ReasonReact.string} + {"X Point" |> ReasonReact.string} {"Discrete Value" |> ReasonReact.string} - - + + {"Continuous Value" |> ReasonReact.string} - - + + {"Y Integral to Point" |> ReasonReact.string} - - + + {"Y Integral Total" |> ReasonReact.string} - +
+ {x |> E.Float.toString |> ReasonReact.string} - - + + {distPlus |> Distributions.DistPlus.T.xToY(x) |> DistTypes.MixedPoint.toDiscreteValue |> Js.Float.toPrecisionWithPrecision(_, ~digits=7) |> ReasonReact.string} - - + + {distPlus |> Distributions.DistPlus.T.xToY(x) |> DistTypes.MixedPoint.toContinuousValue |> Js.Float.toPrecisionWithPrecision(_, ~digits=7) |> ReasonReact.string} - - + + {distPlus |> Distributions.DistPlus.T.Integral.xToY(~cache=None, x) |> E.Float.with2DigitsPrecision |> ReasonReact.string} - - + + {distPlus |> Distributions.DistPlus.T.Integral.sum(~cache=None) |> E.Float.with2DigitsPrecision |> ReasonReact.string} - +
- +
- -
+ {"Continuous Total" |> ReasonReact.string} - - + + {"Scaled Continuous Total" |> ReasonReact.string} - - + + {"Discrete Total" |> ReasonReact.string} - - + + {"Scaled Discrete Total" |> ReasonReact.string} - +
+ {distPlus |> Distributions.DistPlus.T.toContinuous |> E.O.fmap( @@ -174,8 +174,8 @@ let make = (~distPlus: DistTypes.distPlus) => { |> E.O.fmap(E.Float.with2DigitsPrecision) |> E.O.default("") |> ReasonReact.string} - - + + {distPlus |> Distributions.DistPlus.T.toScaledContinuous |> E.O.fmap( @@ -184,23 +184,23 @@ let make = (~distPlus: DistTypes.distPlus) => { |> E.O.fmap(E.Float.with2DigitsPrecision) |> E.O.default("") |> ReasonReact.string} - - + + {distPlus |> Distributions.DistPlus.T.toDiscrete |> E.O.fmap(Distributions.Discrete.T.Integral.sum(~cache=None)) |> E.O.fmap(E.Float.with2DigitsPrecision) |> E.O.default("") |> ReasonReact.string} - - + + {distPlus |> Distributions.DistPlus.T.toScaledDiscrete |> E.O.fmap(Distributions.Discrete.T.Integral.sum(~cache=None)) |> E.O.fmap(E.Float.with2DigitsPrecision) |> E.O.default("") |> ReasonReact.string} - +
diff --git a/src/components/charts/DistributionPlot/DistributionPlot.re b/src/components/charts/DistributionPlot/DistributionPlot.re index 7d3b3a1a..ecc52b09 100644 --- a/src/components/charts/DistributionPlot/DistributionPlot.re +++ b/src/components/charts/DistributionPlot/DistributionPlot.re @@ -76,7 +76,7 @@ module Styles = { selector(".x-axis", [fontSize(`px(9))]), selector(".x-axis .domain", [display(`none)]), selector(".x-axis .tick line", [display(`none)]), - selector(".x-axis .tick text", [color(`hex("bfcad4"))]), + selector(".x-axis .tick text", [color(`hex("7a8998"))]), selector(".chart .area-path", [SVG.fill(chartColor)]), selector(".lollipops-line", [SVG.stroke(`hex("bfcad4"))]), selector( diff --git a/src/index.html b/src/index.html index 80546e46..d5ce2e8b 100644 --- a/src/index.html +++ b/src/index.html @@ -3,7 +3,7 @@ - Estiband + Highly Speculative Forecasts