Giter Site home page Giter Site logo

shinydigitise's Introduction

shinyDigitise

shinyDigitise builds upon the popular metaDigitise package and provides users with an interactive UI to help extraction of data from five different plot types. The main functions used in shinyDigitise are called from the metaDigitise package which allows users to extract descriptive statistics from various plot types.

Importantly, both packages allows for replotting and checking of data extraction from graphs - which all contribute to increased reproducibility.

Introduced in this new preprint: A framework for improving the reproducibility of data extraction for meta-analysis. EcoEvoRxiv (2022).

Now published in Research Synthesis Methods.

To install:

devtools::install_github("EIvimeyCook/ShinyDigitise")

If you plan on using shinyDigitise to extract data from xy mean graphs, you need the dev version of metaDigitise.

devtools::install_github("joelpick/metaDigitise")

There is a known bug with some versions of R Studio (rstudio/rstudio#12649). Be sure to update R Studio to the latest version.

To use the shiny app:

Video tutorial here


library(shinyDigitise)
df<-shinyDigitise(Folder where your images are located)

or - where you specify the folder through a menu system within SD.

df<-shinyDigitise()

Basic workflow (the app will walk you through each stage):

If a directory is provided, you'll skip straight to the file selection phase. If not you'll be asked to select a file from the image folder.

NB. you can adjust point size and group name positions on the fly aswell as zoom in on the image by clicking and dragging a box over the desired area.

  1. Choose plot type - mean/error + boxplot + xy mean/error + histogram + scatterplot
  2. Orientate figure - flip or rotate the graph (rotation angle is shown on screen)
  3. Calibrate axes - click calibrate mode on, and, depending on the plot type shown, doublick click on the axes in the relevant order and add the variable name+values. These will then appear on the plot (the size will depend on the point size slider).
  4. Add groups - Clicking add group will cause a pop up to appear to enter data (name + sample size). This will then appear in the table. Clicking the group will allow you to either doubleclick points on the graph (you have to press the click points button first) or delete the group. Lastly, you can select the type of error show (if mean/error graph)
  5. Comments - add a comment to your data.
  6. Finished! The app will close when you've reached the end of your graphs.

To view the extracted data just simply call the object you've created or view the resulting .csv file (which will be saved into the same folder as the images).

shinydigitise's People

Contributors

eivimeycook avatar joelpick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

shinydigitise's Issues

can click points when no row is selected

when a row is selected and then deselected, it is still stored and so click points can be used for this. Its not a massive issue, but could cause problems if for example a user added a new group and then clicked ''click points' without selecting the new group, and so the points were clicked for a previous group.

I think a solution to this could be to clear the last row selected when add mode goes to false. Not sure if its possible to deselect the row in the table at the same time - if so this would be perfect

need group name

if there is only one group its a bit annoying to input a group name

calibrate options missing

The option to click on known values to collaborate does not appear. And the zoom function does not work.
This was tried on a peers system and it worked fine, unsure what might be wrong with my system.
I am using ShinyDigitise version 0.1.0, and RStudio 4.3.1.
Capture

single image processing

add a image_name arguement to shinyDigitise function, and get it to just import that one image. Do same for metaDigitise

metaDigitise functions couldn't be found

Dear @EIvimeyCook,
after launching the app, none of the functions are recognised. Could you please into this issue?

the error on the console is:

data <- shinyDigitise("C:/Users/xxx/Pictures/test")

Listening on http://127.0.0.1:4065
Warning: Error in check_plottype: could not find function "check_plottype"
98: renderText [C:\Users\xxx\AppData\Local\R\win-library\4.2\shinyDigitise\shinyDigitise/server.R#600]
97: func
84: renderFunc
83: output$plottype_check_text
2: shiny::runApp
1: shinyDigitise
Warning: Error in check_orientation: could not find function "check_orientation"
98: renderText [C:\Users\xxx\AppData\Local\R\win-library\4.2\shinyDigitise\shinyDigitise/server.R#607]
97: func
84: renderFunc
83: output$orientation_check_text
2: shiny::runApp
1: shinyDigitise
Warning: Error in check_calibrate: could not find function "check_calibrate"
98: renderText [C:\Users\xxx\AppData\Local\R\win-library\4.2\shinyDigitise\shinyDigitise/server.R#614]
97: func
84: renderFunc
83: output$calibrate_check_text
2: shiny::runApp
1: shinyDigitise
Warning: Error in check_extract: could not find function "check_extract"
98: renderText [C:\Users\xxx\AppData\Local\R\win-library\4.2\shinyDigitise\shinyDigitise/server.R#621]
97: func
84: renderFunc
83: output$extract_check_text
2: shiny::runApp
1: shinyDigitise
Warning: Error in do.call: object 'internal_redraw' not found
170: do.call
169: renderPlot [C:\Users\xxx\AppData\Local\R\win-library\4.2\shinyDigitise\shinyDigitise/server.R#631]
167: func
127: drawPlot
113: reactive:plotObj
97: drawReactive
84: renderFunc
83: output$metaPlot
2: shiny::runApp
1: shinyDigitise
Warning: Error in do.call: object 'internal_redraw' not found
170: do.call
169: renderPlot [C:\Users\xxx\AppData\Local\R\win-library\4.2\shinyDigitise\shinyDigitise/server.R#631]
167: func
127: drawPlot
113: reactive:plotObj
97: drawReactive
84: renderFunc
83: output$metaPlot
2: shiny::runApp
1: shinyDigitise
Warning: Error in : No digitised files to import!
50: stop
49: metaDigitise::getExtracted
30: callback [C:\Users\xxx\AppData\Local\R\win-library\4.2\shinyDigitise\shinyDigitise/server.R#2138]
2: shiny::runApp
1: shinyDigitise
Error: No digitised files to import!

Below is the session info:

R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)

Matrix products: default

locale:
[1] LC_COLLATE=German_Germany.utf8 LC_CTYPE=German_Germany.utf8 LC_MONETARY=German_Germany.utf8 LC_NUMERIC=C
[5] LC_TIME=German_Germany.utf8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] shiny_1.7.5 metaDigitise_1.0.1 shinyDigitise_0.1.0

loaded via a namespace (and not attached):
[1] Rcpp_1.0.11 lattice_0.20-45 prettyunits_1.1.1 png_0.1-8 shinyWidgets_0.8.0 ps_1.7.5 utf8_1.2.3
[8] rprojroot_2.0.3 digest_0.6.33 mime_0.12 R6_2.5.1 pillar_1.9.0 rlang_1.1.1 uuid_1.1-1
[15] shinyalert_3.0.0 curl_5.0.2 rstudioapi_0.15.0 fontawesome_0.5.2 tippy_0.1.0 miniUI_0.1.1.1 callr_3.7.3
[22] urlchecker_1.0.1 jquerylib_0.1.4 Matrix_1.5-1 DT_0.29 reticulate_1.31 textshaping_0.3.6 desc_1.4.2
[29] devtools_2.4.5 shinyjs_2.1.0 stringr_1.5.0 htmlwidgets_1.6.4 xfun_0.40 compiler_4.2.2 httpuv_1.6.11
[36] systemfonts_1.0.4 pkgconfig_2.0.3 pkgbuild_1.4.2 htmltools_0.5.7 tibble_3.2.1 fansi_1.0.4 crayon_1.5.2
[43] withr_3.0.0 later_1.3.1 grid_4.2.2 jsonlite_1.8.7 xtable_1.8-4 lifecycle_1.0.4 magrittr_2.0.3
[50] cli_3.6.1 stringi_1.7.12 cachem_1.0.8 fs_1.6.3 promises_1.2.1 remotes_2.4.2.1 bslib_0.6.1
[57] ragg_1.2.5 shinyFiles_0.9.3 ellipsis_0.3.2 vctrs_0.6.3 tools_4.2.2 glue_1.6.2 purrr_1.0.2
[64] crosstalk_1.2.1 processx_3.8.2 pkgload_1.3.2.1 fastmap_1.1.1 yaml_2.3.7 sessioninfo_1.2.2 memoise_2.0.1
[71] knitr_1.45 profvis_0.3.8 sass_0.4.7 usethis_2.2.2

I have also attached the GUI screenshot with the error.
shinydigitise_error

update instructions

need to make sure instructions are much more helpful and appear when they are meant to

Scatterplot bug

Bug occurs when group info is edited - changes all points to the same colour and shape

increase DT page length

I think there is currently a limit to what the DT table can display - it didnt display 13 groups....

zoom

use plot_brush to get zoom coords to zoom in, and plot_dblclick to zoom out. update internal_redraw to have a zoom argument, and then plot given coords

Ongoing issue with Windows

We are aware that the package currently works fine on Macs but users have reported issues on Windows.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.