Skip to content

About

Point-and-click GUI for extracting data from published figures, built on metaDigitise

Topics

Resources

Stars

9 stars

Watchers

4 watching

Forks

Latest commit

 

History

357 Commits

Folders and files

Repository files navigation

shinyDigitise

DOI License: MIT

Important

A development version with new features and bug fixes is available. It adds typed sample sizes for scatterplots and histograms, log axes, step-by-step checks, and fixes for editing groups and reopening figures. See what's new and fixed and how to install it. Found a bug? Please try the development version first, as it may already be fixed.

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.

A large share of the effect sizes in any meta-analysis are read off figures in the primary literature, and that step is usually undocumented, unarchived, and impossible to check. Importantly, both packages allow for replotting and checking of data extraction from graphs — which all contribute to increased reproducibility. The app walks you through calibration and point selection, keeps the calibration data alongside the extracted values, and can redraw your extraction over the original image so errors are visible rather than silent.

Now published in Research Synthesis Methods.

Note on sample sizes for scatterplots and histograms. Always check the expected sample size against the exported n. For these plot types, n comes from the digitised data, not from any sample size you typed. For scatterplots it is the number of points clicked in each group, so if some points overlap or are hidden, n will be too low. For histograms it is the total of the bar heights. This is changed in the development branch in order to avoid any issues with clicks and sample sizes.

Features

  • Five plot types. Mean/error, boxplot, xy mean/error, histogram, and scatterplot.
  • Guided, six-stage workflow. The app walks you through each stage in order.
  • Live orientation and calibration. Flip or rotate a figure with the rotation angle shown on screen, then set the axes by double-clicking.
  • Zoom and adjust on the fly. Click and drag a box over any area and press Zoom to zoom in, and adjust point size and group label positions as you work.
  • Replot and check. Extractions can be redrawn over the source figure, so mistakes are caught rather than archived.
  • Deliberately manual. Semi-automated point detection makes users complacent and introduces errors that are hard to spot; extraction here is your judgement, recorded so others can check it.
  • Output you can archive. Each figure's calibration and clicks are saved in a caldat/ folder inside the image folder, so an extraction can be reopened and checked later. The extracted values are returned as a data frame and saved as ExtractedData.csv in the image folder.

Installation

shinyDigitise is not on CRAN. There are two versions:

Stable version (the master branch):

install.packages("pak")
pak::pak("EIvimeyCook/shinyDigitise")

Development version (the development branch), with the latest features and bug fixes (what's new and fixed):

pak::pak("EIvimeyCook/shinyDigitise@development")

To check which version you have, run packageVersion("shinyDigitise"): 0.1.0 is the stable version and 0.1.1 the development version. To switch between them, run the other install command.

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

pak::pak("joelpick/metaDigitise")

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

Usage

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.

  1. Choose plot type — mean/error, boxplot, xy mean/error, histogram, or 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, double click on the axes in the relevant order and add the variable name and 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 and sample size). This will then appear in the table. Histograms are the exception: they have a single group, Group1, created for you. Clicking the group will allow you to either double click points on the graph (you have to press the click points button first) or delete the group. Lastly, for a mean/error or xy mean/error graph, select the type of error shown (SE, SD or 95% CI); every saved figure needs one for the export to run.
  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).

Tip. You can adjust point size and group name positions on the fly, as well as zoom in on the image by clicking and dragging a box over the desired area and pressing Zoom (press Zoom again with no box drawn to reset).

Bug reports and contributions

Please file issues and feature requests at https://github.com/EIvimeyCook/shinyDigitise/issues. Pull requests are welcome.

Before reporting a bug, please install the development version (see Installation) and check whether the problem is still there. Many bugs are already fixed on the development branch; they are listed in NEWS.md. When you file an issue, please include the output of packageVersion("shinyDigitise") and sessionInfo().

Related tools

Citation

Please cite both shinyDigitise and metaDigitise:

Ivimey-Cook, E. R., Noble, D. W. A., Nakagawa, S., Lajeunesse, M. J., & Pick, J. L. (2023). Advice for improving the reproducibility of data extraction in meta-analysis. Research Synthesis Methods, 14(6), 911–915. https://doi.org/10.1002/jrsm.1663

Pick, J. L., Nakagawa, S., & Noble, D. W. A. (2019). Reproducible, flexible and high-throughput data extraction from primary literature: The metaDigitise R package. Methods in Ecology and Evolution, 10(3), 426–431. https://doi.org/10.1111/2041-210X.13118

A machine-readable CITATION.cff is included, so GitHub's "Cite this repository" button gives formatted APA and BibTeX.

Contact

Edward R. Ivimey-Cook — e.ivimeycook@gmail.com — ORCID 0000-0003-4910-0443

License

Released under the MIT License.

About

Point-and-click GUI for extracting data from published figures, built on metaDigitise

Topics

Resources

Stars

9 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages