R/workpatterns_classify_bw.R
workpatterns_classify_bw.Rd
Apply a rule based algorithm to emails sent by hour of day, using the binary week-based ('bw') method.
workpatterns_classify_bw(
data,
hrvar = NULL,
signals = c("email", "IM"),
start_hour = "0900",
end_hour = "1700",
mingroup = 5,
exp_hours = NULL,
active_threshold = 0,
return = "plot"
)
A data frame containing email by hours data.
A string specifying the HR attribute to cut the data by. Defaults to NULL. This only affects the function when "table" is returned.
Character vector to specify which collaboration metrics to use:
a combination of signals, such as c("email", "IM")
(default)
"email"
for emails only
"IM"
for Teams messages only
"unscheduled_calls"
for Unscheduled Calls only
"meetings"
for Meetings only
A character vector specifying starting hours, e.g.
"0900"
. Note that this currently only supports hourly increments. If
the official hours specifying checking in and 9 AM and checking out at 5
PM, then "0900"
should be supplied here.
A character vector specifying starting hours, e.g. "1700"
.
Note that this currently only supports hourly increments. If the
official hours specifying checking in and 9 AM and checking out at 5 PM,
then "1700"
should be supplied here.
Numeric value setting the privacy threshold / minimum group size. Defaults to 5.
Numeric value representing the number of hours the population
is expected to be active for throughout the workday. By default, this uses
the difference between end_hour
and start_hour
.
A numeric value specifying the minimum number of signals to be greater than in order to qualify as active. Defaults to 0.
Character vector to specify what to return. Valid options include:
"plot"
: returns a grid showing the distribution of archetypes by
'breaks' and number of active hours (default)
"plot-dist"
: returns a heatmap plot of signal distribution by hour
and archetypes
"data"
: returns the raw data with the classified
archetypes
"table"
: returns a summary table of the archetypes
"plot-area"
: returns an area plot of the percentages of archetypes
shown over time
"plot-hrvar"
: returns a bar plot showing the count of archetypes,
faceted by the supplied HR attribute.
A different output is returned depending on the value passed to the return
argument:
"plot"
: returns a summary grid plot of the classified archetypes
(default). A 'ggplot' object.
"data"
: returns a data frame of the raw data with the classified
archetypes
"table"
: returns a data frame of summary table of the archetypes
"plot-area"
: returns an area plot of the percentages of archetypes
shown over time. A 'ggplot' object.
"plot-hrvar"
: returns a bar plot showing the count of archetypes,
faceted by the supplied HR attribute. A 'ggplot' object.
Other Working Patterns:
flex_index()
,
identify_shifts_wp()
,
identify_shifts()
,
plot_flex_index()
,
workpatterns_area()
,
workpatterns_classify_pav()
,
workpatterns_classify()
,
workpatterns_hclust()
,
workpatterns_rank()
,
workpatterns_report()