
Identify shifts based on outlook time settings for work day start and end time
Source:R/identify_shifts.R
      identify_shifts.RdThis function uses outlook calendar settings for start and end time of work
day to identify work shifts. The relevant variables are
WorkingStartTimeSetInOutlook and WorkingEndTimeSetInOutlook.
Value
A different output is returned depending on the value passed to the return
argument:
"plot": ggplot object. A bar plot for the weekly count of shifts."table": data frame. A summary table for the count of shifts."data: data frame. Input data appended with theShiftscolumns.
See also
Other Data Validation:
check_query(),
extract_hr(),
flag_ch_ratio(),
flag_em_ratio(),
flag_extreme(),
flag_outlooktime(),
hr_trend(),
hrvar_count(),
hrvar_count_all(),
hrvar_trend(),
identify_churn(),
identify_holidayweeks(),
identify_inactiveweeks(),
identify_nkw(),
identify_outlier(),
identify_privacythreshold(),
identify_tenure(),
track_HR_change(),
validation_report()
Examples
# Demo with `pq_data` example where Outlook Start and End times are imputed
# Use a small sample for faster runtime
pq_data_small <- dplyr::slice_sample(pq_data, prop = 0.1)
pq_data_small$WorkingStartTimeSetInOutlook <- "6:30"
pq_data_small$WorkingEndTimeSetInOutlook <- "23:30"
# Return plot
pq_data_small %>% identify_shifts()
# Return summary table
pq_data_small %>% identify_shifts(return = "table")
#> # A tibble: 1 × 3
#>   Shifts     WeekCount PersonCount
#>   <chr>          <int>       <int>
#> 1 6:30-23:30       690         279