color.map <- function(total_levels_vector) {
curr_levels <- total_levels_vector %>%
unique() %>%
as.character() %>%
sort()
color_mapping <- as.data.frame(cbind(
curr_levels,
ci_palette[c(-11, -12)][seq_along(curr_levels)]
),
row.names = FALSE
)
colnames(color_mapping) <- c("MODEL", "COLOR")
color_mapping$MODEL <- as.character(color_mapping$MODEL)
return(color_mapping)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.