Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Jupyter Cookbook
Jupyter Cookbook

Jupyter Cookbook: Over 75 recipes to perform interactive computing across Python, R, Scala, Spark, JavaScript, and more

eBook
£17.99 £26.99
Paperback
£32.99
Subscription
Free Trial
Renews at £16.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Table of content icon View table of contents Preview book icon Preview Book

Jupyter Cookbook

Adding an Engine

In this chapter, we will cover the following recipes:

  • Adding the Python 3 engine
  • Adding the R engine
  • Adding the Julia engine
  • Adding the JavaScript engine
  • Adding the Scala engine
  • Adding the Spark engine

Introduction

Jupyter provides the ability to use a variety of languages when developing a Notebook. Each of the languages is supported through the use of an engine that provides all of the programmatic interface from the coded language instruction that you write with the underlying Notebook. Several of the popular languages in use are Python, R, Julia, JavaScript, and Scala. In this chapter, we will show you the steps to add these engines to your Jupyter installation so that you can script your Notebook in the language you like.

Each Notebook is expected to be written using one language per engine. There are some accommodations for mixing languages in one Notebook, but these are not expected to have a large amount of use.

Adding the Python 3 engine

Jupyter was originally derived from Python with the IPython project. At that time, Python 2 was the predominant version available for use. For every installation of Jupyter, the default engine provided is Python 2. There are a number of changes involved when moving from Python 2 to Python 3, especially in the underlying libraries that you may be invoking, where parameter and usage changes have occurred.

How to do it...

We will cover the installation of the Python 3 engine and make sure it is running with a script.

Installing the Python 3 engine

...

Adding the R engine

R is both a programming language and a software environment geared toward statistical computing and associated graphics. R has a clean syntax, providing access to a large set of statistical packages, publicly available for free use.

How to do it...

We can add the R engine to our Jupyter installation using Anaconda Navigator or the command line.

Installing the R engine using Anaconda Navigator

R is included with the R Studio option in Anaconda Navigator, as shown in this partial screenshot:

As noted in the screen, the R Studio installation includes...

Adding the Julia engine

Julia is a high-level programming language. It was built with high performance in mind, especially with regard to numerical computing. As such, it is a custom-made language for data science use.

How to do it...

We will now cover the steps to add the Julia engine and execute a Julia script under Jupyter.

Installing the Julia engine

I know that in previous instances of Jupyter, Julia was automatically installed as an engine in non-Windows environments. I do not have access to another environment, so we will walk through the steps to installing Julia...

Adding the JavaScript engine

JavaScript is another engine that can be used with Jupyter. Actually, it is node.js rather than JavaScript. node.js is a superset of JavaScript. node.js is an extension of JavaScript that is expected to be run on a server. As with JavaScript, node.js is cross-platform.

How to do it...

We will go over the steps to install the engine and run a small script.

Installing the Node.JS engine

First, we need to install node.js. It is available from node.js.org. From this site, you can download and install node.js on your machine directly....

Adding the Scala engine

Scala is described as a general-use language that is concise and elegant. Scala is an extension of the Java language and can call upon Java libraries. Its syntax is very similar as well.

How to do it...

We now go over the steps to install the Scala engine and run a Scala script.

Installing the Scala engine

The Scala engine implementation is immature. There may be better installations available for non-Windows environments, but for Windows I followed the following instructions, where someone had built a version of the Scala engine for Windows that...

Adding the Spark engine

Spark is an Apache project that provides an open source computing framework specially geared toward cluster computing. For our purposes, it provides a language called Spark that can be used to access Hadoop information sets.

How to do it...

We install the Spark engine and execute a Spark Jupyter script to show its working, as follows.

Installing the Spark engine

Generally, installing Spark involves two steps:

  • Installing Spark (for your environment)
  • Connecting Spark to your environment (whether standalone or clustered)

The Spark installations are...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Create and share interactive documents with live code, text and visualizations
  • Integrate popular programming languages such as Python, R, Julia, Scala with Jupyter
  • Develop your widgets and interactive dashboards with these innovative recipes

Description

Jupyter has garnered a strong interest in the data science community of late, as it makes common data processing and analysis tasks much simpler. This book is for data science professionals who want to master various tasks related to Jupyter to create efficient, easy-to-share, scientific applications. The book starts with recipes on installing and running the Jupyter Notebook system on various platforms and configuring the various packages that can be used with it. You will then see how you can implement different programming languages and frameworks, such as Python, R, Julia, JavaScript, Scala, and Spark on your Jupyter Notebook. This book contains intuitive recipes on building interactive widgets to manipulate and visualize data in real time, sharing your code, creating a multi-user environment, and organizing your notebook. You will then get hands-on experience with Jupyter Labs, microservices, and deploying them on the web. By the end of this book, you will have taken your knowledge of Jupyter to the next level to perform all key tasks associated with it.

Who is this book for?

This cookbook is for data science professionals, developers, technical data analysts, and programmers who want to execute technical coding, visualize output, and do scientific computing in one tool. Prior understanding of data science concepts will be helpful, but not mandatory, to use this book.

What you will learn

  • Install Jupyter and configure engines for Python, R, Scala and more
  • Access and retrieve data on Jupyter Notebooks
  • Create interactive visualizations and dashboards for different scenarios
  • Convert and share your dynamic codes using HTML, JavaScript, Docker, and more
  • Create custom user data interactions using various Jupyter widgets
  • Manage user authentication and file permissions
  • Interact with Big Data to perform numerical computing and statistical modeling
  • Get familiar with Jupyter s next-gen user interface - JupyterLab

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Apr 30, 2018
Length: 238 pages
Edition : 1st
Language : English
ISBN-13 : 9781788839747
Category :
Languages :
Concepts :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want

Product Details

Publication date : Apr 30, 2018
Length: 238 pages
Edition : 1st
Language : English
ISBN-13 : 9781788839747
Category :
Languages :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
£16.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
£169.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just £5 each
Feature tick icon Exclusive print discounts
£234.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just £5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total £ 95.97
IPython Interactive Computing and Visualization Cookbook
£29.99
Learning Jupyter 5
£32.99
Jupyter Cookbook
£32.99
Total £ 95.97 Stars icon

Table of Contents

11 Chapters
Installation and Setting up the Environment Chevron down icon Chevron up icon
Adding an Engine Chevron down icon Chevron up icon
Accessing and Retrieving Data Chevron down icon Chevron up icon
Visualizing Your Analytics Chevron down icon Chevron up icon
Working with Widgets Chevron down icon Chevron up icon
Jupyter Dashboards Chevron down icon Chevron up icon
Sharing Your Code Chevron down icon Chevron up icon
Multiuser Jupyter Chevron down icon Chevron up icon
Interacting with Big Data Chevron down icon Chevron up icon
Jupyter Security Chevron down icon Chevron up icon
Jupyter Labs Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
(1 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 100%
W. Voorhees Jun 14, 2019
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
This book fails to even get Julia installed. Command line prompts given but fail. Description is terse and fails to explain process in a thorough manner. Following instructions in this book gets you nowhere. Waste of money.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.