Example Article: Geoscientific Visualization in Authorea with iPython Notebooks
Ok, I can’t stand to try it out and test Authorea with a visualization I made for a former lab report. Let’s go.
At first, we have to create a Notebook file. I took the data and Python script that I made for the lab report and put it in a local folder called ipython. Using the terminal, I switched into this folder and called
ipython notebook %matplotlib inline. The latter argument is used to have my plot show up in ipython itself underneath the code cell that runs the plot. I also splitted up the code in smaller chunks and converted some of my code comments into Markdown cells. That makes it nice to read the Notebook and structures the code.
Afterwards I ran every code cell from top to bottom using the Shift + Enter keys. The plot the plot appearing under the last cell was then saved to the folder containing the Notebook file.
Ok, now I have some files containing my code (the Notebook file), the rendered plot image, and the raw data in an Excel Sheet.
To use the image in Authorea, I just need to upload it and reference it inside my latex document. But as a scientist standing for open research, I also want my colleagues and readers to be able to access the raw data and algorithms used to produce the plot, so I upload them, too.
So I created a folder inside my document structure in Authorea called depth-plot and put all files in it. Inside my structure.md file I referenced the image with the relative path and now it shows up at the corresponding position of the document structure (below this text). Because the image and the Notebook file are in the same folder, hovering over the image shows a “launch ipython” button, that anybody can use to open the Notebook inside the browser and play around with it.
Nice, isn’t it?
(At the moment, Notebook sessions opened inside the browser get killed automatically after 5 minutes. I think that’s due to the fact that Authorea is still quite new and should be seen as Beta software. If you want to have a closer look at the Notebooks, you still can download it and play around locally.)