Defect Metrics

# Empty
tib_defects.all <-
  finmetrics::get.FilteredTibble(here::here("inst/extdata",
                                            "fcc_defects.csv"),
                                 date_from = Sys.Date() - months(18)) %>%
  filter(Type == "Defect")

tib_defects.anom <- anomalities(tib_defects.all, action = 'SELECT')
tib_defects.all <- anomalities(tib_defects.all, action = 'REJECT')

tib_defects.all$Priority <- factor(
  tib_defects.all$Priority,
  levels = c("Critical", "High", "Medium", "Low", "None"),
  ordered = TRUE
)


tib_defects.closed <-
  tib_defects.all %>% 
  finmetrics::exclude.OpenCases() %>% 
  finmetrics::compute.CycleTime() %>% 
  finmetrics::compute.Week()

# Taking a one year subset after calculating cycle time for 18 months.
tib_defects.closed <- tib_defects.closed %>% 
  filter(crdt > Sys.Date() - months(18))

tib_defects.closed.high_and_critical <- tib_defects.closed %>% 
  filter(Priority == "High" | Priority == "Critical")

Cycle Time

Below is the 5 Number Summary of the entire data set. The 75% Qartile value is significant because that is the number which you can typically see as the turn around time (TAT) to service a defect.

Summary

tabulate.CycleTimeStat(tib_defects.closed, tab_caption = "5 Number Summary")

Cycle Time Trend

This reflects the capacity/capability of the team to resolve across all priorities as indicated by a trend.

loess_plot.CycleTimeTrend(tib_defects.closed, col_date = "crdt")

5 Number Summary

# tabulate.PriorityBasedCycleTimeStat(tib_defects.closed,
#                                     tab_caption = "All Severities")
tabulate.TypeAndPriorityBasedCycleTimeStat(tib, tab_caption = "All Severities")
loess_plot.CycleTimeTrend(tib_defects.closed.high_and_critical, col_date = "crdt", plt_caption="Ability to focus on High and Critical Severities")
# tabulate.PriorityBasedCycleTimeStat(tib_defects.closed.high_and_critical, tab_caption="5 Number Summary for High and Critical Defects")
tabulate.TypeAndPriorityBasedCycleTimeStat(tib_defects.closed.high_and_critical, tab_caption="5 Number Summary for High and Critical Defects")

Throughput

defects_ncount_by_week <-
  gen_ds.NumClosed_For_FloorDate(tib_defects.closed)

line_plot.NumClosed_For_FloorDate(defects_ncount_by_week,
                                  plt_caption = "Closure/Week", 
                                  show_trend = TRUE)
hnc_defects_ncount_by_week <-
  gen_ds.NumClosed_For_FloorDate(tib_defects.closed.high_and_critical)
line_plot.NumClosed_For_FloorDate(hnc_defects_ncount_by_week, 
                                  plt_caption="Closure/Week - High & Critical",
                                  show_trend = TRUE)
tib_defects_wk_agg <-
  tib_defects.closed %>%
  gen_ds.NumClosed_For_FloorDate(priority_based = TRUE)

tib_hnc_defects_wk_agg <-
  tib_defects.closed.high_and_critical %>%
  gen_ds.NumClosed_For_FloorDate(priority_based = TRUE)

The plot below shows the number of defects closed in every week, marked separately in different color based on priority

bar_plot.NumClosed_For_FloorDate(tib_defects_wk_agg)
bar_plot.NumClosed_For_FloorDate(tib_hnc_defects_wk_agg)
DT::datatable(tib_defects_wk_agg, filter='top')

Gives and indication of the densities especially the occurrence of multiple maxima in the data. This can be due to multiple categories of work items which may be investigated further. Below are the violin plots for all defects and also high and critical defects.

tib_defects.closed %>% violin_plot.CycleTimeVsPriority()
# tib_defects.closed.high_and_critical %>% violin_plot.CycleTimeVsPriority(pal_option = 'B')

Flow

Work in Progress (WiP)

  tib_defects_work_in_progress <- tib_defects.all %>%
    dplyr::filter(Type == 'Defect') %>% finmetrics::compute.WIP()
  areaPlot.WiP(tib_defects_work_in_progress)

Inflow Outflow

flow.defects.merged <- tib_defects.all %>%
  get.InflowOutflowTibble.Defect(include_priority = TRUE)
bar_plot.InflowOutflow(flow.defects.merged, data_values = TRUE)
      line_plot.InflowOutflow.CumSum(flow.defects.merged)
DT::datatable(flow.defects.merged, filter='top')


rajivgangadharan/mtrxbook-minimal documentation built on Sept. 28, 2024, 5:31 a.m.