From 65249f614d9f782709b9d8c285c74bbee9cdbcf2 Mon Sep 17 00:00:00 2001 From: Martin Chan Date: Thu, 6 Jan 2022 17:43:19 +0000 Subject: [PATCH 01/15] feat: initiate report content files --- templates/exp-report/README.md | 1 + templates/rtd-report/README.md | 46 ++++++ templates/rtd-report/archive_page.Rmd | 115 +++++++++++++++ templates/rtd-report/page_2.Rmd | 202 ++++++++++++++++++++++++++ templates/rtd-report/rtd_report.Rmd | 52 +++++++ 5 files changed, 416 insertions(+) create mode 100644 templates/rtd-report/README.md create mode 100644 templates/rtd-report/archive_page.Rmd create mode 100644 templates/rtd-report/page_2.Rmd create mode 100644 templates/rtd-report/rtd_report.Rmd diff --git a/templates/exp-report/README.md b/templates/exp-report/README.md index 7723fe0..410141a 100644 --- a/templates/exp-report/README.md +++ b/templates/exp-report/README.md @@ -9,6 +9,7 @@ The following parameters describe the arguments that will be passed to within th - `mingroup`: numeric value specifying the minimum group size to filter the data by. ## Report Type + This is a **flexdashboard** RMarkdown report. The standard YAML header would be as follows: diff --git a/templates/rtd-report/README.md b/templates/rtd-report/README.md new file mode 100644 index 0000000..e4a3dc9 --- /dev/null +++ b/templates/rtd-report/README.md @@ -0,0 +1,46 @@ +# Right to Disconnect Report Template + +## Parameters +The following parameters describe the arguments that will be passed to within the report function. + +- `data`: the input must be a data frame with the columns as a Standard Person Query, which is built using the `sq_data` inbuilt into the 'wpa' package. +- `report_title`: string containing the title of the report, which will be passed to `set_title` within the RMarkdown template. +- `hrvar`: string specifying the HR attribute that will be passed into the single plot. +- `mingroup`: numeric value specifying the minimum group size to filter the data by. + +## Report Type + +This is a **flexdashboard** RMarkdown report. + +The standard YAML header would be as follows: +``` +output: + flexdashboard::flex_dashboard: + orientation: rows + vertical_layout: fill +``` + +## Report output +This report contains one single plot and a print out of the data diagnostics. + +## Data preparation +No data preparation is required as long as it is a Standard Person Query. + +## Examples +For an example of the report output, see `rtd report.html`. + +To run this report, you may run: +```R +generate_report2( + output_format = rmarkdown::html_document(toc = TRUE, toc_depth = 6, theme = "cosmo"), + output_file = "rtd report.html", + output_dir = here("templates", "rtd-report"), # path for output + report_title = "Right to Disconnect Report", + rmd_dir = here("templates", "rtd-report", "rtd-report.Rmd"), # path to RMarkdown file, + + # Custom arguments to pass to `minimal-example/minimal.Rmd` + data = sq_data, + hrvar = "Organization", + mingroup = 5 +) +``` diff --git a/templates/rtd-report/archive_page.Rmd b/templates/rtd-report/archive_page.Rmd new file mode 100644 index 0000000..76288ef --- /dev/null +++ b/templates/rtd-report/archive_page.Rmd @@ -0,0 +1,115 @@ +Page 1 +===================================== + + Column {data-width=150} +----------------------------------------------------------------------- + + ### Average day span + + ```{r} +p_data %>% + # filter(!(DayOfWeek %in% c("Saturday", "Sunday"))) %>% + create_bar( + metric = "Workweek_span", # Day span + hrvar = NULL, + return = "table" + ) %>% + dplyr::pull(`Workweek_span`) %>% + round(digits = 1) %>% + flexdashboard::valueBox( + value = ., + caption = "Average day span" + ) +``` + +### Average collaboration hours + +```{r} +p_data %>% + create_bar( + metric = "Collaboration_hours", + hrvar = NULL, + return = "table" + ) %>% + dplyr::pull(`Collaboration_hours`) %>% + round(digits = 1) %>% + flexdashboard::valueBox( + value = ., + caption = "Average daily collaboration hours" + ) +``` + +### Average after hours + +```{r} +p_data %>% + create_bar( + metric = "After_hours_collaboration_hours", + hrvar = NULL, + return = "table" + ) %>% + dplyr::pull(`After_hours_collaboration_hours`) %>% + round(digits = 1) %>% + flexdashboard::valueBox( + value = ., + caption = "Average daily after hours" + ) +``` + + +### Some placeholder text + +Weekend is assumed to be Saturday and Sunday. + +Minimum activity is defined in the arguments, which is used to identify weekends. + +Column {data-width=425} +---------------------------------------------------------------------------- + + ### Span per day + + ```{r} +p_data %>% + mutate(Workweek_span) %>% + create_bar( + metric = "Workweek_span", + hrvar = hrvar_str + ) +``` + +### Time to disconnect per day + +```{r} +p_data %>% + mutate(Day_Span = Workweek_span) %>% + mutate(`Disconnected hours per day` = 24 - Day_Span) %>% + create_bar( + metric = "Disconnected hours per day", + hrvar = hrvar_str + ) +``` + +Column {data-width=425} +---------------------------------------------------------------------------- + + ### Working hours per day + + ```{r} +p_data %>% + mutate(`Daily Collaboration Hours` = Collaboration_hours) %>% + create_bar( + metric = "Daily Collaboration Hours", + hrvar = hrvar_str + ) +``` + +### Working hours per day + +```{r} +p_data %>% + mutate(`Daily Collaboration Hours` = Collaboration_hours) %>% + create_bar( + metric = "Daily Collaboration Hours", + hrvar = hrvar_str + ) +``` diff --git a/templates/rtd-report/page_2.Rmd b/templates/rtd-report/page_2.Rmd new file mode 100644 index 0000000..3354999 --- /dev/null +++ b/templates/rtd-report/page_2.Rmd @@ -0,0 +1,202 @@ +Page 2 +===================================== + +Column {data-width=33%} +---------------------------------------------------------------------------- + +### Average day span + +```{r} +p_data %>% + # filter(!(DayOfWeek %in% c("Saturday", "Sunday"))) %>% + create_bar( + metric = "Workweek_span", # Day span + hrvar = NULL, + return = "table" + ) %>% + dplyr::pull(`Workweek_span`) %>% + round(digits = 1) %>% + flexdashboard::valueBox( + value = ., + caption = "Average day span" +) +``` + +### Average collaboration hours + +```{r} +p_data %>% + create_bar( + metric = "Collaboration_hours", + hrvar = NULL, + return = "table" + ) %>% + dplyr::pull(`Collaboration_hours`) %>% + round(digits = 1) %>% + flexdashboard::valueBox( + value = ., + caption = "Average daily collaboration hours" +) +``` + +### Average after hours + +```{r} +p_data %>% + create_bar( + metric = "After_hours_collaboration_hours", + hrvar = NULL, + return = "table" + ) %>% + dplyr::pull(`After_hours_collaboration_hours`) %>% + round(digits = 1) %>% + flexdashboard::valueBox( + value = ., + caption = "Average daily after hours" +) +``` + +### Time to disconnect per day + +```{r} +p_data %>% + mutate(Day_Span = Workweek_span) %>% + mutate(`Disconnected hours per day` = 24 - Day_Span) %>% + create_bar( + metric = "Disconnected hours per day", + hrvar = hrvar_str + ) +``` + +Column {data-width=33%} +---------------------------------------------------------------------------- + +### Average day span + +```{r} +p_data %>% + # filter(!(DayOfWeek %in% c("Saturday", "Sunday"))) %>% + create_bar( + metric = "Workweek_span", # Day span + hrvar = NULL, + return = "table" + ) %>% + dplyr::pull(`Workweek_span`) %>% + round(digits = 1) %>% + flexdashboard::valueBox( + value = ., + caption = "Average day span" +) +``` + +### Average collaboration hours + +```{r} +p_data %>% + create_bar( + metric = "Collaboration_hours", + hrvar = NULL, + return = "table" + ) %>% + dplyr::pull(`Collaboration_hours`) %>% + round(digits = 1) %>% + flexdashboard::valueBox( + value = ., + caption = "Average daily collaboration hours" +) +``` + +### Average after hours + +```{r} +p_data %>% + create_bar( + metric = "After_hours_collaboration_hours", + hrvar = NULL, + return = "table" + ) %>% + dplyr::pull(`After_hours_collaboration_hours`) %>% + round(digits = 1) %>% + flexdashboard::valueBox( + value = ., + caption = "Average daily after hours" +) +``` + +### Day span + +```{r} +p_data %>% + mutate(Workweek_span) %>% + create_bar( + metric = "Workweek_span", + hrvar = hrvar_str + ) +``` + +Column {data-width=33%} +---------------------------------------------------------------------------- + +### Average day span + +```{r} +p_data %>% + # filter(!(DayOfWeek %in% c("Saturday", "Sunday"))) %>% + create_bar( + metric = "Workweek_span", # Day span + hrvar = NULL, + return = "table" + ) %>% + dplyr::pull(`Workweek_span`) %>% + round(digits = 1) %>% + flexdashboard::valueBox( + value = ., + caption = "Average day span" +) +``` + +### Average collaboration hours + +```{r} +p_data %>% + create_bar( + metric = "Collaboration_hours", + hrvar = NULL, + return = "table" + ) %>% + dplyr::pull(`Collaboration_hours`) %>% + round(digits = 1) %>% + flexdashboard::valueBox( + value = ., + caption = "Average daily collaboration hours" +) +``` + +### Average after hours + +```{r} +p_data %>% + create_bar( + metric = "After_hours_collaboration_hours", + hrvar = NULL, + return = "table" + ) %>% + dplyr::pull(`After_hours_collaboration_hours`) %>% + round(digits = 1) %>% + flexdashboard::valueBox( + value = ., + caption = "Average daily after hours" +) +``` + +### Working hours per day + +```{r} +p_data %>% + mutate(`Daily Collaboration Hours` = Collaboration_hours) %>% + create_bar( + metric = "Daily Collaboration Hours", + hrvar = hrvar_str + ) +``` + diff --git a/templates/rtd-report/rtd_report.Rmd b/templates/rtd-report/rtd_report.Rmd new file mode 100644 index 0000000..870cb25 --- /dev/null +++ b/templates/rtd-report/rtd_report.Rmd @@ -0,0 +1,52 @@ +--- +params: + data: data + set_title: report_title + hrvar: hrvar + mingroup: mingroup + min_activity: min_activity +date: "`r Sys.Date()`" +--- + +```{r setup, include=FALSE} +knitr::opts_chunk$set( + echo = FALSE, + # fig.height = 9, + # fig.width = 16, + message = FALSE, + warning = FALSE + ) +``` + +```{r include=FALSE} +library(wpa) +library(dplyr) +library(lubridate) +library(flexdashboard) + +## parameter setting +p_data <- params$data # Standard Person Query, grouped by day +hrvar_str <- params$hrvar +mingroup <- params$mingroup +min_activity <- params$min_activity + +p_data <- + p_data %>% + mutate(DayOfWeek = lubridate::wday(Date, label = TRUE, abbr = FALSE) %>% + factor(levels = rev( + c( + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ) + ))) %>% + filter(Emails_sent >= min_activity | Instant_messages_sent >= min_activity) +``` + + +```{r child="page_2.Rmd"} +``` From 3df6672968035244b6cb63884c4b6578807dcb38 Mon Sep 17 00:00:00 2001 From: Martin Chan Date: Fri, 7 Jan 2022 11:08:32 +0000 Subject: [PATCH 02/15] chore: remove unused set_title option --- templates/exp-report/exp_report.Rmd | 5 ----- 1 file changed, 5 deletions(-) diff --git a/templates/exp-report/exp_report.Rmd b/templates/exp-report/exp_report.Rmd index 29ef44d..edde6e9 100644 --- a/templates/exp-report/exp_report.Rmd +++ b/templates/exp-report/exp_report.Rmd @@ -1,14 +1,9 @@ --- params: data: data - set_title: report_title hrvar: hrvar mingroup: mingroup title: "Org Insights | Employee Experience Report" -# output: -# flexdashboard::flex_dashboard: -# orientation: rows -# vertical_layout: fill --- ```{r setup, include=FALSE} From bbd73b4af900a8b3026681ac49cbc4500c2b2f3e Mon Sep 17 00:00:00 2001 From: Martin Chan Date: Fri, 7 Jan 2022 11:09:04 +0000 Subject: [PATCH 03/15] feat: add set_title for right to disconnect report --- templates/rtd-report/rtd_report.Rmd | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/rtd-report/rtd_report.Rmd b/templates/rtd-report/rtd_report.Rmd index 870cb25..66d519a 100644 --- a/templates/rtd-report/rtd_report.Rmd +++ b/templates/rtd-report/rtd_report.Rmd @@ -6,6 +6,7 @@ params: mingroup: mingroup min_activity: min_activity date: "`r Sys.Date()`" +title: "`r params$set_title`" --- ```{r setup, include=FALSE} From 827b429a6efff43020131a03a18884c3f91e0892 Mon Sep 17 00:00:00 2001 From: Martin Chan Date: Fri, 7 Jan 2022 11:09:44 +0000 Subject: [PATCH 04/15] docs: update README on report_title for exp-report --- templates/exp-report/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/templates/exp-report/README.md b/templates/exp-report/README.md index 410141a..1d93392 100644 --- a/templates/exp-report/README.md +++ b/templates/exp-report/README.md @@ -4,8 +4,7 @@ The following parameters describe the arguments that will be passed to within the report function. - `data`: the input must be a data frame with the columns as a Standard Person Query, which is built using the `sq_data` inbuilt into the 'wpa' package. -- `report_title`: string containing the title of the report, which will be passed to `set_title` within the RMarkdown template. -- `hrvar`: string specifying the HR attribute that will be passed into the single plot. +- `hrvar`: string specifying the HR attribute that will be passed into the single plot. - `mingroup`: numeric value specifying the minimum group size to filter the data by. ## Report Type From 31f5ff3a3c67e1df69e5c1ffca25984410767eb5 Mon Sep 17 00:00:00 2001 From: Martin Chan Date: Fri, 7 Jan 2022 14:40:19 +0000 Subject: [PATCH 05/15] feat: update overview dashboard page --- templates/rtd-report/overview.Rmd | 123 ++++++++++++++++++++++++++++ templates/rtd-report/rtd_report.Rmd | 9 +- 2 files changed, 130 insertions(+), 2 deletions(-) create mode 100644 templates/rtd-report/overview.Rmd diff --git a/templates/rtd-report/overview.Rmd b/templates/rtd-report/overview.Rmd new file mode 100644 index 0000000..1eaab02 --- /dev/null +++ b/templates/rtd-report/overview.Rmd @@ -0,0 +1,123 @@ +Overview +===================================== + +Column {data-width=33%} +---------------------------------------------------------------------------- + +### Total employees + +```{r} +p_data %>% + pull(PersonId) %>% + n_distinct() %>% + flexdashboard::valueBox( + value = ., + caption = "total employees", + color = "info" +) +``` + +### Average working day span + +```{r} +avg_vb( + data = p_data, + metric = "Workweek_span", + round = 1, + caption = "Average working day span", + fill = rgb2hex(r = 1, g = 92, b = 85) + ) +``` + +### Working Day Span by Day of Week + +```{r} +bar_dow( + data = p_data, + metric = "Workweek_span", + bar_fill = rgb2hex(r = 1, g = 92, b = 85), + title = "Working Day Span" +) +``` + +Column {data-width=33%} +---------------------------------------------------------------------------- + +### Start date + +```{r} +p_data %>% + extract_date_range(return = "table") %>% + dplyr::pull(Start) %>% + # gsub(pattern = "Data from", replacement = "", x = .) %>% + # gsub(pattern = "of", replacement = "", x = .) %>% + flexdashboard::valueBox( + value = ., + caption = "", + color = rgb2hex(r = 89, g = 89, b = 89) +) +``` + +### Average collaboration hours + +```{r} +avg_vb( + data = p_data, + metric = "Collaboration_hours", + round = 1, + caption = "Average daily collaboration hours", + fill = rgb2hex(r = 1, g = 184, b = 170) + ) +``` + + +### Average daily collaboration hours + +```{r} +bar_dow( + data = p_data, + metric = "Collaboration_hours", + bar_fill = rgb2hex(r = 1, g = 184, b = 170), + title = "Daily collaboration hours" +) +``` + +Column {data-width=33%} +---------------------------------------------------------------------------- + +### End date + +```{r} +p_data %>% + extract_date_range(return = "table") %>% + dplyr::pull(End) %>% + flexdashboard::valueBox( + value = ., + caption = "", + color = rgb2hex(r = 89, g = 89, b = 89) +) +``` + +### Average after hours + +```{r} +avg_vb( + data = p_data, + metric = "After_hours_collaboration_hours", + round = 1, + caption = "Average daily after hours", + fill = rgb2hex(r = 253, g = 98, b = 94) + ) +``` + +### After hours per day + +```{r} +bar_dow( + data = p_data, + metric = "After_hours_collaboration_hours", + bar_fill = rgb2hex(r = 253, g = 98, b = 94), + title = "After hours collaboration" +) +``` + diff --git a/templates/rtd-report/rtd_report.Rmd b/templates/rtd-report/rtd_report.Rmd index 66d519a..2895724 100644 --- a/templates/rtd-report/rtd_report.Rmd +++ b/templates/rtd-report/rtd_report.Rmd @@ -34,7 +34,7 @@ min_activity <- params$min_activity p_data <- p_data %>% mutate(DayOfWeek = lubridate::wday(Date, label = TRUE, abbr = FALSE) %>% - factor(levels = rev( + factor(levels = c( "Sunday", "Monday", @@ -44,10 +44,15 @@ p_data <- "Friday", "Saturday" ) - ))) %>% + )) %>% filter(Emails_sent >= min_activity | Instant_messages_sent >= min_activity) + +source("auxiliary.R") + ``` +```{r child="overview.Rmd"} +``` ```{r child="page_2.Rmd"} ``` From de15a26cf2ddf0220c091313e6c75012ee5f0e67 Mon Sep 17 00:00:00 2001 From: Martin Chan Date: Fri, 7 Jan 2022 16:28:59 +0000 Subject: [PATCH 06/15] feat: update drill down plots --- templates/rtd-report/page_2.Rmd | 229 ++++++++------------------------ 1 file changed, 59 insertions(+), 170 deletions(-) diff --git a/templates/rtd-report/page_2.Rmd b/templates/rtd-report/page_2.Rmd index 3354999..56f9445 100644 --- a/templates/rtd-report/page_2.Rmd +++ b/templates/rtd-report/page_2.Rmd @@ -7,65 +7,58 @@ Column {data-width=33%} ### Average day span ```{r} -p_data %>% - # filter(!(DayOfWeek %in% c("Saturday", "Sunday"))) %>% - create_bar( - metric = "Workweek_span", # Day span - hrvar = NULL, - return = "table" - ) %>% - dplyr::pull(`Workweek_span`) %>% - round(digits = 1) %>% - flexdashboard::valueBox( - value = ., - caption = "Average day span" -) + +heatmap_dow( + data = p_data, + hrvar = hrvar_str, + metric = "Workweek_span", + title = "Average working day span", + grid_fill = rgb2hex(r = 1, g = 92, b = 85) + ) + ``` +### Average day span + +```{r} + +heatmap_dow( + data = p_data, + hrvar = hrvar_str, + metric = "Workweek_span", + title = "Day span", + return = "table" + ) %>% + knitr::kable() + +``` + +Column {data-width=33%} +---------------------------------------------------------------------------- + ### Average collaboration hours ```{r} -p_data %>% - create_bar( - metric = "Collaboration_hours", - hrvar = NULL, - return = "table" - ) %>% - dplyr::pull(`Collaboration_hours`) %>% - round(digits = 1) %>% - flexdashboard::valueBox( - value = ., - caption = "Average daily collaboration hours" -) +heatmap_dow( + data = p_data, + hrvar = hrvar_str, + metric = "Collaboration_hours", + title = "Average collaboration hours", + grid_fill = rgb2hex(r = 1, g = 184, b = 170) + ) ``` -### Average after hours +### Average collaboration hours ```{r} -p_data %>% - create_bar( - metric = "After_hours_collaboration_hours", - hrvar = NULL, - return = "table" - ) %>% - dplyr::pull(`After_hours_collaboration_hours`) %>% - round(digits = 1) %>% - flexdashboard::valueBox( - value = ., - caption = "Average daily after hours" -) -``` - -### Time to disconnect per day - -```{r} -p_data %>% - mutate(Day_Span = Workweek_span) %>% - mutate(`Disconnected hours per day` = 24 - Day_Span) %>% - create_bar( - metric = "Disconnected hours per day", - hrvar = hrvar_str - ) +heatmap_dow( + data = p_data, + hrvar = hrvar_str, + metric = "Collaboration_hours", + title = "Collaboration hours", + return = "table" + ) %>% + knitr::kable() ``` Column {data-width=33%} @@ -74,129 +67,25 @@ Column {data-width=33%} ### Average day span ```{r} -p_data %>% - # filter(!(DayOfWeek %in% c("Saturday", "Sunday"))) %>% - create_bar( - metric = "Workweek_span", # Day span - hrvar = NULL, - return = "table" - ) %>% - dplyr::pull(`Workweek_span`) %>% - round(digits = 1) %>% - flexdashboard::valueBox( - value = ., - caption = "Average day span" -) +heatmap_dow( + data = p_data, + hrvar = hrvar_str, + metric = "After_hours_collaboration_hours", + title = "Average after hours", + grid_fill = rgb2hex(r = 253, g = 98, b = 94) + ) ``` -### Average collaboration hours +### Average day span ```{r} -p_data %>% - create_bar( - metric = "Collaboration_hours", - hrvar = NULL, - return = "table" - ) %>% - dplyr::pull(`Collaboration_hours`) %>% - round(digits = 1) %>% - flexdashboard::valueBox( - value = ., - caption = "Average daily collaboration hours" -) -``` - -### Average after hours - -```{r} -p_data %>% - create_bar( - metric = "After_hours_collaboration_hours", - hrvar = NULL, - return = "table" - ) %>% - dplyr::pull(`After_hours_collaboration_hours`) %>% - round(digits = 1) %>% - flexdashboard::valueBox( - value = ., - caption = "Average daily after hours" -) -``` - -### Day span - -```{r} -p_data %>% - mutate(Workweek_span) %>% - create_bar( - metric = "Workweek_span", - hrvar = hrvar_str - ) -``` - -Column {data-width=33%} ----------------------------------------------------------------------------- - -### Average day span - -```{r} -p_data %>% - # filter(!(DayOfWeek %in% c("Saturday", "Sunday"))) %>% - create_bar( - metric = "Workweek_span", # Day span - hrvar = NULL, - return = "table" - ) %>% - dplyr::pull(`Workweek_span`) %>% - round(digits = 1) %>% - flexdashboard::valueBox( - value = ., - caption = "Average day span" -) -``` - -### Average collaboration hours - -```{r} -p_data %>% - create_bar( - metric = "Collaboration_hours", - hrvar = NULL, - return = "table" - ) %>% - dplyr::pull(`Collaboration_hours`) %>% - round(digits = 1) %>% - flexdashboard::valueBox( - value = ., - caption = "Average daily collaboration hours" -) -``` - -### Average after hours - -```{r} -p_data %>% - create_bar( - metric = "After_hours_collaboration_hours", - hrvar = NULL, - return = "table" - ) %>% - dplyr::pull(`After_hours_collaboration_hours`) %>% - round(digits = 1) %>% - flexdashboard::valueBox( - value = ., - caption = "Average daily after hours" -) -``` - -### Working hours per day - -```{r} -p_data %>% - mutate(`Daily Collaboration Hours` = Collaboration_hours) %>% - create_bar( - metric = "Daily Collaboration Hours", - hrvar = hrvar_str - ) +heatmap_dow( + data = p_data, + hrvar = hrvar_str, + metric = "After_hours_collaboration_hours", + title = "After hours", + return = "table" + ) %>% + knitr::kable() ``` From a245beb50fc89f05fbd76f1aa7139cda6ccfc260 Mon Sep 17 00:00:00 2001 From: Martin Chan Date: Mon, 10 Jan 2022 10:32:28 +0000 Subject: [PATCH 07/15] feat: add channels page --- templates/rtd-report/channels.Rmd | 52 +++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 templates/rtd-report/channels.Rmd diff --git a/templates/rtd-report/channels.Rmd b/templates/rtd-report/channels.Rmd new file mode 100644 index 0000000..99dcbf7 --- /dev/null +++ b/templates/rtd-report/channels.Rmd @@ -0,0 +1,52 @@ +Channels +===================================== + +Column {data-width=50%} +---------------------------------------------------------------------------- + +### Average email hours + +```{r} +bar_dow( + data = p_data, + metric = "Email_hours", + title = "Average email hours", + bar_fill = rgb2hex(r = 242, g = 200, b = 15) + ) +``` + +### Average meeting hours + +```{r} +bar_dow( + data = p_data, + metric = "Meeting_hours", + title = "Average meeting hours", + bar_fill = rgb2hex(r = 253, g = 98, b = 94) + ) +``` + +Column {data-width=50%} +---------------------------------------------------------------------------- + +### Average call hours + +```{r} +bar_dow( + data = p_data, + metric = "Call_hours", + title = "Average call hours", + bar_fill = rgb2hex(r = 138, g = 212, b = 135) + ) +``` + +### Average instant message hours + +```{r} +bar_dow( + data = p_data, + metric = "Instant_Message_hours", + title = "Average IM hours", + bar_fill = rgb2hex(r = 55, g = 70, b = 73) + ) +``` From 7a358140ba5de0347ae9f720307e35d2698c0294 Mon Sep 17 00:00:00 2001 From: Martin Chan Date: Mon, 10 Jan 2022 10:32:48 +0000 Subject: [PATCH 08/15] format: update drill down page title --- templates/rtd-report/page_2.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/rtd-report/page_2.Rmd b/templates/rtd-report/page_2.Rmd index 56f9445..27d7eca 100644 --- a/templates/rtd-report/page_2.Rmd +++ b/templates/rtd-report/page_2.Rmd @@ -1,4 +1,4 @@ -Page 2 +Drill-down ===================================== Column {data-width=33%} From f10e2aa8d751140e397a7d552190152bafa448ec Mon Sep 17 00:00:00 2001 From: Martin Chan Date: Mon, 10 Jan 2022 10:33:03 +0000 Subject: [PATCH 09/15] feat: update main Rmd --- templates/rtd-report/rtd_report.Rmd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/rtd-report/rtd_report.Rmd b/templates/rtd-report/rtd_report.Rmd index 2895724..0399db8 100644 --- a/templates/rtd-report/rtd_report.Rmd +++ b/templates/rtd-report/rtd_report.Rmd @@ -56,3 +56,6 @@ source("auxiliary.R") ```{r child="page_2.Rmd"} ``` + +```{r child="channels.Rmd"} +``` From 1ebb3656d2e217155e9886395ff40ea5ce81daf0 Mon Sep 17 00:00:00 2001 From: Martin Chan Date: Wed, 12 Jan 2022 10:27:37 +0000 Subject: [PATCH 10/15] feat: move to pages subdirectory --- .../rtd-report/{ => pages}/archive_page.Rmd | 0 templates/rtd-report/{ => pages}/channels.Rmd | 0 templates/rtd-report/{ => pages}/overview.Rmd | 0 templates/rtd-report/{ => pages}/page_2.Rmd | 0 templates/rtd-report/rtd_report.Rmd | 17 +++++++++++++---- 5 files changed, 13 insertions(+), 4 deletions(-) rename templates/rtd-report/{ => pages}/archive_page.Rmd (100%) rename templates/rtd-report/{ => pages}/channels.Rmd (100%) rename templates/rtd-report/{ => pages}/overview.Rmd (100%) rename templates/rtd-report/{ => pages}/page_2.Rmd (100%) diff --git a/templates/rtd-report/archive_page.Rmd b/templates/rtd-report/pages/archive_page.Rmd similarity index 100% rename from templates/rtd-report/archive_page.Rmd rename to templates/rtd-report/pages/archive_page.Rmd diff --git a/templates/rtd-report/channels.Rmd b/templates/rtd-report/pages/channels.Rmd similarity index 100% rename from templates/rtd-report/channels.Rmd rename to templates/rtd-report/pages/channels.Rmd diff --git a/templates/rtd-report/overview.Rmd b/templates/rtd-report/pages/overview.Rmd similarity index 100% rename from templates/rtd-report/overview.Rmd rename to templates/rtd-report/pages/overview.Rmd diff --git a/templates/rtd-report/page_2.Rmd b/templates/rtd-report/pages/page_2.Rmd similarity index 100% rename from templates/rtd-report/page_2.Rmd rename to templates/rtd-report/pages/page_2.Rmd diff --git a/templates/rtd-report/rtd_report.Rmd b/templates/rtd-report/rtd_report.Rmd index 0399db8..f574aa6 100644 --- a/templates/rtd-report/rtd_report.Rmd +++ b/templates/rtd-report/rtd_report.Rmd @@ -45,17 +45,26 @@ p_data <- "Saturday" ) )) %>% - filter(Emails_sent >= min_activity | Instant_messages_sent >= min_activity) + filter(Emails_sent >= min_activity | Instant_messages_sent >= min_activity) + +# Order by high to low +hrvar_order <- + p_data %>% + workloads_sum(hrvar = "Site", return = "table", mingroup = 0) %>% + arrange(desc(Workweek_span)) %>% + dplyr::pull(group) + +p_data[[hrvar_str]] <- factor(p_data[[hrvar_str]], levels = rev(hrvar_order)) source("auxiliary.R") ``` -```{r child="overview.Rmd"} +```{r child="pages/overview.Rmd"} ``` -```{r child="page_2.Rmd"} +```{r child="pages/page_2.Rmd"} ``` -```{r child="channels.Rmd"} +```{r child="pages/channels.Rmd"} ``` From 1483de45f2f3b82f70c4e1ee657a4700aac211c8 Mon Sep 17 00:00:00 2001 From: Martin Chan Date: Mon, 24 Jan 2022 16:25:19 +0000 Subject: [PATCH 11/15] feat: rtd report update --- templates/rtd-report/pages/channels_2.Rmd | 56 ++++++++++++++++ templates/rtd-report/pages/drill_1.Rmd | 82 +++++++++++++++++++++++ templates/rtd-report/pages/page_2.Rmd | 40 +++++++++++ templates/rtd-report/rtd_report.Rmd | 10 ++- 4 files changed, 186 insertions(+), 2 deletions(-) create mode 100644 templates/rtd-report/pages/channels_2.Rmd create mode 100644 templates/rtd-report/pages/drill_1.Rmd diff --git a/templates/rtd-report/pages/channels_2.Rmd b/templates/rtd-report/pages/channels_2.Rmd new file mode 100644 index 0000000..9c7f808 --- /dev/null +++ b/templates/rtd-report/pages/channels_2.Rmd @@ -0,0 +1,56 @@ +Channels - % +===================================== + +Column {data-width=50%} +---------------------------------------------------------------------------- + +### Average email hours + +```{r} +bar_dow( + data = p_data, + metric = "Email_hours", + title = "Average email hours", + bar_fill = rgb2hex(r = 242, g = 200, b = 15), + return = "dist" + ) +``` + +### Average meeting hours + +```{r} +bar_dow( + data = p_data, + metric = "Meeting_hours", + title = "Average meeting hours", + bar_fill = rgb2hex(r = 253, g = 98, b = 94), + return = "dist" + ) +``` + +Column {data-width=50%} +---------------------------------------------------------------------------- + +### Average call hours + +```{r} +bar_dow( + data = p_data, + metric = "Call_hours", + title = "Average call hours", + bar_fill = rgb2hex(r = 138, g = 212, b = 135), + return = "dist" + ) +``` + +### Average instant message hours + +```{r} +bar_dow( + data = p_data, + metric = "Instant_Message_hours", + title = "Average IM hours", + bar_fill = rgb2hex(r = 55, g = 70, b = 73), + return = "dist" + ) +``` diff --git a/templates/rtd-report/pages/drill_1.Rmd b/templates/rtd-report/pages/drill_1.Rmd new file mode 100644 index 0000000..2f52d10 --- /dev/null +++ b/templates/rtd-report/pages/drill_1.Rmd @@ -0,0 +1,82 @@ +Time Trend +===================================== + +Column {data-width=100%} {.tabset} +---------------------------------------------------------------------------- + +### Day Span over time + +```{r} +tt_viz( + data = p_data, + metric = "Workweek_span", + threshold = 2, + title = "Day Span" +) + +# avg_ch <- avg_vb(data = p_data, metric = "Workweek_span", return = "raw") +# +# p_data %>% +# group_by(DayOfWeek, Date) %>% +# summarise( +# Workweek_span = mean(Workweek_span, na.rm = TRUE), +# .groups = "drop") %>% +# filter(Workweek_span >= 2) %>% +# ggplot( +# aes( +# x = Date, +# y = Workweek_span, +# colour = DayOfWeek +# ) +# ) + +# geom_point(alpha = 0.8) + +# geom_hline(yintercept = avg_ch, linetype = "dashed", colour = "darkgrey") + +# geom_text( +# data = data.frame( +# AVGCH = avg_ch +# ), +# aes( +# x = p_data %>% +# extract_date_range(return = "table") %>% +# pull(End), +# y = avg_ch, +# label = paste("Average:", round(AVGCH, 1)) +# ), +# vjust = 1, +# colour = "darkgrey", +# size = 2 +# ) + +# theme_wpa_basic() + +# labs( +# title = "Day Span over time", +# subtitle = "By days of the week", +# y = "Day Span", +# caption = paste( +# extract_date_range(p_data, return = "text"), +# "\nShowing day spans of 2 or more." +# )) +``` + +### Collaboration Hours over time + +```{r} +tt_viz( + data = p_data, + metric = "Collaboration_hours", + threshold = 1, + title = "Collaboration hours" +) +``` + +### After Hours over time + +```{r} +tt_viz( + data = p_data, + metric = "After_hours_collaboration_hours", + threshold = 0, + title = "After hours" +) +``` + + diff --git a/templates/rtd-report/pages/page_2.Rmd b/templates/rtd-report/pages/page_2.Rmd index 27d7eca..9462c28 100644 --- a/templates/rtd-report/pages/page_2.Rmd +++ b/templates/rtd-report/pages/page_2.Rmd @@ -4,6 +4,20 @@ Drill-down Column {data-width=33%} ---------------------------------------------------------------------------- +### Average day span + +```{r} + +heatmap_dow( + data = p_data, + hrvar = hrvar_str, + metric = "Workweek_span", + title = "Day span", + return = "topbox", + grid_fill = rgb2hex(r = 1, g = 92, b = 85) + ) +``` + ### Average day span ```{r} @@ -36,6 +50,19 @@ heatmap_dow( Column {data-width=33%} ---------------------------------------------------------------------------- +### Average collaboration hours + +```{r} +heatmap_dow( + data = p_data, + hrvar = hrvar_str, + metric = "Collaboration_hours", + title = "Collaboration hours", + return = "topbox", + grid_fill = rgb2hex(r = 1, g = 184, b = 170) + ) +``` + ### Average collaboration hours ```{r} @@ -64,6 +91,19 @@ heatmap_dow( Column {data-width=33%} ---------------------------------------------------------------------------- +### Average day span + +```{r} +heatmap_dow( + data = p_data, + hrvar = hrvar_str, + metric = "After_hours_collaboration_hours", + title = "After hours", + return = "topbox", + grid_fill = rgb2hex(r = 253, g = 98, b = 94) + ) +``` + ### Average day span ```{r} diff --git a/templates/rtd-report/rtd_report.Rmd b/templates/rtd-report/rtd_report.Rmd index f574aa6..edd66ed 100644 --- a/templates/rtd-report/rtd_report.Rmd +++ b/templates/rtd-report/rtd_report.Rmd @@ -36,13 +36,13 @@ p_data <- mutate(DayOfWeek = lubridate::wday(Date, label = TRUE, abbr = FALSE) %>% factor(levels = c( - "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", - "Saturday" + "Saturday", + "Sunday" ) )) %>% filter(Emails_sent >= min_activity | Instant_messages_sent >= min_activity) @@ -68,3 +68,9 @@ source("auxiliary.R") ```{r child="pages/channels.Rmd"} ``` + +```{r child="pages/channels_2.Rmd"} +``` + +```{r child="pages/drill_1.Rmd"} +``` From 640c8b4296cc1914c4175f6777527f0545b9c826 Mon Sep 17 00:00:00 2001 From: Martin Chan Date: Mon, 24 Jan 2022 16:53:35 +0000 Subject: [PATCH 12/15] docs: update README.md --- templates/rtd-report/README.md | 44 ++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/templates/rtd-report/README.md b/templates/rtd-report/README.md index e4a3dc9..67e71a4 100644 --- a/templates/rtd-report/README.md +++ b/templates/rtd-report/README.md @@ -1,12 +1,14 @@ # Right to Disconnect Report Template ## Parameters + The following parameters describe the arguments that will be passed to within the report function. - `data`: the input must be a data frame with the columns as a Standard Person Query, which is built using the `sq_data` inbuilt into the 'wpa' package. - `report_title`: string containing the title of the report, which will be passed to `set_title` within the RMarkdown template. -- `hrvar`: string specifying the HR attribute that will be passed into the single plot. +- `hrvar`: string specifying the HR attribute that will be passed into the single plot. - `mingroup`: numeric value specifying the minimum group size to filter the data by. +- `min_activity`: numeric value specifying the minimum number of emails or instant messages sent for any given day to be included in the data. You may wish to use this argument to exclude low/non-activity days such as annual leave or public holidays. ## Report Type @@ -21,26 +23,48 @@ output: ``` ## Report output -This report contains one single plot and a print out of the data diagnostics. + +This report contains the following pages: +- `Overview` +- `Drill-down` +- `Channels` +- `Channels - %` +- `Time Trend` ## Data preparation -No data preparation is required as long as it is a Standard Person Query. + +No data preparation is required as long as it is a Standard Person Query grouped at the **daily** level. Daily grouping is essential for the report to display day of the week break down properly. + +## Package pre-requisites + +To run this report, you will need the following R packages installed: +- `wpa` +- `dplyr` +- `lubridate` +- `flexdashboard` ## Examples + For an example of the report output, see `rtd report.html`. -To run this report, you may run: +To run this report, you may run as an example: ```R generate_report2( - output_format = rmarkdown::html_document(toc = TRUE, toc_depth = 6, theme = "cosmo"), + output_format = flexdashboard::flex_dashboard( + orientation = "columns", + vertical_layout = "fill" + ), output_file = "rtd report.html", - output_dir = here("templates", "rtd-report"), # path for output - report_title = "Right to Disconnect Report", - rmd_dir = here("templates", "rtd-report", "rtd-report.Rmd"), # path to RMarkdown file, + output_dir = here::here("templates", "rtd-report"), # path for output + rmd_dir = here::here("templates", + "rtd-report", + "rtd_report.Rmd"), # path to RMarkdown file, # Custom arguments to pass to `minimal-example/minimal.Rmd` - data = sq_data, + data = spq_df, # Variable containing daily person query data frame hrvar = "Organization", - mingroup = 5 + mingroup = 5, + min_activity = 1, + report_title = "Right to Disconnect Report" ) ``` From af284187aa23596b2ef5ea0d14f9324d4d4d50db Mon Sep 17 00:00:00 2001 From: Martin Chan Date: Mon, 24 Jan 2022 16:53:57 +0000 Subject: [PATCH 13/15] chore: clean up drill_1.Rmd --- templates/rtd-report/pages/drill_1.Rmd | 42 -------------------------- 1 file changed, 42 deletions(-) diff --git a/templates/rtd-report/pages/drill_1.Rmd b/templates/rtd-report/pages/drill_1.Rmd index 2f52d10..65abbf9 100644 --- a/templates/rtd-report/pages/drill_1.Rmd +++ b/templates/rtd-report/pages/drill_1.Rmd @@ -13,48 +13,6 @@ tt_viz( threshold = 2, title = "Day Span" ) - -# avg_ch <- avg_vb(data = p_data, metric = "Workweek_span", return = "raw") -# -# p_data %>% -# group_by(DayOfWeek, Date) %>% -# summarise( -# Workweek_span = mean(Workweek_span, na.rm = TRUE), -# .groups = "drop") %>% -# filter(Workweek_span >= 2) %>% -# ggplot( -# aes( -# x = Date, -# y = Workweek_span, -# colour = DayOfWeek -# ) -# ) + -# geom_point(alpha = 0.8) + -# geom_hline(yintercept = avg_ch, linetype = "dashed", colour = "darkgrey") + -# geom_text( -# data = data.frame( -# AVGCH = avg_ch -# ), -# aes( -# x = p_data %>% -# extract_date_range(return = "table") %>% -# pull(End), -# y = avg_ch, -# label = paste("Average:", round(AVGCH, 1)) -# ), -# vjust = 1, -# colour = "darkgrey", -# size = 2 -# ) + -# theme_wpa_basic() + -# labs( -# title = "Day Span over time", -# subtitle = "By days of the week", -# y = "Day Span", -# caption = paste( -# extract_date_range(p_data, return = "text"), -# "\nShowing day spans of 2 or more." -# )) ``` ### Collaboration Hours over time From ed056c7e59f8cfccbddc2be7d0aa155772ddfd76 Mon Sep 17 00:00:00 2001 From: Martin Chan Date: Mon, 24 Jan 2022 16:55:00 +0000 Subject: [PATCH 14/15] feat: create rtd report.html --- templates/rtd-report/rtd report.html | 3486 ++++++++++++++++++++++++++ 1 file changed, 3486 insertions(+) create mode 100644 templates/rtd-report/rtd report.html diff --git a/templates/rtd-report/rtd report.html b/templates/rtd-report/rtd report.html new file mode 100644 index 0000000..f115f1c --- /dev/null +++ b/templates/rtd-report/rtd report.html @@ -0,0 +1,3486 @@ + + + + + + + + + + + +Right to Disconnect Report + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Overview

+
+

Column

+
+

Total employees

+
+ +
+

500

+
+
+

Average working day span

+
+ +
+

8.7

+
+
+

Working Day Span by Day of Week

+
+ +
+

+
+
+
+

Column

+
+

Start date

+
+ +
+

2021-09-11

+
+
+

Average collaboration hours

+
+ +
+

3.9

+
+
+

Average daily collaboration hours

+
+ +
+

+
+
+
+

Column

+
+

End date

+
+ +
+

2021-12-11

+
+
+

Average after hours

+
+ +
+

0.6

+
+
+

After hours per day

+
+ +
+

+
+
+
+
+

Drill-down

+
+

Column

+
+

Average day span

+
+ +
+

Day span

+
+
+

Average day span

+
+ +
+

+
+
+

Average day span

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DayOfWeekSiteDay span
ThursdayTeam G10.53
WednesdayTeam C10.06
TuesdayTeam B10.06
MondayTeam E10.01
WednesdayTeam G9.96
MondayTeam B9.93
TuesdayTeam G9.93
TuesdayTeam C9.92
ThursdayTeam C9.81
TuesdayTeam E9.80
MondayTeam C9.76
ThursdayTeam B9.75
ThursdayTeam E9.74
WednesdayTeam B9.58
WednesdayTeam D9.53
MondayTeam G9.48
WednesdayTeam E9.43
ThursdayTeam D9.43
TuesdayTeam D9.37
MondayTeam D9.30
ThursdayTeam F9.10
FridayTeam C9.09
TuesdayTeam F9.05
ThursdayTeam A9.01
TuesdayTeam A9.00
FridayTeam B8.92
WednesdayTeam A8.91
FridayTeam G8.83
MondayTeam A8.78
WednesdayTeam F8.72
FridayTeam D8.70
FridayTeam A8.68
FridayTeam E8.67
MondayTeam F8.44
FridayTeam F8.22
+
+
+
+

Column

+
+

Average collaboration hours

+
+ +
+

Collaboration hours

+
+
+

Average collaboration hours

+
+ +
+

+
+
+

Average collaboration hours

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DayOfWeekSiteCollaboration hours
WednesdayTeam G7.80
WednesdayTeam C6.28
ThursdayTeam C6.16
ThursdayTeam G5.94
TuesdayTeam C5.79
MondayTeam C5.72
TuesdayTeam D5.71
ThursdayTeam D5.69
MondayTeam G5.69
TuesdayTeam G5.67
TuesdayTeam B5.26
TuesdayTeam E5.25
WednesdayTeam D5.20
MondayTeam D5.14
ThursdayTeam E5.12
ThursdayTeam B5.06
MondayTeam B5.05
FridayTeam C5.05
WednesdayTeam B4.97
FridayTeam G4.85
WednesdayTeam E4.75
MondayTeam E4.70
FridayTeam D4.46
FridayTeam E4.25
FridayTeam B4.25
ThursdayTeam F4.25
TuesdayTeam F4.14
FridayTeam F3.90
MondayTeam F3.87
WednesdayTeam F3.74
WednesdayTeam A3.62
TuesdayTeam A3.56
ThursdayTeam A3.53
FridayTeam A3.53
MondayTeam A3.32
+
+
+
+

Column

+
+

Average day span

+
+ +
+

After hours

+
+
+

Average day span

+
+ +
+

+
+
+

Average day span

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DayOfWeekSiteAfter hours
WednesdayTeam G1.11
WednesdayTeam C0.80
TuesdayTeam A0.71
WednesdayTeam A0.71
ThursdayTeam A0.70
FridayTeam E0.69
WednesdayTeam E0.69
FridayTeam A0.66
MondayTeam A0.62
TuesdayTeam C0.58
ThursdayTeam C0.57
MondayTeam C0.56
TuesdayTeam G0.53
MondayTeam G0.51
ThursdayTeam G0.49
TuesdayTeam E0.40
ThursdayTeam F0.39
ThursdayTeam B0.38
MondayTeam B0.38
ThursdayTeam E0.38
TuesdayTeam B0.37
WednesdayTeam B0.37
MondayTeam E0.36
FridayTeam C0.36
ThursdayTeam D0.36
WednesdayTeam D0.36
TuesdayTeam F0.35
TuesdayTeam D0.34
WednesdayTeam F0.32
MondayTeam D0.31
FridayTeam B0.27
MondayTeam F0.26
FridayTeam D0.23
FridayTeam F0.23
FridayTeam G0.21
+
+
+
+
+

Channels

+
+

Column

+
+

Average email hours

+
+ +
+

+
+
+

Average meeting hours

+
+ +
+

+
+
+
+

Column

+
+

Average call hours

+
+ +
+

+
+
+

Average instant message hours

+
+ +
+

+
+
+
+
+

Channels - %

+
+

Column

+
+

Average email hours

+
+ +
+

+
+
+

Average meeting hours

+
+ +
+

+
+
+
+

Column

+
+

Average call hours

+
+ +
+

+
+
+

Average instant message hours

+
+ +
+

+
+
+
+
+

Time Trend

+
+

Column {data-width=100%}

+
+

Day Span over time

+
+ +
+

+
+
+

Collaboration Hours over time

+
+ +
+

+
+
+

After Hours over time

+
+ +
+

+
+
+
+ +
+ + + + + + + From 2178831fba1b84e59cbf6f3016b69f6852ae4245 Mon Sep 17 00:00:00 2001 From: Martin Chan Date: Mon, 24 Jan 2022 17:22:29 +0000 Subject: [PATCH 15/15] docs: update main `README.md` --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 6092596..06a493c 100644 --- a/README.md +++ b/README.md @@ -55,8 +55,17 @@ generate_report2( mingroup = 5 ) ``` +The arguments that you should pass to each report will differ depending on the report template. Please read the corresponding `README` file in each report template subdirectory for the appropriate example. + For a full example on how to run the `minimal.Rmd` example in this directory, see `example-usage.R` located at the root of this repository. +### Report Templates + +The current report templates are available: +- [Minimal report](https://github.com/microsoft/VivaRMDReportMarketplace/tree/main/templates/minimal-example) - as a minimal example of the report that can be produced with the above workflow. +- [Employee Experience Report](https://github.com/microsoft/VivaRMDReportMarketplace/tree/main/templates/exp-report) - a report on the Employee Experience Index. +- [Right to Disconnect Report](https://github.com/microsoft/VivaRMDReportMarketplace/tree/main/templates/rtd-report) - a report on collaboration metrics related to the Right to Disconnect, including an analysis on weekends. + ## References - https://rstudio.github.io/rstudio-extensions/rmarkdown_templates.html