Interactive R Notebooks with Jupyter and SageMathCloud

[This article was first published on Statisfactions: The Sounds of Data and Whimsy » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

JupyterDemo

The Jupyter Notebook interface allows users to seamlessly mix code, output, and markdown commentary all in the same document.  Sound a bit like R Markdown? The difference is that in a Jupyter Notebook, you execute the code right in the browser and view everything in the same visual view.

Jupyter, formerly known as the IPython Notebook, has a rich ecosystem, especially among Python users. Science News recently featured Jupyter and its benefits for reproducible research and collaboration; Github, which automagically renders Jupyter notebook files on their website, has a gallery featuring a wide variety of cool static renderings of notebooks.

The name Jupyter (JUlia, PYThon, R) shows that the project has ambitions outside of its Python homeland. But so far, I’ve seen very little discussion in the R community, besides for Tony Hirst’s recent musings on synergies between R Markdown and Jupyter.. R basically works in Jupyter, though it has nothing like the support that knitr now has for shiny and a variety of other fancier interactive R features in R Markdown and Rnw files.

It’s still pretty cool to be able to see the output & change the code together in Jupyter, though. First, I recommend checking out the demo on the Jupyter web site. You can then click on the
“Welcome to R” demo and play around with the code:

R_welcome_Jupyter

To update the output from a compute cell, you can press CTRL + ENTER or simply press the ▶ on the upper toolbar.  Note that Jupyter also has nice Tab-completion, menus, and a host of other features! You can also upload or start your own files.

But, this is just a temporary server.  How can you bring Jupyter into your workflow?  You can install Jupyter and the R Kernel locally on your computer, which is relatively straightforward on Linux but looks like a pain on any other OS.

Another way: there are a few commercial cloud services that host Jupyter notebooks, and the one I like right now is SageMathCloud. The Sage Math project has come a long way on its goals of developing open-source math and collaboration tools, and I see a host of fascinating features on this app, such as course management tools for classroom use, collaborative editing and live video chat alongside a project & file system for managing Jupyter notebooks and Sage Math worksheets, and the ability to open multiple notebooks in different tabs:

Sage_Jupyter

 

I have been startled both by the robustness and activity of the development of Jupyter, and the relatively little discussion from the R community.  Let’s get into Jupyter and see what we can create, and how we can shape the future of this highly promising tool for collaborative, reproducible data science & statistics.

To leave a comment for the author, please follow the link and comment on their blog: Statisfactions: The Sounds of Data and Whimsy » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)