Days spent in each pipeline stage, from a stage-history CSV with the columns
deal,stage,entered,exited (dates as YYYY-MM-DD; leave exited empty for a deal still in the stage).
Open rows are measured up to the as_of date you pass.
Summary
Functions
Parse the CSV text into stage rows {stage, days}.
Printable table.
Average, median and longest days per stage, longest average first.
Types
@type stat() :: %{ stage: String.t(), deals: non_neg_integer(), avg: float(), median: float(), longest: non_neg_integer() }
Functions
@spec parse(String.t(), Date.t()) :: {:ok, [{String.t(), non_neg_integer()}]} | {:error, String.t()}
Parse the CSV text into stage rows {stage, days}.
Printable table.
@spec stats([{String.t(), non_neg_integer()}]) :: [stat()]
Average, median and longest days per stage, longest average first.