Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learning Jupyter 5 - Second Edition

You're reading from  Learning Jupyter 5 - Second Edition

Product type Book
Published in Aug 2018
Publisher
ISBN-13 9781789137408
Pages 282 pages
Edition 2nd Edition
Languages

Table of Contents (18) Chapters

Title Page
Packt Upsell
Contributors
Preface
Introduction to Jupyter Jupyter Python Scripting Jupyter R Scripting Jupyter Julia Scripting Jupyter Java Coding Jupyter JavaScript Coding Jupyter Scala Jupyter and Big Data Interactive Widgets Sharing and Converting Jupyter Notebooks Multiuser Jupyter Notebooks What's Next? Other Books You May Enjoy Index

Chapter 10. Sharing and Converting Jupyter Notebooks

Once you have developed your Notebook, you will want to share it with others. There is a typical mechanism available for sharing that we will cover in this chapter—placing your Notebook on an accessible server on the internet.

When you provide a Notebook to another person, they may need the Notebook in a different format, given their system requirements. We will also cover some mechanisms available for providing your Notebook to others in a different format.

In this chapter, we will cover the following topics:

  •  Sharing Notebooks
  •  Converting Notebooks

Sharing Notebooks


The typical mechanism for sharing Notebooks is to provide your Notebook on a website. A website is running on a server or allocated machine space. The server takes care of all the book-keeping involved in running a website, such as keeping track of multiple users and logging people on and off.

In order for the Notebook to be of use though, the website must have Notebook logic installed. A typical website knows how to deliver content as HTML given some source files. The most basic form is pure HTML, where every page you access on the website corresponds exactly to one HTML file on the web server. Other languages could be used to develop the website (such as Java or PHP), so then the server needs to know how to access the HTML it needs from those source files. In our context, the server needs to know how to access your Notebook in order to deliver HTML to users.

 

Even when Notebooks are just running on your local machine, they are running in a browser that is accessing your...

Converting Notebooks


The standard tool for converting Notebooks to other formats is the use of the nbconvert utility. It is built into your Jupyter installation. You can access the tool directly in the user interface for your Notebook. If you open a Notebook and select the Jupyter File menu item, you will see several options for Download as:

The choices are:

Format type

File extension

Notebook

.ipynb

Scala211

.scala

HTML

.html

Markdown

.md

reST

.rst

LaTeX

.tex

PDF via LaTeX

.pdf

Note

Note: Since we are working with a Scala Notebook, that is the language choice provided on the second choice. If we had a Notebook in another language, that other language would be the choice.

For these examples, if we take a Notebook from a previous chapter, the Jupyter Notebook looks like this:

 

Notebook format

The Notebook format (.ipynb) is the native format for your Notebook. We have looked in this file in earlier chapters to see what Jupyter is storing in your Notebook.

You would use the Notebook format if you wanted to give...

Summary


In this chapter, we shared Notebooks on a Notebook server. We added a Notebook to our web server, and we distributed a Notebook using GitHub. We also looked into converting our Notebooks into different formats, such as HTML and PDF.

In the next chapter, we will look into allowing multiple users to interact with a Notebook simultaneously.

lock icon The rest of the chapter is locked
You have been reading a chapter from
Learning Jupyter 5 - Second Edition
Published in: Aug 2018 Publisher: ISBN-13: 9781789137408
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}