зеркало из https://github.com/microsoft/wpa.git
Merge branch 'main' into docs/viva-rebrand
This commit is contained in:
Коммит
821384f150
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
До Ширина: | Высота: | Размер: 688 KiB После Ширина: | Высота: | Размер: 686 KiB |
|
@ -1,2 +0,0 @@
|
|||
This package was submitted to CRAN on 2021-09-01.
|
||||
Once it is accepted, delete this file and tag the release (commit 844c8cb0).
|
|
@ -1,7 +1,7 @@
|
|||
Package: wpa
|
||||
Type: Package
|
||||
Title: Tools for Analysing and Visualising Workplace Analytics Data
|
||||
Version: 1.6.2
|
||||
Version: 1.6.2.9000
|
||||
Authors@R: c(
|
||||
person(given = "Martin", family = "Chan", role = c("aut", "cre"), email = "martin.chan@microsoft.com"),
|
||||
person(given = "Carlos", family = "Morales", role = "aut", email = "carlos.morales@microsoft.com"),
|
||||
|
@ -58,7 +58,6 @@ Imports:
|
|||
data.table
|
||||
RoxygenNote: 7.1.2
|
||||
Roxygen: list(markdown = TRUE)
|
||||
VignetteBuilder: knitr, rmarkdown
|
||||
Suggests:
|
||||
knitr,
|
||||
extrafont,
|
||||
|
|
|
@ -48,6 +48,8 @@ export(create_dist)
|
|||
export(create_dt)
|
||||
export(create_fizz)
|
||||
export(create_hist)
|
||||
export(create_inc)
|
||||
export(create_incidence)
|
||||
export(create_line)
|
||||
export(create_line_asis)
|
||||
export(create_period_scatter)
|
||||
|
|
6
NEWS.md
6
NEWS.md
|
@ -1,10 +1,16 @@
|
|||
# wpa (development version)
|
||||
|
||||
- Added `create_inc()` for creating incidence analysis
|
||||
|
||||
# wpa 1.6.2
|
||||
|
||||
- Added new signal options for `flex_index()` (#183, #185)
|
||||
- Minor feature improvements (#186)
|
||||
- Minor bugs fixed (#181, #184)
|
||||
- Updated `em_data` with new signals (#191)
|
||||
|
||||
# wpa 1.6.1
|
||||
|
||||
- Fixed several minor bugs reported on GitHub (#177, #178, #180, #181)
|
||||
- Refurbished `meeting_tm_report()` (#173)
|
||||
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
#' percentage signs. Defaults to `FALSE`.
|
||||
#' @param plot_title An option to override plot title.
|
||||
#' @param plot_subtitle An option to override plot subtitle.
|
||||
#' @param legend_lab String. Option to override legend title/label. Defaults to
|
||||
#' `NULL`, where the metric name will be populated instead.
|
||||
#' @param rank String specifying how to rank the bars. Valid inputs are:
|
||||
#' - `"descending"` - ranked highest to lowest from top to bottom (default).
|
||||
#' - `"ascending"` - ranked lowest to highest from top to bottom.
|
||||
|
@ -92,6 +94,7 @@ create_bar <- function(data,
|
|||
percent = FALSE,
|
||||
plot_title = us_to_space(metric),
|
||||
plot_subtitle = paste("Average by", tolower(camel_clean(hrvar))),
|
||||
legend_lab = NULL,
|
||||
rank = "descending",
|
||||
xlim = NULL,
|
||||
text_just = 0.5,
|
||||
|
@ -107,6 +110,11 @@ create_bar <- function(data,
|
|||
data %>%
|
||||
check_inputs(requirements = required_variables)
|
||||
|
||||
## Handle `legend_lab`
|
||||
if(is.null(legend_lab)){
|
||||
legend_lab <- gsub("_", " ", metric)
|
||||
}
|
||||
|
||||
## Handling NULL values passed to hrvar
|
||||
if(is.null(hrvar)){
|
||||
data <- totals_col(data)
|
||||
|
@ -148,13 +156,14 @@ create_bar <- function(data,
|
|||
## Bar plot
|
||||
plot_object <- data %>%
|
||||
create_stacked(
|
||||
metrics=metric,
|
||||
metrics = metric,
|
||||
hrvar = hrvar,
|
||||
mingroup = mingroup,
|
||||
stack_colours = bar_colour,
|
||||
percent = percent,
|
||||
plot_title = plot_title,
|
||||
plot_subtitle = plot_subtitle,
|
||||
legend_lab = legend_lab,
|
||||
return = "plot",
|
||||
rank = rank,
|
||||
xlim = xlim,
|
||||
|
|
|
@ -0,0 +1,262 @@
|
|||
#' @title
|
||||
#' Create an incidence analysis reflecting proportion of population scoring above
|
||||
#' or below a threshold for a metric
|
||||
#'
|
||||
#' @description
|
||||
#' An incidence analysis is generated, with each value in the table reflecting
|
||||
#' the proportion of the population that is above or below a threshold for a
|
||||
#' specified metric. There is an option to only provide a single `hrvar` in
|
||||
#' which a bar plot is generated, or two `hrvar` values where an incidence table
|
||||
#' (heatmap) is generated.
|
||||
#'
|
||||
#'
|
||||
#' @param data A Standard Person Query dataset in the form of a data frame.
|
||||
#' @param metric Character string containing the name of the metric,
|
||||
#' e.g. "Collaboration_hours"
|
||||
#' @param hrvar Character vector of at most length 2 containing the name of the
|
||||
#' HR Variable by which to split metrics.
|
||||
#' @param mingroup Numeric value setting the privacy threshold / minimum group
|
||||
#' size. Defaults to 5.
|
||||
#' @param threshold Numeric value specifying the threshold.
|
||||
#' @param position String containing the below valid values:
|
||||
#' - `"above"`: show incidence of those equal to or above the threshold
|
||||
#' - `"below"`: show incidence of those equal to or below the threshold
|
||||
#' @param return String specifying what to return. This must be one of the
|
||||
#' following strings:
|
||||
#' - `"plot"`
|
||||
#' - `"table"`
|
||||
#'
|
||||
#' See `Value` for more information.
|
||||
#'
|
||||
#' @return
|
||||
#' A different output is returned depending on the value passed to the `return` argument:
|
||||
#' - `"plot"`: 'ggplot' object. A heat map.
|
||||
#' - `"table"`: data frame. A summary table.
|
||||
#'
|
||||
#' @import dplyr
|
||||
#' @import ggplot2
|
||||
#' @importFrom scales percent
|
||||
#'
|
||||
#' @family Visualization
|
||||
#' @family Flexible
|
||||
#'
|
||||
#' @examples
|
||||
#' # Only a single HR attribute
|
||||
#' create_inc(
|
||||
#' data = sq_data,
|
||||
#' metric = "After_hours_collaboration_hours",
|
||||
#' hrvar = "Organization",
|
||||
#' threshold = 4,
|
||||
#' position = "above"
|
||||
#' )
|
||||
#'
|
||||
#' # Two HR attributes
|
||||
#' create_inc(
|
||||
#' data = sq_data,
|
||||
#' metric = "Collaboration_hours",
|
||||
#' hrvar = c("LevelDesignation", "Organization"),
|
||||
#' threshold = 20,
|
||||
#' position = "below"
|
||||
#' )
|
||||
#'
|
||||
#' @export
|
||||
|
||||
create_inc <- function(
|
||||
data,
|
||||
metric,
|
||||
hrvar,
|
||||
mingroup = 5,
|
||||
threshold,
|
||||
position,
|
||||
return = "plot"
|
||||
){
|
||||
|
||||
if(length(hrvar) == 1){
|
||||
|
||||
create_inc_bar(
|
||||
data = data,
|
||||
metric = metric,
|
||||
hrvar = hrvar,
|
||||
mingroup = mingroup,
|
||||
threshold = threshold,
|
||||
position = position,
|
||||
return = return
|
||||
)
|
||||
|
||||
} else if(length(hrvar) == 2){
|
||||
|
||||
create_inc_grid(
|
||||
data = data,
|
||||
metric = metric,
|
||||
hrvar = hrvar,
|
||||
mingroup = mingroup,
|
||||
threshold = threshold,
|
||||
position = position,
|
||||
return = return
|
||||
)
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
stop("`hrvar` can only accept a character vector of length 2.")
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#' @rdname create_inc
|
||||
#' @export
|
||||
create_incidence <- create_inc
|
||||
|
||||
|
||||
#' Run `create_inc` with only single `hrvar`
|
||||
#' Returning a bar chart
|
||||
#'
|
||||
#' @noRd
|
||||
create_inc_bar <- function(
|
||||
data,
|
||||
metric,
|
||||
hrvar,
|
||||
mingroup = 5,
|
||||
threshold,
|
||||
position,
|
||||
return = "plot"
|
||||
){
|
||||
|
||||
# Transform data so that metrics become proportions
|
||||
data_t <-
|
||||
data %>%
|
||||
{ if (position == "above"){
|
||||
mutate(., !!sym(metric) := !!sym(metric) >= threshold)
|
||||
} else if (position == "below"){
|
||||
mutate(., !!sym(metric) := !!sym(metric) <= threshold)
|
||||
}
|
||||
}
|
||||
|
||||
# Set title text
|
||||
title_text <-
|
||||
paste(
|
||||
"Incidence of",
|
||||
tolower(us_to_space(metric)),
|
||||
position,
|
||||
threshold
|
||||
)
|
||||
|
||||
# Set subtitle text
|
||||
subtitle_text <-
|
||||
paste(
|
||||
"Percentage and number of employees by",
|
||||
hrvar
|
||||
)
|
||||
|
||||
# Pipe result to `create_bar()`
|
||||
create_bar(
|
||||
data = data_t,
|
||||
metric = metric,
|
||||
hrvar = hrvar,
|
||||
mingroup = mingroup,
|
||||
return = return,
|
||||
plot_title = title_text,
|
||||
plot_subtitle = subtitle_text,
|
||||
legend_lab = paste("% with",
|
||||
tolower(us_to_space(metric)),
|
||||
position,
|
||||
threshold),
|
||||
percent = TRUE
|
||||
)
|
||||
}
|
||||
|
||||
#' Run `create_inc` with only two `hrvar`
|
||||
#' Returning a heatmap
|
||||
#'
|
||||
#' @noRd
|
||||
create_inc_grid <- function(
|
||||
data,
|
||||
metric,
|
||||
hrvar,
|
||||
mingroup = 5,
|
||||
threshold,
|
||||
position,
|
||||
return = "plot"
|
||||
){
|
||||
|
||||
# Create table of proportions
|
||||
myTable <-
|
||||
data %>%
|
||||
{ if (position == "above"){
|
||||
mutate(., !!sym(metric) := !!sym(metric) >= threshold)
|
||||
} else if (position == "below"){
|
||||
mutate(., !!sym(metric) := !!sym(metric) <= threshold)
|
||||
}
|
||||
} %>%
|
||||
group_by(!!sym(hrvar[1]), !!sym(hrvar[2]), PersonId) %>%
|
||||
summarise(
|
||||
!!sym(metric) := mean(!!sym(metric), na.rm = TRUE)
|
||||
) %>%
|
||||
group_by(!!sym(hrvar[1]), !!sym(hrvar[2])) %>%
|
||||
summarise(
|
||||
!!sym(metric) := mean(!!sym(metric), na.rm = TRUE),
|
||||
n = n_distinct(PersonId),
|
||||
.groups = "drop"
|
||||
) %>%
|
||||
filter(n >= mingroup) %>%
|
||||
arrange(desc(!!sym(metric)))
|
||||
|
||||
if(return == "table"){
|
||||
|
||||
myTable
|
||||
|
||||
} else if(return == "plot"){
|
||||
|
||||
# Set title text
|
||||
title_text <-
|
||||
paste(
|
||||
"Incidence of",
|
||||
tolower(us_to_space(metric)),
|
||||
position,
|
||||
threshold
|
||||
)
|
||||
|
||||
# Set subtitle text
|
||||
subtitle_text <-
|
||||
paste(
|
||||
"Percentage and number of employees by",
|
||||
hrvar[1],
|
||||
"and",
|
||||
hrvar[2]
|
||||
)
|
||||
|
||||
metric_text <- NULL
|
||||
|
||||
myTable %>%
|
||||
mutate(metric_text = paste0(
|
||||
scales::percent(!!sym(metric), accuracy = 1),
|
||||
" (", n, ")")) %>%
|
||||
ggplot(aes(x = !!sym(hrvar[1]),
|
||||
y = !!sym(hrvar[2]),
|
||||
fill = !!sym(metric))) +
|
||||
geom_tile() +
|
||||
geom_text(aes(label = metric_text),
|
||||
colour = "black",
|
||||
size = 3)+
|
||||
scale_fill_gradient2(low = rgb2hex(7, 111, 161),
|
||||
mid = rgb2hex(241, 204, 158),
|
||||
high = rgb2hex(216, 24, 42),
|
||||
midpoint = 0.5,
|
||||
breaks = c(0, 0.5, 1),
|
||||
labels = c("0%", "", "100%"),
|
||||
limits = c(0, 1)) +
|
||||
scale_x_discrete(position = "top", labels = us_to_space) +
|
||||
scale_y_discrete(labels = us_to_space) +
|
||||
theme_wpa_basic() +
|
||||
labs(
|
||||
title = title_text,
|
||||
subtitle = subtitle_text,
|
||||
caption = paste(
|
||||
extract_date_range(data, return = "text"),
|
||||
"\n",
|
||||
"Percentages reflect incidence with respect to population in cell."),
|
||||
fill = "Incidence"
|
||||
)
|
||||
}
|
||||
}
|
|
@ -23,8 +23,10 @@
|
|||
#' A character vector to specify the colour codes for the stacked bar charts.
|
||||
#' @param percent Logical value to determine whether to show labels as
|
||||
#' percentage signs. Defaults to `FALSE`.
|
||||
#' @param plot_title An option to override plot title.
|
||||
#' @param plot_subtitle An option to override plot subtitle.
|
||||
#' @param plot_title String. Option to override plot title.
|
||||
#' @param plot_subtitle String. Option to override plot subtitle.
|
||||
#' @param legend_lab String. Option to override legend title/label. Defaults to
|
||||
#' `NULL`, where the metric name will be populated instead.
|
||||
#' @param rank String specifying how to rank the bars. Valid inputs are:
|
||||
#' - `"descending"` - ranked highest to lowest from top to bottom (default).
|
||||
#' - `"ascending"` - ranked lowest to highest from top to bottom.
|
||||
|
@ -86,6 +88,7 @@ create_stacked <- function(data,
|
|||
percent = FALSE,
|
||||
plot_title = "Collaboration Hours",
|
||||
plot_subtitle = paste("Average by", tolower(camel_clean(hrvar))),
|
||||
legend_lab = NULL,
|
||||
rank = "descending",
|
||||
xlim = NULL,
|
||||
text_just = 0.5,
|
||||
|
@ -102,6 +105,11 @@ create_stacked <- function(data,
|
|||
data %>%
|
||||
check_inputs(requirements = required_variables)
|
||||
|
||||
## Handle `legend_lab`
|
||||
if(is.null(legend_lab)){
|
||||
legend_lab <- gsub("_", " ", metrics)
|
||||
}
|
||||
|
||||
## Handling NULL values passed to hrvar
|
||||
if(is.null(hrvar)){
|
||||
data <- totals_col(data)
|
||||
|
@ -251,7 +259,7 @@ create_stacked <- function(data,
|
|||
scale_fill_manual(name="",
|
||||
values = stack_colours,
|
||||
breaks = metrics,
|
||||
labels = gsub("_", " ", metrics)) +
|
||||
labels = legend_lab) +
|
||||
coord_flip() +
|
||||
theme_wpa_basic() +
|
||||
theme(axis.line = element_blank(),
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#'
|
||||
#' @return data frame.
|
||||
#'
|
||||
#' @format A data frame with 41567 rows and 56 variables:
|
||||
#' @format A data frame with 2000 rows and 105 variables:
|
||||
#' \describe{
|
||||
#' \item{PersonId}{ }
|
||||
#' \item{Date}{ }
|
||||
|
|
|
@ -108,6 +108,10 @@
|
|||
#' @importFrom data.table ":=" "%like%" "%between%"
|
||||
#'
|
||||
#' @examples
|
||||
#' # Create a sample small dataset
|
||||
#' orgs <- c("Customer Service", "Financial Planning", "Biz Dev")
|
||||
#' em_data <- em_data[em_data$Organization %in% orgs, ]
|
||||
#'
|
||||
#' # Examples of how to test the plotting options individually
|
||||
#' # Sample of 10 work patterns
|
||||
#' em_data %>%
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
#' @title Plot the distribution of percentage change between periods
|
||||
#' of a WpA metric by the number of employees.
|
||||
#' of a Workplace Analytics metric by the number of employees.
|
||||
#'
|
||||
#' @description
|
||||
#' This function also presents the p-value for the null hypothesis
|
||||
|
|
|
@ -59,6 +59,11 @@
|
|||
#' @family Working Patterns
|
||||
#'
|
||||
#' @examples
|
||||
#'
|
||||
#' # Create a sample small dataset
|
||||
#' orgs <- c("Customer Service", "Financial Planning", "Biz Dev")
|
||||
#' em_data <- em_data[em_data$Organization %in% orgs, ]
|
||||
#'
|
||||
#' # Return visualization of percentage distribution
|
||||
#' workpatterns_area(em_data, return = "plot", values = "percent")
|
||||
#'
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
|
||||
* This is a new release.
|
||||
|
||||
## Submission 1.6.2
|
||||
|
||||
Minor bug fixes.
|
||||
|
||||
## Submission 1.6.1
|
||||
|
||||
Minor bug fixes.
|
||||
|
|
Двоичные данные
data/em_data.rda
Двоичные данные
data/em_data.rda
Двоичный файл не отображается.
|
@ -81,6 +81,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -67,6 +67,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -70,6 +70,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -56,6 +56,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -71,6 +71,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -60,6 +60,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -77,6 +77,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -89,6 +89,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -73,6 +73,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -74,6 +74,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -109,6 +109,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -66,6 +66,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -60,6 +60,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -15,6 +15,7 @@ create_bar(
|
|||
percent = FALSE,
|
||||
plot_title = us_to_space(metric),
|
||||
plot_subtitle = paste("Average by", tolower(camel_clean(hrvar))),
|
||||
legend_lab = NULL,
|
||||
rank = "descending",
|
||||
xlim = NULL,
|
||||
text_just = 0.5,
|
||||
|
@ -58,6 +59,9 @@ percentage signs. Defaults to \code{FALSE}.}
|
|||
|
||||
\item{plot_subtitle}{An option to override plot subtitle.}
|
||||
|
||||
\item{legend_lab}{String. Option to override legend title/label. Defaults to
|
||||
\code{NULL}, where the metric name will be populated instead.}
|
||||
|
||||
\item{rank}{String specifying how to rank the bars. Valid inputs are:
|
||||
\itemize{
|
||||
\item \code{"descending"} - ranked highest to lowest from top to bottom (default).
|
||||
|
@ -130,6 +134,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
@ -188,6 +193,7 @@ Other Flexible:
|
|||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_hist}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -112,6 +112,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
@ -170,6 +171,7 @@ Other Flexible:
|
|||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_hist}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -88,6 +88,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
@ -146,6 +147,7 @@ Other Flexible:
|
|||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_hist}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -85,6 +85,7 @@ Other Visualization:
|
|||
\code{\link{create_boxplot}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
@ -143,6 +144,7 @@ Other Flexible:
|
|||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_hist}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -119,6 +119,7 @@ Other Visualization:
|
|||
\code{\link{create_boxplot}()},
|
||||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
@ -177,6 +178,7 @@ Other Flexible:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_hist}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -78,6 +78,7 @@ Other Visualization:
|
|||
\code{\link{create_boxplot}()},
|
||||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
@ -136,6 +137,7 @@ Other Flexible:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_hist}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -77,6 +77,7 @@ Other Flexible:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -0,0 +1,184 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/create_inc.R
|
||||
\name{create_inc}
|
||||
\alias{create_inc}
|
||||
\alias{create_incidence}
|
||||
\title{Create an incidence analysis reflecting proportion of population scoring above
|
||||
or below a threshold for a metric}
|
||||
\usage{
|
||||
create_inc(
|
||||
data,
|
||||
metric,
|
||||
hrvar,
|
||||
mingroup = 5,
|
||||
threshold,
|
||||
position,
|
||||
return = "plot"
|
||||
)
|
||||
|
||||
create_incidence(
|
||||
data,
|
||||
metric,
|
||||
hrvar,
|
||||
mingroup = 5,
|
||||
threshold,
|
||||
position,
|
||||
return = "plot"
|
||||
)
|
||||
}
|
||||
\arguments{
|
||||
\item{data}{A Standard Person Query dataset in the form of a data frame.}
|
||||
|
||||
\item{metric}{Character string containing the name of the metric,
|
||||
e.g. "Collaboration_hours"}
|
||||
|
||||
\item{hrvar}{Character vector of at most length 2 containing the name of the
|
||||
HR Variable by which to split metrics.}
|
||||
|
||||
\item{mingroup}{Numeric value setting the privacy threshold / minimum group
|
||||
size. Defaults to 5.}
|
||||
|
||||
\item{threshold}{Numeric value specifying the threshold.}
|
||||
|
||||
\item{position}{String containing the below valid values:
|
||||
\itemize{
|
||||
\item \code{"above"}: show incidence of those equal to or above the threshold
|
||||
\item \code{"below"}: show incidence of those equal to or below the threshold
|
||||
}}
|
||||
|
||||
\item{return}{String specifying what to return. This must be one of the
|
||||
following strings:
|
||||
\itemize{
|
||||
\item \code{"plot"}
|
||||
\item \code{"table"}
|
||||
}
|
||||
|
||||
See \code{Value} for more information.}
|
||||
}
|
||||
\value{
|
||||
A different output is returned depending on the value passed to the \code{return} argument:
|
||||
\itemize{
|
||||
\item \code{"plot"}: 'ggplot' object. A heat map.
|
||||
\item \code{"table"}: data frame. A summary table.
|
||||
}
|
||||
}
|
||||
\description{
|
||||
An incidence analysis is generated, with each value in the table reflecting
|
||||
the proportion of the population that is above or below a threshold for a
|
||||
specified metric. There is an option to only provide a single \code{hrvar} in
|
||||
which a bar plot is generated, or two \code{hrvar} values where an incidence table
|
||||
(heatmap) is generated.
|
||||
}
|
||||
\examples{
|
||||
# Only a single HR attribute
|
||||
create_inc(
|
||||
data = sq_data,
|
||||
metric = "After_hours_collaboration_hours",
|
||||
hrvar = "Organization",
|
||||
threshold = 4,
|
||||
position = "above"
|
||||
)
|
||||
|
||||
# Two HR attributes
|
||||
create_inc(
|
||||
data = sq_data,
|
||||
metric = "Collaboration_hours",
|
||||
hrvar = c("LevelDesignation", "Organization"),
|
||||
threshold = 20,
|
||||
position = "below"
|
||||
)
|
||||
|
||||
}
|
||||
\seealso{
|
||||
Other Visualization:
|
||||
\code{\link{afterhours_dist}()},
|
||||
\code{\link{afterhours_fizz}()},
|
||||
\code{\link{afterhours_line}()},
|
||||
\code{\link{afterhours_rank}()},
|
||||
\code{\link{afterhours_summary}()},
|
||||
\code{\link{afterhours_trend}()},
|
||||
\code{\link{collaboration_area}()},
|
||||
\code{\link{collaboration_dist}()},
|
||||
\code{\link{collaboration_fizz}()},
|
||||
\code{\link{collaboration_line}()},
|
||||
\code{\link{collaboration_rank}()},
|
||||
\code{\link{collaboration_sum}()},
|
||||
\code{\link{collaboration_trend}()},
|
||||
\code{\link{create_bar_asis}()},
|
||||
\code{\link{create_bar}()},
|
||||
\code{\link{create_boxplot}()},
|
||||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
\code{\link{create_rank}()},
|
||||
\code{\link{create_sankey}()},
|
||||
\code{\link{create_scatter}()},
|
||||
\code{\link{create_stacked}()},
|
||||
\code{\link{create_tracking}()},
|
||||
\code{\link{create_trend}()},
|
||||
\code{\link{email_dist}()},
|
||||
\code{\link{email_fizz}()},
|
||||
\code{\link{email_line}()},
|
||||
\code{\link{email_rank}()},
|
||||
\code{\link{email_summary}()},
|
||||
\code{\link{email_trend}()},
|
||||
\code{\link{external_network_plot}()},
|
||||
\code{\link{hr_trend}()},
|
||||
\code{\link{hrvar_count}()},
|
||||
\code{\link{hrvar_trend}()},
|
||||
\code{\link{internal_network_plot}()},
|
||||
\code{\link{keymetrics_scan}()},
|
||||
\code{\link{meeting_dist}()},
|
||||
\code{\link{meeting_fizz}()},
|
||||
\code{\link{meeting_line}()},
|
||||
\code{\link{meeting_quality}()},
|
||||
\code{\link{meeting_rank}()},
|
||||
\code{\link{meeting_summary}()},
|
||||
\code{\link{meeting_trend}()},
|
||||
\code{\link{meetingtype_dist_ca}()},
|
||||
\code{\link{meetingtype_dist_mt}()},
|
||||
\code{\link{meetingtype_dist}()},
|
||||
\code{\link{meetingtype_summary}()},
|
||||
\code{\link{mgrcoatt_dist}()},
|
||||
\code{\link{mgrrel_matrix}()},
|
||||
\code{\link{one2one_dist}()},
|
||||
\code{\link{one2one_fizz}()},
|
||||
\code{\link{one2one_freq}()},
|
||||
\code{\link{one2one_line}()},
|
||||
\code{\link{one2one_rank}()},
|
||||
\code{\link{one2one_sum}()},
|
||||
\code{\link{one2one_trend}()},
|
||||
\code{\link{period_change}()},
|
||||
\code{\link{workloads_dist}()},
|
||||
\code{\link{workloads_fizz}()},
|
||||
\code{\link{workloads_line}()},
|
||||
\code{\link{workloads_rank}()},
|
||||
\code{\link{workloads_summary}()},
|
||||
\code{\link{workloads_trend}()},
|
||||
\code{\link{workpatterns_area}()},
|
||||
\code{\link{workpatterns_rank}()}
|
||||
|
||||
Other Flexible:
|
||||
\code{\link{create_bar_asis}()},
|
||||
\code{\link{create_bar}()},
|
||||
\code{\link{create_boxplot}()},
|
||||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_hist}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
\code{\link{create_rank}()},
|
||||
\code{\link{create_sankey}()},
|
||||
\code{\link{create_scatter}()},
|
||||
\code{\link{create_stacked}()},
|
||||
\code{\link{create_tracking}()},
|
||||
\code{\link{create_trend}()},
|
||||
\code{\link{period_change}()}
|
||||
}
|
||||
\concept{Flexible}
|
||||
\concept{Visualization}
|
|
@ -82,6 +82,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
\code{\link{create_rank}()},
|
||||
|
@ -140,6 +141,7 @@ Other Flexible:
|
|||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_hist}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
\code{\link{create_rank}()},
|
||||
|
|
|
@ -87,6 +87,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
\code{\link{create_rank}()},
|
||||
|
@ -145,6 +146,7 @@ Other Flexible:
|
|||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_hist}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
\code{\link{create_rank}()},
|
||||
|
|
|
@ -98,6 +98,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_rank}()},
|
||||
|
@ -156,6 +157,7 @@ Other Flexible:
|
|||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_hist}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_rank}()},
|
||||
|
|
|
@ -125,6 +125,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
@ -183,6 +184,7 @@ Other Flexible:
|
|||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_hist}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -61,6 +61,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
@ -119,6 +120,7 @@ Other Flexible:
|
|||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_hist}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -77,6 +77,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
@ -135,6 +136,7 @@ Other Flexible:
|
|||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_hist}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -14,6 +14,7 @@ create_stacked(
|
|||
percent = FALSE,
|
||||
plot_title = "Collaboration Hours",
|
||||
plot_subtitle = paste("Average by", tolower(camel_clean(hrvar))),
|
||||
legend_lab = NULL,
|
||||
rank = "descending",
|
||||
xlim = NULL,
|
||||
text_just = 0.5,
|
||||
|
@ -43,9 +44,12 @@ Valid inputs are "plot" and "table".}
|
|||
\item{percent}{Logical value to determine whether to show labels as
|
||||
percentage signs. Defaults to \code{FALSE}.}
|
||||
|
||||
\item{plot_title}{An option to override plot title.}
|
||||
\item{plot_title}{String. Option to override plot title.}
|
||||
|
||||
\item{plot_subtitle}{An option to override plot subtitle.}
|
||||
\item{plot_subtitle}{String. Option to override plot subtitle.}
|
||||
|
||||
\item{legend_lab}{String. Option to override legend title/label. Defaults to
|
||||
\code{NULL}, where the metric name will be populated instead.}
|
||||
|
||||
\item{rank}{String specifying how to rank the bars. Valid inputs are:
|
||||
\itemize{
|
||||
|
@ -119,6 +123,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
@ -177,6 +182,7 @@ Other Flexible:
|
|||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_hist}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -63,6 +63,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
@ -121,6 +122,7 @@ Other Flexible:
|
|||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_hist}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -68,6 +68,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
@ -126,6 +127,7 @@ Other Flexible:
|
|||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_hist}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
\alias{em_data}
|
||||
\title{Sample Hourly Collaboration data with Email and IMs}
|
||||
\format{
|
||||
A data frame with 41567 rows and 56 variables:
|
||||
A data frame with 2000 rows and 105 variables:
|
||||
\describe{
|
||||
\item{PersonId}{ }
|
||||
\item{Date}{ }
|
||||
|
|
|
@ -79,6 +79,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -66,6 +66,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -66,6 +66,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -100,6 +100,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -69,6 +69,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -53,6 +53,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -66,6 +66,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -135,6 +135,10 @@ the following:\preformatted{em_data \%>\%
|
|||
}
|
||||
|
||||
\examples{
|
||||
# Create a sample small dataset
|
||||
orgs <- c("Customer Service", "Financial Planning", "Biz Dev")
|
||||
em_data <- em_data[em_data$Organization \%in\% orgs, ]
|
||||
|
||||
# Examples of how to test the plotting options individually
|
||||
# Sample of 10 work patterns
|
||||
em_data \%>\%
|
||||
|
|
|
@ -60,6 +60,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -68,6 +68,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -65,6 +65,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -70,6 +70,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -73,6 +73,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -79,6 +79,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -67,6 +67,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -66,6 +66,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -80,6 +80,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -100,6 +100,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -69,6 +69,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -53,6 +53,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -71,6 +71,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -58,6 +58,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -54,6 +54,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -77,6 +77,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -68,6 +68,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -108,6 +108,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -75,6 +75,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -65,6 +65,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -109,6 +109,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -69,6 +69,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -100,6 +100,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -69,6 +69,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -53,6 +53,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
\name{period_change}
|
||||
\alias{period_change}
|
||||
\title{Plot the distribution of percentage change between periods
|
||||
of a WpA metric by the number of employees.}
|
||||
of a Workplace Analytics metric by the number of employees.}
|
||||
\usage{
|
||||
period_change(
|
||||
data,
|
||||
|
@ -83,6 +83,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
@ -148,6 +149,7 @@ Other Flexible:
|
|||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_hist}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -76,6 +76,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -65,6 +65,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -66,6 +66,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -100,6 +100,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -68,6 +68,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -62,6 +62,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -70,6 +70,11 @@ Uses the Hourly Collaboration query to produce an area plot of
|
|||
Emails sent and IMs sent attended by hour of the day.
|
||||
}
|
||||
\examples{
|
||||
|
||||
# Create a sample small dataset
|
||||
orgs <- c("Customer Service", "Financial Planning", "Biz Dev")
|
||||
em_data <- em_data[em_data$Organization \%in\% orgs, ]
|
||||
|
||||
# Return visualization of percentage distribution
|
||||
workpatterns_area(em_data, return = "plot", values = "percent")
|
||||
|
||||
|
@ -101,6 +106,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -91,6 +91,7 @@ Other Visualization:
|
|||
\code{\link{create_bubble}()},
|
||||
\code{\link{create_dist}()},
|
||||
\code{\link{create_fizz}()},
|
||||
\code{\link{create_inc}()},
|
||||
\code{\link{create_line_asis}()},
|
||||
\code{\link{create_line}()},
|
||||
\code{\link{create_period_scatter}()},
|
||||
|
|
|
@ -76,7 +76,7 @@ Summary of the functions:
|
|||
|
||||
## Queries and Outputs
|
||||
|
||||
To use the functions, the input data must be a data frame object in R. Out-of-the-box queries generated through the WpA tool can be read in as a CSV file into a data frame object. However, the functions user different queries as an input parameter and this must be considered whenever using those queries:
|
||||
To use the functions, the input data must be a data frame object in R. Out-of-the-box queries generated through the Workplace Analytics tool can be read in as a CSV file into a data frame object. However, the functions user different queries as an input parameter and this must be considered whenever using those queries:
|
||||
|
||||
| Query | Description Query | Functions |
|
||||
| ------------------------------- | ------------------------------------------------------------ | -------------------------------------------------- |
|
||||
|
|
Загрузка…
Ссылка в новой задаче