View source: R/make_chg_shape.R
make_chg_shape | R Documentation |
Creates an svg object based on the direction of change of a performance variable. The svg code can be embedded in a data frame and passed to gt() for prettifying a table. Appears to work well when applied with purrr::map()
make_chg_shape(change_dir)
change_dir |
variable indicating direction of change or not applicable |
gt html() code for an svg
Other MDB helper functions:
calc_growth()
,
format_indicator()
,
label_aggregation()
,
make_achv_shape()
## Not run:
rank_chg("increase") %>% htmltools::html_print()
rank_chg("decrease") %>% htmltools::html_print()
df %>% mutate(chg_dir = purrr::map(present_z_direction, rank_chg))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.