Nothing
Are employees embracing flexible work schedules?
KPI_1 <- flex_index_data %>% create_bar( metric = "ChangeHours", hrvar = NULL, return="table") %>% select(ChangeHours) %>% pull(1) %>% round(3)*100 paste(KPI_1, "% define start time") %>% flexdashboard::valueBox(icon = "fa-hourglass-start", color = "#34b1e2")
# Convert `start_hour` into an hour slot string hr_slot <- function(x){ h_str <- as.numeric(substr(x, start = 1, stop = 2)) m_str <- substr(x, start = 3, stop = 4) # keep as string apm <- ifelse(h_str < 12, "AM", "PM") slot1 <- paste0(h_str) slot2 <- paste0(h_str + 1) paste0(slot1, "-", slot2, apm) } flex2_w1_plot <- flex_index_data %>% mutate(Percentage_of_weeks = ChangeHours) %>% create_bar(metric = "Percentage_of_weeks", hrvar = hrvar, rank = NULL, xlim = 1, bar_colour = "#34b1e2", percent = TRUE) flex2_w1_plot + labs(title = "Define start times", subtitle = paste("% of weeks employees start outside", hr_slot(start_hour), "window"))
KPI_3 <- flex_index_data %>% create_bar( metric = "TakeBreaks", hrvar = NULL, return="table") %>% select(TakeBreaks) %>% pull(1) %>% round(3)*100 paste(KPI_3, "% define quiet hours") %>% flexdashboard::valueBox(icon = "fa-stopwatch", color = rgb2hex(1, 147, 157))
flex2_w3_plot <- flex_index_data %>% mutate(Percentage_of_weeks = TakeBreaks) %>% create_bar( metric = "Percentage_of_weeks", hrvar = hrvar, xlim = 1, rank = NULL, bar_colour = rgb2hex(1, 147, 157), percent = TRUE ) flex2_w3_plot + labs(title = "Recurring disconnection time", subtitle = paste("% of weeks employees have recurring disconnection"))
KPI_2 <- flex_index_data %>% create_bar( metric = "ControlHours", hrvar = NULL, return="table") %>% select(ControlHours) %>% pull(1) %>% round(3)*100 paste(KPI_2, "% control active hours") %>% flexdashboard::valueBox(icon = "fa-balance-scale", color = "#00508F")
flex2_w2_plot <- flex_index_data %>% mutate(Percentage_of_weeks = ControlHours) %>% create_bar( metric = "Percentage_of_weeks", hrvar = hrvar, xlim = 1, rank = NULL, bar_colour = "#00508F", percent = TRUE, text_just = 2.5, text_colour = "#00508F" ) flex2_w2_plot + labs(title = "Control active hours", subtitle = paste("% of weeks employees control active hours"))
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.