I use R (or Python) for ETL and write simple summary statistics while processing the data. I recently wanted to visualize a five-num summary I wrote out for each dataset as a boxplot within a {gt} table, but found that {gtExtras} didn't allow this natively, since it's always assumed that the full set of data is present in the list col passed. In my case, it is not always possible to include the full dataset--nor advisable, due to size--but I'd still like to construct rudimentary boxplots in my table.
It seems like an easy addition, since {ggplot2} already allows this behavior natively (and {sparkline} does as well via spk_chr(., type="box", raw=TRUE)).
Changes
Adds an additional type to gt_plt_dist() called "boxplot_identity" that allows a user to pass variables to define boxplot via ggplot's stat="identity" option rather than raw data
Rationale
I use R (or Python) for ETL and write simple summary statistics while processing the data. I recently wanted to visualize a five-num summary I wrote out for each dataset as a boxplot within a {gt} table, but found that {gtExtras} didn't allow this natively, since it's always assumed that the full set of data is present in the list col passed. In my case, it is not always possible to include the full dataset--nor advisable, due to size--but I'd still like to construct rudimentary boxplots in my table.
It seems like an easy addition, since {ggplot2} already allows this behavior natively (and {sparkline} does as well via
spk_chr(., type="box", raw=TRUE)
).Changes
gt_plt_dist()
called "boxplot_identity" that allows a user to pass variables to define boxplot via ggplot'sstat="identity"
option rather than raw dataExample: