Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
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
1. Introduction to Jupyter 2. Jupyter Python Scripting 3. Jupyter R Scripting 4. Jupyter Julia Scripting 5. Jupyter Java Coding 6. Jupyter JavaScript Coding 7. Jupyter Scala 8. Jupyter and Big Data 9. Interactive Widgets 10. Sharing and Converting Jupyter Notebooks 11. Multiuser Jupyter Notebooks 12. What's Next? 1. Other Books You May Enjoy Index

Preface

Learning Jupyter discusses using Jupyter to record your scripts and produce results for data analysis projects. Jupyter allows data scientists to record their complete analysis process, much in the same way that other scientists use a lab notebook for recording tests, progress, results, and conclusions. Jupyter works in a variety of operating systems, and this book covers the use of Jupyter in Windows and macOS, along with the various steps necessary to enable your specific needs. Jupyter supports a variety of scripting languages by the addition of language engines, so the user can use their particular script in a native fashion.

Who this book is for

This book is written for readers who wants to portray software solutions to others in a natural programming context. Jupyter provides a mechanism to execute a number of different languages and stores the results directly for display, as if the user ran those scripts on their own machine.

What this book covers

Chapter 1, Introduction to Jupyter, investigates the various user interface elements available in a notebook. We will learn how to install the software on a macOS or a PC. We will expose the notebook structure. We will see the typical workflow used when developing a notebook. We will walk through the user interface operations available in a Notebook. And lastly, we will see some of the configuration options available to advanced users for their notebook.

Chapter 2, Jupyter Python Scripting, walks through a simple notebook and the underlying structure. Then, we will see an example of using pandas and looked at a graphics example. Finally, we will look at an example using random numbers in a Python script.

Chapter 3, Jupyter R Scripting, adds the ability to use R scripts in our Jupyter Notebook. We will add an R library that's not included in the standard R installation, and we will make a Hello World script in R. We will then see R data access built-in libraries and some of the simpler graphics and statistics that are automatically generated. We will use an R script to generate 3D graphics in a couple of different ways. We will then perform a standard cluster analysis (which I think is one of the basic uses of R) and use one of the forecasting tools. We will also build a prediction model and test its accuracy.

 

Chapter 4, Jupyter Julia Scripting, adds the ability to use Julia scripts in our Jupyter Notebook. We will add a Julia library that's not included in the standard Julia installation. We will see the basic features of Julia in use, and also outline some of the limitations that are encountered using Julia in Jupyter. We will display graphics using some of the available graphics packages. Finally, we will see parallel processing in action, a small control flow example, and how to add unit testing to your Julia script.

Chapter 5, Jupyter Java Coding, explains how to install the Java engine into Jupyter. We will see examples of the different output presentations available from Java in Jupyter. Then, we will investigate using optional fields. We will see what a compile error looks like in Java in Jupyter. Next, we will see several examples of lambdas. We will use collections for several purposes. Lastly, we will generate summary statistics for one of the standard datasets.

Chapter 6, Jupyter JavaScript Coding, shows how to add JavaScript to our Jupyter Notebook. We will see some of the limitations of using JavaScript in Jupyter. We will look at examples of several packages that are typical of Node.js coding, including graphics, statistics, built-in JSON handling, and creating graphics files with a third-party tool. We will also see how multithreaded applications can be developed using Node.js under Jupyter. Lastly, we will use machine learning to develop a decision tree.

Chapter 7, Jupyter Scala, explains how to install Scala for Jupyter. We will use Scala coding to access large datasets. We will see how Scala can manipulate arrays. We will generate random numbers in Scala. There are examples of higher-order functions and pattern matching. We will use case classes. We will see examples of immutability in Scala. We will build collections using Scala packages, and we will look at Scala traits.

Chapter 8, Jupyter and Big Data, discusses using Spark functionality via Python coding for Jupyter. First, we will install the Spark additions to Jupyter on a Windows machine and a macOS machine. We will write an initial script that just read lines from a text file. We will go further and determine the word count in that file. We will add sorting to the results. There is a script to estimate pi. We will evaluate web log files for anomalies. We will determine a set of prime numbers, and we will evaluate a text stream for some characteristics.

Chapter 9, Interactive Widgets, explains how to add widgets to our Jupyter installation. We will use the interact and interactive widgets to produce a variety of user input controls. We will then look at the widgets package in depth to investigate some of the available user controls, properties available in the containers, and events that can be emitted from the controls, and we'll how to build containers of controls.

 

Chapter 10Sharing and Converting Jupyter Notebooks, covers how to share notebooks on a Notebook server. We will add a notebook to a web server distribute it using GitHub. We will also look into converting our notebooks into different formats, such as HTML and PDF. 

Chapter 11Multiuser Jupyter Notebooks, shows how to expose a notebook so that multiple users can use a Notebook at the same time. We will see an example of the sharing error occurring. We will install a Jupyter server that addresses the problem, and we will use Docker to alleviate the issue as well.

Chapter 12What's Next?, looks into some ideas that may be incorporated into Jupyter in the future.

To get the most out of this book

The steps in this book assume you have a modern Windows or macOS with internet access. There are several points where you will need to install software, so you will need administrative privileges on the machine to do so.

The expectation is you have one or more favorite implementation languages you wish to use on Jupyter.

Download the example code files

You can download the example code files for this book from your account at www.packtpub.com. If you purchased this book elsewhere, you can visit www.packtpub.com/support and register to have the files emailed directly to you.

You can download the code files by following these steps:

  1. Log in or register at www.packtpub.com.
  2. Select the SUPPORT tab.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the book in the Search box and follow the onscreen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR/7-Zip for Windows
  • Zipeg/iZip/UnRarX for Mac
  • 7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Learning-Jupyter-5-Second-Edition. In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

 

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "The default filename, untitled1.txt, is editable."

A block of code is set as follows:

var mycell = Jupyter.notebook.get_selected_cell();
var cell_config = mycell.config;
var code_patch = {
    CodeCell:{
      cm_config:{indentUnit:2}
    }
 }
cell_config.update(code_patch)

Any command-line input or output is written as follows:

jupyter trust /path/to/notebook.ipynb

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "There are three tabs that are displayed: Files, Running, and Clusters."

 

Note

Warnings or important notes appear like this.

Note

Tips and tricks appear like this.

Get in touch

Feedback from our readers is always welcome.

General feedback: Email feedback@packtpub.com and mention the book title in the subject of your message. If you have questions about any aspect of this book, please email us at questions@packtpub.com.

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.

Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you would provide us with the location address or website name. Please contact us at copyright@packtpub.com with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Reviews

Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!

For more information about Packt, please visit packtpub.com.

lock icon The rest of the chapter is locked
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}