prisma-flowdiagram / prisma2020 Goto Github PK
View Code? Open in Web Editor NEWProduce PRISMA-2020 compliant flow diagrams
Home Page: https://estech.shinyapps.io/prisma_flowdiagram_latest/
License: Other
Produce PRISMA-2020 compliant flow diagrams
Home Page: https://estech.shinyapps.io/prisma_flowdiagram_latest/
License: Other
An error comes when the a single reason of exclusion is supplied
I'm trying to create a PRISMA flow diagram. The code works fine when the reasons for excluding a study is more than one but fails when I give a single reason. I first experienced it while using the R package but it also happens with the shinyapp.
To Reproduce
Steps to reproduce the behavior (using the example in the PRISMA2020 package documentation):
library(PRISMA2020)
csvFile <- system.file("extdata", "PRISMA.csv", package = "PRISMA2020")
data <- read.csv(csvFile)
data[23, "n"] #three reasons are supplied in the template
data[23, "n"] <- "Reason1, xxx" #Replace with a single reason
data <- PRISMA_data(data)
PRISMA_flowdiagram(data, fontsize = 12, interactive = TRUE, previous = FALSE, other = TRUE)
Expected behavior
A PRISMA flow diagram
Screenshots
error: Error in if (lines > min) { : the condition has length > 1
session info
I'm using PRISMA2020 version 1.1.1 date 2023-02-09 CRAN (R 4.3.1)
I tried using the shinyapp
Here's how to reproduce the error on the shinyapp
More context
Maintaining the ";" at the end of the reason supplied doesn't solve the issue.
Help will be appreciated. Thanks.
Hi,
Whenever I try to upload my edited csv template, the upload completes but then the page says "Disconnected from the server. Reload"?
For the "Excluded" lines, there is no way to have a single entry (with or without text).
The following will generate an Error:
0
4
No relevant outcome, 4
The following WILL work - but it is really clunky to be forced to add the second (empty) reason:
No relevant outcome, 4; Other, 0
ALSO (separate issue), It would be nice to be able to skip the "Records screened" layer. Sometimes we proceed directly to full-text retrieval and eligibility appraisal.
Is your feature request related to a problem? Please describe.
When I produce my PRISMA diagram, I get warnings like:
Warning message:
In PRISMA2020::PRISMA_flowdiagram(data = PRISMAdata_list, detail_databases = T, :
1.5
It's not clear what this refers to, as my PRISMA diagram looks fine.
Describe the solution you'd like
Some more documentation.
Describe alternatives you've considered
NA
Additional context
NA
Hi,
Thanks for your awesome efforts in creating this elaborate diagram / PRISMA flowchart! I've been using your code as inspiration for a graph/flowchart I'm trying to create myself.
I've looked at your code numerous times but cannot figure out how you managed to have the "Identification", "Screening", and "Included" labels to become rotated. I really like this way of identifying the phases of the review, but find it difficult to replicate. Could you perhaps elaborate on how you managed to do this? Or point me towards where you coded this?
Thanks!
Sally
Hi, thanks for this package! I've used the ShinyApp before but am excited to be able to integrate this. :)
I am having a challenging time troubleshooting an issue where PRISMA_data where the boxtext and values are all completed as if they are the first row in the template. Perplexingly, the shiny app works when I upload my completed csv. This leads me to think it's something in my rstudio. Any ideas?
I am not quite sure where to start here - if there is something obvious I have missed please let me know.
`library(readr)
library(PRISMA2020)
PRISMA <- read_csv("PRISMA.csv")
flow_chart_data <- PRISMA2020::PRISMA_data(PRISMA)
flow_chart <- PRISMA2020::PRISMA_flowdiagram(flow_chart_data)
flow_chart
`
It would be nice to be able to skip the "Records screened" layer. Sometimes we proceed directly to full-text retrieval and eligibility appraisal. (taken from #70)
I can't seem to get Specific Databases or Specific Registers to appear when pulling from the csv template via the R package.
I have tried setting the Databases (r6) and Registers (r8) rows to 'xxx', '', 'NA' in the 'n' column (H); and adding in some dummy numbers for the 3 default databases in the template.
I can get all other rows to edit as I wish, so I hope I am doing anything wrong, but any help/edits would be great.
If upload my csv onto the Shiny app it works, but doesn't when running on R.
Data sheet:
data_prisma.csv
R screenshot:
I can turn this off "Reports of studies ..." in the Previous studies box and New studies box, but not in the final box at very bottom of flow diagram.
PR #10 broke recent commit that removed blank lines from the flow diagram
Hi @nealhaddaway,
Prompted by a user I recommended the package to missing the attach()
step and getting a non-informative error, it might be worth reassessing the need for users to attach()
the data before they can run PRISMA_flowchart()
. It would be better to explicitly refer to objects within the PRISMA_flowchart()
function using $
rather than the current set-up (e.g. so tooltips
becomes data$tooltips
). [I imagine this is a hang-over from the old way the function inputs were defined, and is on the to-do list, but wanted to formally flag it 😀]
Some more relevant info on why attach()
can be dangerous here, in case it's useful: https://www.r-bloggers.com/2011/05/to-attach-or-not-attach-that-is-the-question/
I think it would be really great if we could have github actions take some of the hard work out of version bumps / releases.
Functionality I'd like to see:
It would be useful to create an export function to CVS (graph structure) using the shiny app.
There is a bug where the Shiny App is not deployed when following the steps described in the README.md
Step 1: Clone the Git Repo into a folder
Step 2: Build the image with docker build . -t prisma-shiny:1
in the PRISMA2020 directory
Step 3: Deploy the app with docker run -it --rm -p 3838:3838 prisma-shiny:1
Step 4: Go to localhost:3838
We've received the following response from manual inspection on CRAN:
Please add \value to .Rd files regarding exported methods and explain
the functions results in the documentation. Please write about the
structure of the output (class) and also what the output means. (If a
function does not return a value, please document that too, e.g.
\value{No return value, called for side effects} or similar)
Missing Rd-tags:
PRISMA_add_hyperlink_.Rd: \value
Functions which are supposed to only run interactively (e.g. shiny)
should be wrapped in if(interactive()).
Please replace /dontrun{} with if(interactive()){} if possible,
then users can see that the functions are not intended for use in
scripts / functions that are supposed to run non interactively.
The shinyapp version of this tool could benefit from some improvements:
PRISMA_flowchart()
to show, or hide, the blue side labelsIs your feature request related to a problem? Please describe.
Cannot find a way to add an annotation to PRISMA2020 diagram produced.
Describe the solution you'd like
Option to add annotation to specify extra detail e.g. on Web of Science databases searched. Something like the * and † annotations in the image below
Describe alternatives you've considered
Have tried looking at the DiagrammeR docs and stack discussions but there doesn't appear to be an easy way to add an annotation to the empty space in the diagramme, at least once it's produced. Might need to be done within-function as I appreciate DiagrammeR is a tricky package with unusual syntax to work with.
P.S. Amazing package Chris and Neal!
Much like ggsave or jpeg/tiff etc in R, it would be great if we could edit the resolution, width/height of the output plot in R.
This would make it easier for authors to adhere to journal requirements for figures (e.g. dpi, filesize, dimensions).
I have a suggested feature request. I haven't been able to figure out how to add a new line in a box to report multiple numbers. I mostly conduct umbrella reviews, so in our PRISMA chart we often report many different numbers in a single flow chart box. For example, we often report the number of references (n) and reviews (k) assessed for eligibility. We aslo end up reporting the number of included reviews (k) and primary studies (j). It would be great to have a solution that allowed the user to choose the letter for the value reported (e.g., n, k, or j), and be able to report multiple in one box, if desired. One alternative could be to allow the user to modify the n
variable in the template file with the full text of what they want shown ("n = 10; k = 5), rather than just numbers (10). Another option would be to allow the user to add boxes within existing nodes that would add a line in each box to provide more information.
Hi @nealhaddaway,
I think it would be worth adding a convience prisma_save()
function to the package which takes the output of PRISMA_flowchart()
and saves to a file - I just recommended the pacakge to a friend who wasn't sure how to save the resulting image.
I had to pull up the Preprint in order to learn how to use the CSV (i.e., which columns to edit vs leave untouched). ... I never found explanation that to turn off a box, I had to delete all text from the "n" column; I found that out by trial and error.
A few simple instructions, and perhaps a worked example, would be very helpful.
This is a lovely tool - works great - thank you for creating and sharing!
Add a citation.cff file to make it easier to cite with github (https://github.blog/2021-08-19-enhanced-support-citations-github/)
Pretty pedantic, but they are ever so slightly off-centre now (slightly to the left, I think).
Receive the error 'Unable to find repository URL for package' when trying to deploy using rsconnect::deployApp(). Ping @chriscpritchard.
Not sure if doing something wrong, but in R I am unable to find a way to get specific database return counts to appear.
Steps to reproduce the behavior:
In R, I use code from https://rdrr.io/github/nealhaddaway/PRISMA2020/man/PRISMA_flowdiagram.html:
PRISMA_flowdiagram( data, interactive = FALSE, previous = TRUE, other = TRUE, detail_databases = FALSE, detail_registers = FALSE, fontsize = 7, font = "Helvetica", title_colour = "Goldenrod1", greybox_colour = "Gainsboro", main_colour = "Black", arrow_colour = "Black", arrow_head = "normal", arrow_tail = "none", side_boxes = TRUE )
This produces this error in R:
Error in PRISMA_flowdiagram(data, interactive = FALSE, previous = TRUE, : unused arguments (detail_databases = FALSE, detail_registers = FALSE)
The code runs if I remove detail_databases = FALSE, detail_registers = FALSE,
But I cannot get the specific databases to appear not matter what I try (e.g. editing the .csv, adjust R code).
Fixed the CRAN PRISMA2020 has not yet been updated with the GITHUB version.
Is your feature request related to a problem? Please describe.
Would be useful to be able to specify whether or not other sources and previous review arms should be visible by specifying a URL argument
Describe the solution you'd like
A url argument to specify whether to show or hide various features
Describe alternatives you've considered
change the defaults such that the basic diagram is the default
Hello,
Thanks for creating this wonderful package! I have two questions:
Databases:
PsycInfo (n = 10)
PubMed (n = 20)
Scopus (n = 40)
Instead of
Records screened ( n =. 100) ----------------Records excluded (n = 30)
To say:
Titles screened (n = 1000) ------ Reports excluded:
Reason 1 (n = 300)
Reason 2 (n = 100)
Reason 3 (n = 50)
Abstracts screened (n = 200) ----------Reports excluded:
Reason 1 (n = 300)
Reason 2 (n = 100)
Reason 3 (n = 50)
[and then as it is, e.g.:
Records sought for retrieval (n = 200) ---------- Records not retrieved ( n = 40)]
I thank you in advance,
Marietta Papadatou-Pastou
(see one of our recent paper heres: https://psycnet.apa.org/record/2020-23033-001)
Is your feature request related to a problem? Please describe.
No. But is there a way to generate the flow diagram image in 600 or higher dpi? Many journal publishers require high resolution figures. The PRISMA flow diagram on Shiny is in low resolution.
Is there any purpose to the numeric strings added to the inst/extdata/PRISMA.csv file?
I've removed them in 6e5708c, but have another PR open already; this could be easily added if they are in fact not needed.
Allow users to change the wording of text in boxes by pulling in the text from the relevant column in template.csv instead of having them written into PRISMA_data().
When I upload a customised csv file and try to create a diagram I get the following message: "An error has occurred. Check your logs or contact the app author for clarification". Any suggestions of what to do or why this is happening? Thanks a lot!
Building on #46 it's now possible to specify the height and width via rsvg, an option to do this ideally will be built into the shiny app.
A double colon is present in the database and registers excluded reports box. Need to remove one.
Given that a naming convention has begun naturally, I think we should retrospecitvely apply it to the other two functions:
E.g.
PRISMA_flowdiagram()
(no change)
PRISMA_save()
(no change)
read_PRISMAdata()
-> PRISMA_data()
sr_flow_interactive()
-> PRISMA_interactive()
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
Hi there,
I'm new to R and unsure where to start in terms of creating PRISMA diagrams with this package. I looked through the files available on Github but didn't find a step-by-step guide. Without more guidance, I may not stand any chance of using this successfully. In case it helps you help me, I was hoping R could generate output like the shinyapp interactive HTML while also letting me customize its labels and add or manipulate bubbles. Some things I want to do include:
I'll try tagging everyone I can in case it helps draw your attention here. Please be patient - I'm also new to posting on Github!
@chriscpritchard @mcguinlu @nealhaddaway
Thanks in advance,
Manny
Describe the bug
When I do not include previous studies, the total studies included in review and reports of total included studies disappear. Our review does not include any previous studies. But we do need the grey box of total studies.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
still have the grey box of 'Total studies included in review and reports of total included studies' no matter there are previous studies.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
Describe the bug
I wanted to document the process of a systematic review with your Shiny application, which I find particularly useful for automating processes. When I finish it and click on export, in all possible formats the side label "identification" appears as cut off - it appears "entification", "ntification"... And the words go out of the blue bubble.
Expected behavior
I would expect to get a flowchart graphic in which the word "Identification" is not cut off.
Screenshots
I attach one of the flowchart examples with the problem I describe.
Desktop (please complete the following information):
Thanks in advance and congratulations for such great work!! @hammady @chriscpritchard @chapb @mcguinlu
Hello,
I'm trying to build the flowdiagram from a csv file but the numbers do not match those of my csv file(flow_chart_data.csv):
It seems that the problem occurs with the PRISMA_data() function as the list that it prints doesn't match my template. Also, when i upload my csv file in the Shiny.app, it works fine...
I'm doing:
flow_data <- read.csv("flow_chart_data.csv")
flow_data <- PRISMA_data(flow_data)
PRISMA_flowdiagram(flow_data1,
fontsize = 12,
interactive = TRUE,
previous = FALSE,
other = TRUE)
Thank you for your work !
Is your feature request related to a problem? Please describe.
Bit difficult to read box content especially when have a lot of records (this is a problem with PRISMA diagrams generally, not just your version of them!)
Describe the solution you'd like
If could make box titles like 'Records identified from' bold, and maybe subtitles like 'Databases' italic or better spaced, might make things more readable.
Describe alternatives you've considered
NA
Additional context
NA
Is your feature request related to a problem? Please describe.
Not able to easily add boxes in Inclusion section for studies excluded/included (in narrative synthesis) after quality appraisal and studies excluded/included in quantiative synthesis (as in ROSES; see image).
``
Describe the solution you'd like
Add this feature and options to turn qual appraisal/narrative/quant synth boxes on/off.
Describe alternatives you've considered
Had a look at implementing a few changes/additions I wanted myself but DiagrammeR doesn't allow you to easily edit an object once it's created from my experience (unlike ggplot's + feature for example). I also briefly tried editing your source code but got some weird errors with hidden functions that appear to be in the PRISMA2020 package but not immediately accessible to users (e.g. 'PRISMA_get_height_'):
Error in PRISMA_get_height_(stringr::str_count(other_identified_label, :
could not find function "PRISMA_get_height_"
> PRISMA2020::PRISMA_get_height_()
Error: 'PRISMA_get_height_' is not an exported object from 'namespace:PRISMA2020'
Additional context
See discussion with @nealhaddaway on his ROSES package here: nealhaddaway/ROSES_flowchart#2)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.