Learning Jupyter 5
Second Edition
Explore interactive computing using Python, Java, JavaScript, R, Julia, and JupyterLab
Dan Toomey
BIRMINGHAM - MUMBAI
Learning Jupyter 5Second Edition
Copyright 2018 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Commissioning Editor: Pravin Dhandre
Acquisition Editor: Tushar Gupta
Content Development Editor: Chris D'cruz
Technical Editor: Suwarna Patil
Copy Editor: Safis Editing
Project Coordinator: Nidhi Joshi
Proofreader: Safis Editing
Indexer: Priyanka Dhadke
Graphics: Tom Scaria
Production Coordinator: Arvindkumar Gupta
First published: November 2016
Second edition: August 2018
Production reference: 1290818
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78913-740-8
www.packtpub.com
mapt.io
Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Why subscribe?
Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals
Improve your learning with Skill Plans built especially for you
Get a free eBook or video every month
Mapt is fully searchable
Copy and paste, print, and bookmark content
PacktPub.com
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details.
At www.PacktPub.com , you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
Contributors
About the author
Dan Toomey has been developing application software for over 20 years. He has worked in a variety of industries and companies, in roles from sole contributor to VP/CTO-level. For the last few years he has been contracting for companies in the eastern Massachusetts area. Dan has been contracting under Dan Toomey Software Corp. Dan has also written R for Data Science, Jupyter for Data Sciences, and the Jupyter Cookbook, all with Packt.
About the reviewer
Juan Toms Oliva Ramos is an environmental engineer from University of Guanajuato, Mexico, with a master's degree in administrative engineering and quality. He has more than 5 years of experience in management and development of patents, technological innovation projects, and technological solutions through the statistical control of processes. He has been a teacher of statistics, entrepreneurship, and technological development since 2011. He has developed prototypes via programming and automation technologies for the improvement of operations, which have been registered for patents.
I want to thank God for giving me wisdom and humility to review this book. I thank Packt for giving me the opportunity to review this amazing book and to collaborate with a group of committed people. I want to thank my beautiful wife, Brenda, our two magic princesses (Maria Regina and Maria Renata), and Angel Tadeo, all of you, give me the strength, happiness, and joy to start a new day. Thanks for being my family.
Packt is searching for authors like you
If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea.
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
, 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.
, 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.
, 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.
Next page