move me and qt salaries to ana.NewDefaultNormalizer
parent
af1b23731a
commit
188b31aa0c
|
|
@ -102,20 +102,7 @@ func (router Router) APITransactions(w http.ResponseWriter, r *http.Request) {
|
||||||
))
|
))
|
||||||
recent := time.Hour * 24 * 365 / 6
|
recent := time.Hour * 24 * 365 / 6
|
||||||
|
|
||||||
normalizer := ana.NewNormalizer().
|
normalizer := ana.NewDefaultNormalizer().
|
||||||
With("^Zach:", "2023-10-05", 139). // to turtle
|
|
||||||
With("^Zach:", "2021-12-30", 135). // at pluralsight
|
|
||||||
With("^Zach:", "2020-07-30", 120). // to pluralsight
|
|
||||||
With("^Zach:", "2019-07-16", 77). // at fedex
|
|
||||||
With("^Zach:", "2017-02-16", 49). // to fedex
|
|
||||||
With("^Bel:", "2023-12-05", 190). // to render
|
|
||||||
With("^Bel:", "2022-12-31", 154). // at q
|
|
||||||
With("^Bel:", "2022-06-30", 148). // at q
|
|
||||||
With("^Bel:", "2021-12-31", 122). // at q
|
|
||||||
With("^Bel:", "2020-12-31", 118). // at q
|
|
||||||
With("^Bel:", "2019-12-31", 111). // at q
|
|
||||||
With("^Bel:", "2018-12-31", 92). // at q
|
|
||||||
With("^Bel:", "2018-02-16", 86) // to q
|
|
||||||
|
|
||||||
{
|
{
|
||||||
deltas := houseRelatedDeltas.
|
deltas := houseRelatedDeltas.
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,23 @@ type normalize struct {
|
||||||
factor float64
|
factor float64
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func NewDefaultNormalizer() Normalizer {
|
||||||
|
return NewNormalizer().
|
||||||
|
With("^Zach:", "2023-10-05", 139). // to turtle
|
||||||
|
With("^Zach:", "2021-12-30", 135). // at pluralsight
|
||||||
|
With("^Zach:", "2020-07-30", 120). // to pluralsight
|
||||||
|
With("^Zach:", "2019-07-16", 77). // at fedex
|
||||||
|
With("^Zach:", "2017-02-16", 49). // to fedex
|
||||||
|
With("^Bel:", "2023-12-05", 190). // to render
|
||||||
|
With("^Bel:", "2022-12-31", 154). // at q
|
||||||
|
With("^Bel:", "2022-06-30", 148). // at q
|
||||||
|
With("^Bel:", "2021-12-31", 122). // at q
|
||||||
|
With("^Bel:", "2020-12-31", 118). // at q
|
||||||
|
With("^Bel:", "2019-12-31", 111). // at q
|
||||||
|
With("^Bel:", "2018-12-31", 92). // at q
|
||||||
|
With("^Bel:", "2018-02-16", 86) // to q
|
||||||
|
}
|
||||||
|
|
||||||
func NewNormalizer() Normalizer {
|
func NewNormalizer() Normalizer {
|
||||||
return Normalizer{
|
return Normalizer{
|
||||||
m: make(map[string][]normalize),
|
m: make(map[string][]normalize),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue