While I was in graduate school, I had developed a web-based tool for extracting numerical data from images of plots called WebPlotDigitizer (http://arohatgi.info/WebPlotDigitizer). I have continued to develop this in my spare time and it is now a fairly popular tool with over 1000 hits per day and has been mentioned in many published works, blogs, etc. The Google Chrome App (which is really just a link to the URL that loads the app) shows a little over 9000 users and that accounts for only a fraction of total hits.
Over time, many users have shown interest in an offline version and I have tried to cobble together something for Windows users (Embedded Chrome + PHP from PHP Desktop project) but it does not do it enough justice. Another common request is to be able to work with all the datasets together and even perform simple operations or analysis on the digitized data. Some users also want to be able to go through 100s of images that might have been plotted on the same axes.
I was thinking that many of the above requests can be partially addressed if there was an R package that could locally host the HTML5 code (Rhttpd or Rook maybe?) and also let the users access the image and digitized data in real-time via Websocket communication (httpuv maybe?).
The WPD code is quite simple (vanilla HTML5) with all the image processing done on the user’s side and not on the server (but it does require to be hosted on a HTTP server mainly to satisfy some same-origin policies in HTML5). It also has a couple of very simple (easily replaceable) PHP scripts which helps users download the data as CSV or JSON files.
So I am thinking of a package with an API that goes something like the following (assuming appropriate support in WPD code):
library('WPD-R') # Load the package wpd.open('plot.png') # Opens WPD in the browser with plot.png loaded datasets <- wpd.getDatasets() # Fetch digitized data as a list of data frames wpd.loadJSON('myjson.json') # Load a JSON file into WPD that contains calibration, dataset info etc. wpd.loadMask('mask.png') # Specify mask to specify region of interest. # and so on...
I wanted to get some feedback on this to see if this would be something that is genuinely useful to the R community. I was also wondering if rOpenSci could offer any development time, funding or even just some general guidance to help create such a package. I work on WPD only in my spare hours, so I would really appreciate any kind of help. Also since I am a very new R user, I am not too familiar with all the packages that are available so even initial pointers would be nice. I have hacked around a bit with httpuv and so I know that it is certainly possible to do this. I do have some experience building Websockets based apps in other programming environments.
Besides plot digitization, WPD can also do some basic distance and angle measurements that can be used for microscope images. As a stretch goal, I would like to see this develop into something that is used for scientific image analysis in general (Like a mini ImageJ perhaps?), but that would require many man-hours of work.