#' Creates a step roadmap 'ROADMAP' object for each step in a project based on PROJECT_ROADMAP_ID
#' @param step_id character vector of length one
#' @import stringr
#' @import dplyr
#' @import googlesheets
#' @export
generate_step_roadmap <-
function(step_id) {
dataframe <-
PROJECT_ROADMAP$CURRENT %>%
dplyr::rename_all(list(~stringr::str_remove_all(.,"^PROJECT_ROADMAP_"))) %>%
dplyr::filter(ID == step_id) %>%
dplyr::select(-TIMESTAMP, -ID) %>%
unlist()
ROADMAP <<- dataframe[dataframe != ""]
GSHEET_ID_VALUES <- ROADMAP[grepl("GSHEET_ID", names(ROADMAP)) == TRUE]
if (length(GSHEET_ID_VALUES) > 0) {
for (i in 1:length(GSHEET_ID_VALUES)) {
gsheet_id <- GSHEET_ID_VALUES[i]
gsheet_name <- googlesheets::gs_key(gsheet_id)$sheet_title
names(GSHEET_ID_VALUES)[i] <- paste0(names(GSHEET_ID_VALUES)[i], ":", gsheet_name)
}
}
ROADMAP <<- c(ROADMAP, GSHEET_ID_VALUES)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.