Nested Knowledge

Bringing Systematic Review to Life

User Tools

Site Tools


wiki:guide:tips:digitize

This is an old revision of the document!


Extracting Data from Images

Have you ever read a paper and realized that the data you need is in a figure, but you can't pull the exact number from it? Have no fear! You can actually digitize these figures to extract the data you need.

Prerequisites

R, RStudio, and the digitize package need to be installed beforehand. See this link for instructions on how to install R and RStudio. See this link for how to install packages.

Steps

  1. Save your high resolution figure as a .jpg, .png, .bmp, or .tiff in the same directory as your working directory in R.

If you don't know where your working directory is, type getwd() in the console. This will spit out where your working directory is. To make sure the file is accessible, you can either change your working directory to be where the file is using setwd(), or you can save the file in the directory location specified by getwd().

  1. Load the digitize package in your R session.
  2. Type in digitize(“filename.filetype”) in the console, changing the filename and file type in accordance with how your file is saved on your computer.
  3. Once you do this, you will need to calibrate your x and y axes, respectively.
    1. On the x axis select two clearly defined points where you have the exact values. Tick marks on the x axis would be great choices.
    2. On the y axis select two clearly defined points where you have the exact values. Tick marks on the y axis would be great choices.
wiki/guide/tips/digitize.1644437211.txt.gz · Last modified: 2022/02/09 20:06 by nicole_hardy_alumni.brown.edu