View Source Trifle.Stats.Series.Fluent (Trifle.Stats v2.5.0)
Fluent helpers for %Trifle.Stats.Series{}.
Aggregations and formatters are terminal operations. The built-in transponder surface is expression-only:
series
|> transpond_expression(["sum", "count"], "a / b", "avg")
|> aggregate_max("avg")
Summary
Functions
Import this module to get fluent methods on Series structs.
Apply multiple aggregations and return results as a map.
Debug helper - inspect series data and pass through for chaining.
Apply multiple formatters and return results as a map.
Functions
Import this module to get fluent methods on Series structs.
Apply multiple aggregations and return results as a map.
Examples
series |> aggregate_multiple([
avg: ["count"],
max: ["duration"],
sum: ["count", 2] # with slices
])
# => %{avg: 15.5, max: 200, sum: [10, 20]}
Debug helper - inspect series data and pass through for chaining.
Examples
series
|> debug_inspect("Before transformation")
|> transpond_expression(["sum", "count"], "a / b", "avg")
|> debug_inspect("After transformation")
|> aggregate_max("avg")
Apply multiple formatters and return results as a map.
Link to this function