Open andrewjmc opened 3 months ago
Yes, that's a nice idea. They are 'kind of' added already at the moment, where I for the implementation followed this table from a recent paper to present the data. It's also shown in our manual:
The first column contains the denominators, but that can of course be different per antibiotic. That's not optimal. Where would you want to present the D or N/D then? Perhaps instead of the %SI?
Thanks, I had noted the ability to provide in aggregate. In the example I gave I have presented by appending to the %SI, e.g. 6
becomes 6% (6/100)
. But it could be implemented with flexibility to provide denominators only, e.g. 6% (100)
. Alternative approaches could duplicate columns (e.g. AMK %
and AMK n/d
) or rows (e.g. CoNS %
and CoNS n/d
).
For me, I'm thinking of it more for downstream processing than for presentation - i.e. could be included as a hover detail in a plotly chart. There are use cases for presentation. If it is provided in a structured way, users can post-process to present richly-formatted tables (e.g. present the denominator in a small font size, different colour).
I have another suggestion. Sometimes one might wish to add raw denominator (and/or numerator) data to an antibiogram for each result. It might be verbose, but could be used for some downstream processing.
I tested a small hard-coded modification to the antibiogram code, with success except for the use of the digits parameter (I must have misunderstood some context). It would be little addition to have a parameter like
raw_n
with defaultNA
and possible values of "N/D" and "D".I'll be interested in your thoughts!
function (x, antibiotics = where(is.sir), mo_transform = "shortname", ab_transform = NULL, syndromic_group = NULL, add_total_n = TRUE, only_all_tested = FALSE, digits = 0, col_mo = NULL, language = get_AMR_locale(), minimum = 30, combine_SI = TRUE, sep = " + ", info = interactive()) { ... out <- out %pm>% pm_summarise(SI = paste0(round(numerator * 100/total, digits = digits), "% (", total, ")")) ... long_to_wide <- function(object, digs) {
object$SI <- round(object$SI * 100, digits = digs)
... }