Book Image

Jupyter Cookbook

By : Dan Toomey
Book Image

Jupyter Cookbook

By: Dan Toomey

Overview of this book

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.
Table of Contents (17 chapters)
Title Page
Copyright and Credits
Packt Upsell
Contributors
Preface
Index

Preface

Jupyter has garnered 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 on your Jupyter Notebook, such as Python, R, Julia, JavaScript, Scala, and Spark. 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 JupyterLabs, 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 this book is 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 with one tool. Prior understanding of data science concepts will be helpful for using this book, but it's not mandatory.

What this book covers

Chapter 1, Installation and Setting up the Environment, teaches you how to install Jupyter on different environments, such as Windows, macOS, Linux, and a server machine.

Chapter 2, Adding an Engine, shows you the steps to add these engines to your Jupyter installation so that you can script your Notebook in the language you like.

Chapter 3, Accessing and Retrieving Data, teaches how to access and retrieve data from files in different formats in Jupyter.

Chapter 4, Visualize Your Analytics, covers recipes for visualizing your analytics in Python, R, and Julia.

Chapter 5, Working with Widgets, describes the wide range of possibilities of widgets in Jupyter.

Chapter 6, Jupyter Dashboards, teaches how to install and enable Jupyter dashboards layout extension to your Notebook. 

Chapter 7,Sharing Your Code, shows you several methods for sharing your Notebook with others, including using different software packages and converting the Notebook into a different form for readers without access to Jupyter.

Chapter 8, Multiuser Jupyter, explores several options for enabling Jupyter Notebooks as a multiuser platform.

Chapter 9, Interacting with Big Data, covers the methods of accessing big data from Jupyter.

Chapter 10, Jupyter Security, investigates the various security mechanisms available for your Jupyter Notebook.

Chapter 11, Jupyter Labs, lets us try new features of Jupyter in a lab environment to create our own sample Notebook.

 

To get the most out of this book

This book is focused on using Jupyter as a platform for data science. It assumes that you have a good understanding of data science concepts and are looking to use Jupyter as your presentation platform.

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/Jupyter-Cookbook. If 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!

Download the color images

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: http://www.packtpub.com/sites/default/files/downloads/JupyterCookbook_ColorImages.pdf.

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: "This script loads in RDatasets (this contains several standard datasets commonly used in data science)."

A block of code is set as follows:

Pkg.add("RDatasets")
using RDatasets
describe(dataset("datasets", "iris"))

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

var msg = "Hello, World"
console.log(msg)

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

python2 -m pip install ipykernel 
python2 -m ipykernel install --user

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: "Once you select the Install button, Anaconda will automatically install R in your environment."

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 [email protected] 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 [email protected].

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 [email protected] 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.