#' summarize the wood jam metrics for a DASH reach
#'
#' @param input the name of the tbl_df containing wood jam data for a DASH reach.
#'
#' @author Richie Carmichael
#'
#' @import dplyr janitor
#' @export
#' @return NULL
jamMetrics = function(input = NULL)
{
# import data into function
if(is.character(input) == TRUE) { jam_tbl = read_csv(input) } else { jam_tbl = input }
# calculate jam metrics
jam_tbl = clean_names(jam_tbl, case = "lower_camel") %>%
select(lengthM, widthM, heightM, estimatedNumberOfPieces, parentGlobalId) %>%
mutate(jamVolume = lengthM * widthM * heightM) %>%
select(estimatedNumberOfPieces, jamVolume, parentGlobalId)
return(jam_tbl)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.