Friday, December 26, 2014

Importing data into Papeeria

This help article describes how to import data (text files, images, etc.) into Papeeria from external sources

Import from URL

If a file is somewhere on the Internet and you can access it from your web browser, then you can import that file into Papeeria and update it from time to time with a single click.

Possible use cases

  1. You have a computing job somewhere which exports its results as comma or tab separated values file. You want to import the results into Papeeria to build a plot and want to update it when results change. For instance, you may want to pull crude oil prices data from Quandl
  2. You run R script on your laptop and it writes a graph into Dropbox folder. You want to use that image in your paper and update it the next time your run your R script
  3. Your colleague keeps his part of a paper which you collaborate on in GitHub. You want to pull his text into Papeeria from time to time
How it works

Use Import from URL menu item in the workspace menu in the top-left corner of Papeeria workspace. In a dialog you can either create a new file with contents taken from some URL or update already imported files. When you click Update, we send requests, get file contents and write them into associated files in your project. If we have issues with fetching contents, we report them.

Important to know

Many web file storage services provide links which you can share with your colleagues, but very often such links are supposed to be used by human. They lead to a web page with "Download" button and human is supposed to click that button to start downloading. Papeeria is not a human, and it needs a link to "raw" file (that one which human gets by clicking "Download"). Some services, such as GitHub, provide a link to "raw" file in their UI, but some don't. For instance, it is non-trivial to get a raw link from Dropbox or Google Drive interface.

We created a heuristic which transforms a link to Dropbox download page into a link to raw file. So when you paste a link generated by Dropbox into Import from URL dialog, we'll automatically change it.

We do the same thing for converting a link to GitHub's file viewer into raw link to file contents. E.g. we will automatically convert this link to README.md in our repository to its raw link