mcguinlu / robvis

A package to quickly visualise risk-of-bias assessment results
https://mcguinlu.github.io/robvis/
Other
58 stars 22 forks source link

Make "Generic" template language friendly #82

Closed mcguinlu closed 4 years ago

mcguinlu commented 4 years ago

[If you are interested in helping out with this issue, comment below and I can provide more details! Thanks in advance for your interest.]

As suggested by Neill Booth of Summaryx via email:

The main hope for a future possible improvement would be an ability to edit or suggest the names for the domains: this would help when using the tool in another language, like Finnish!

It is great that you can “Edit risk-of-bias judgement labels” on the web, which I had noticed, but it would be great if the heading “Judgement”, above those labels, could also be modified, to enable easier switching of languages. It would be great if the “Study” vertical label (on the side of the graphic) could be taken, e.g., from Cell A1, and, eventually, if an “Overall” label could be taken, e.g., from Cell L1 (currently robvis reports an error if I place anything other than “Overall” in Cell L1). For language variants, it would also be great to be able to edit the label “Risk of bias domains”, on the top of the graphic.

This is all feasible, though making the "Overall" column title changeable will require changes to the code, as this is how the template works out what the last column is (required as the number of columns for the "Generic" template is not fixed).

AJFOWLER commented 4 years ago

Keen to help out if you can provide further details.

mcguinlu commented 4 years ago

Hi @AJFOWLER,

Thanks again for reaching out and getting involved!

In essence, this issue is about allowing users, as part of the "Generic" template, to produce robvis figures where all text is in another language. Users can currently change the titles of the domains to a different language by renaming the columns in the uploaded CSV or Excel file, but the X (currently "Risk of bias domains") and Y ("Study") axis titles, and the risk of bias judgements (currently "Low", "Unclear", "High", "Critical", "No information", "Not applicable") are hard coded (e.g. see here for the line hard-coding the "Risk of bias domains" axis label in the "Generic" template).

So my thinking was that, as this will only be applicable to the "Generic" template, we redefine the function to take an optional argument, like:

rob_traffic_light(data, tool, color, psize, quiet, ...)

And then users would be able to use this to define the elements mentioned above when using the "Generic" template, e.g.:


rob_traffic_light(
data = robvis::data_rob2,
tool = "Generic",
x_title = "Risk of bias", # Optional arguments begin
y_title = "Title",
judgement_labels = c("Low", "Unclear", "High", "Critical", "No information", "Not applicable")
)

Note, this is just the way I was thinking of doing it, but if you have any alternative approaches, feel free to try them out! And please let me know if anything is unclear.

mcguinlu commented 4 years ago

Thanks to some great work by @AJFOWLER, this has been closed in https://github.com/mcguinlu/robvis/pull/92 🥳