#' @title biv_bss_scale
#'
#' @param palette Character name of palette in bss_palettes
#' @param discrete Boolean indicating whether color aesthetic is discrete or not
#' @param reverse Boolean indicating whether the palette should be reversed
#' @param ...
#'
#' @return
#' @export
#' @import tidyverse
#' @import tidyr
#' @examples
#'
#'
data <- tibble(a=c(3,2,1,3,2,1,3,2,1),
b= c(3,3,3,2,2,2,1,1,1),
c= c("#3F2949","#435786","#4885C1","#77324C","#806A8A","#89A1C8","#AE3A4E","#BC7C8F","#CABED0"))
data <- data %>% mutate(group = paste0(a,"-",b)) %>% rename(fill = c) %>% select(-a,-b)
biv_bss_scale <- tibble(
"3 - 3" = "#3F2949", # high inequality, high income
"2 - 3" = "#435786",
"1 - 3" = "#4885C1", # low inequality, high income
"3 - 2" = "#77324C",
"2 - 2" = "#806A8A", # medium inequality, medium income
"1 - 2" = "#89A1C8",
"3 - 1" = "#AE3A4E", # high inequality, low income
"2 - 1" = "#BC7C8F",
"1 - 1" = "#CABED0" # low inequality, low income
) %>%
tidyr::gather("group", "fill")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.