31,19 €
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.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Seitenzahl: 163
Veröffentlichungsjahr: 2018
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 authors, 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 DhandreAcquisition Editor: Tushar GuptaContent Development Editor: Cheryl DsaTechnical Editor: Sagar SawantCopy Editor: Vikrant Phadke, Safis EditingProject Coordinator: Nidhi JoshiProofreader: Safis EditingIndexer: Rekha NairGraphics: Tania DuttaProduction Coordinator: Arvindkumar Gupta
First published: April 2018
Production reference: 1270418
Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK.
ISBN 978-1-78883-944-0
www.packtpub.com
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.
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
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 [email protected] 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.
Dan Toomey has been developing applications for over 20 years. He has worked in a variety of industries and companies of all sizes, in roles ranging from sole contributor to the VP/CTO level. For the last 10 years or so, he has been contracting with companies in the eastern Massachusetts area, under Dan Toomey Software Corp. Dan has also written a few books with Packt Publishing.
Nikhil Borkar holds the CQF designation and a PG degree in Quantitative Finance from the University of Mumbai. He works as an independent fintech and legal consultant. Prior to this, he was with Morgan Stanley Capital International as a Global RFP Project Manager. He has worked on Quantitative Finance and economic research projects using R, Python, and Excel VBA. He loves to approach problems in a multidisciplinary, holistic way. He is actively working on machine learning, AI, and deep learning projects.
Nikhil Akki started his career in IT support, and within a couple of years shifted to sales and marketing (after pursing MBA). Nikhil works at Deloitte in Mumbai as data science consultant. He has hands-on experience in building enterprise-grade - NLP, machine learning, and recommender system-based applications for his clients. He is often found taking up MOOCs and Kaggle problems. Prior to his current role, he taught Business Statistics at postgraduate level in an upcoming B-School in South Mumbai.
Juan Tomás Oliva Ramos is an environmental engineer from the University of Guanajuato, Mexico, with a master's degree in administrative engineering and quality. He has over five years of experience in management and development of patents, technological innovation projects, and technological solutions through 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 improvement of operations, which have been registered for patents.
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.
Title Page
Copyright and Credits
Jupyter Cookbook
Packt Upsell
Why subscribe?
PacktPub.com
Contributors
About the author
About the reviewers
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
Installation and Setting up the Environment
Introduction
Installing Jupyter on Windows
Getting ready
How to do it...
Installing Jupyter directly
Installing Jupyter through Anaconda
Installing Jupyter on the Mac
Getting ready
How to do it...
Installing Jupyter on the Mac via Anaconda
Installing Jupyter on the the Mac via the command line
Installing Jupyter on Linux
How to do it...
Installing Jupyter on a server
How to do it...
Example Notebook with a user data collision
Adding an Engine
Introduction
Adding the Python 3 engine
How to do it...
Installing the Python 3 engine
Running a Python 3 script
Adding the R engine
How to do it...
Installing the R engine using Anaconda Navigator
Installing the R engine via command line
Running an R Script
Adding the Julia engine
How to do it...
Installing the Julia engine
Running a Julia script
Adding the JavaScript engine
How to do it...
Installing the Node.JS engine
Running a Node.JS script
Adding the Scala engine
How to do it...
Installing the Scala engine
Running a Scala script
Adding the Spark engine
How to do it...
Installing the Spark engine
Running a Spark script
Accessing and Retrieving Data
Introduction
Reading CSV files
Getting ready
How to do it...
How it works...
Reading JSON files
Getting ready
How to do it...
How it works...
Accessing a database
Getting ready
How to do it...
How it works...
Reading flat files
Getting ready
How to do it...
How it works...
Reading text files
Getting ready
How to do it...
How it works...
Visualizing Your Analytics
Introduction
Generating a line graph using Python
How to do it...
How it works...
Generating a histogram using Python
How to do it...
How it works...
Generating a density map using Python
How to do it...
How it works...
Plotting 3D data using Python
How to do it...
How it works...
Present a user-interactive graphic using Python
How to do it...
How it works...
Visualizing with R
How to do it...
How it works...
Generate a regression line of data using R
How to do it...
How it works...
Generate an R lowess line graph
How to do it...
How it works...
Producing a Scatter plot matrix using R
How to do it...
How it works...
Producing a bar chart using R
How to do it...
How it works...
Producing a word cloud using R
How to do it...
How it works...
Visualizing with Julia
Getting ready
How to do it...
Drawing a Julia scatter diagram of Iris data using Gadfly
How to do it...
Drawing a Julia histogram using Gadfly
How to do it...
How it works...
Drawing a Julia line graph using the Winston package
How to do it...
How it works...
Working with Widgets
Introduction
What are widgets?
Getting ready
How to do it...
How it works...
Using ipyleaflet widgets
Getting ready
How to do it...
How it works...
Using ipywidgets
Getting ready
How to do it...
How it works...
Using a widget container
How to do it...
Using an interactive widget
How to do it...
How it works...
Using an interactive text widget
How to do it...
How it works...
Linking widgets together
How to do it...
How it works...
Another ipywidgets linking example
How to do it...
How it works...
Using a cookie cutter widget
Getting ready
How to do it...
How it works...
Developing an OPENGL widget
Getting ready
Creating a simple orbit of one object
How to do it...
How it works...
Using a complex orbit of multiple objects
How to do it...
How it works...
Jupyter Dashboards
Introduction
What is Jupyter dashboards?
Getting ready
How to do it...
There's more...
Creating an R dashboard
How to do it...
How it works...
Create a Python dashboard
How to do it...
Creating a Julia dashboard
How to do it...
Develop a JavaScript (Node.js) dashboard
How to do it...
Sharing Your Code
Introduction
Sharing your Notebook using server software
Using a Notebook server
How to do it...
Using web encryption for your Notebook
Using a web server
How to do it...
Sharing your Notebook through a public server
How to do it...
Sharing your Notebook through Docker
How to do it...
Sharing your Notebook using nbviewer
How to do it...
Converting your Notebook into a different format
How to do it...
Converting Notebooks to R
How to do it...
How it works...
Converting Notebooks to HTML
How to do it...
How it works...
Converting Notebooks to Markdown
How to do it...
How it works...
Converting Notebooks to reStructedText
How to do it...
How it works...
Converting Notebooks to Latex
How to do it...
How it works...
Converting Notebooks to PDF
How to do it...
How it works...
Multiuser Jupyter
Introduction
Why multiuser?
How to do it...
How it works...
Providing multiuser with JupyterHub
Getting ready
How to do it...
Providing multiuser with Docker
Getting ready
How to do it...
Running your Notebook in Google Cloud Platform
Getting ready
Set up your GC project
Create a Cloud storage bucket
Create a cluster
Install Jupyter
Download the script
Execute the script
Configure Jupyter
How to do it...
Next steps
There's more...
Running your Notebook in AWS
Getting ready
How to do it...
How it works...
There's more...
Running your Notebook in Azure
Getting ready
How to do it...
How it works...
There's more...
Interacting with Big Data
Introduction
Obtaining a word count from a big-text data source
How to do it...
How it works...
Obtaining a sorted word count from a big-text source
How to do it...
How it works...
Examining big-text log file access
How to do it...
How it works...
Computing prime numbers using parallel operations
How to do it...
How it works...
Analyzing big-text data
How to do it...
How it works...
Analyzing big data history files
How to do it...
How it works...
Jupyter Security
Introduction
How much risk?
Known vulnerabilities
Web attack strategies
Inherent Jupyter security issues
Security mechanisms built into Jupyter
How to do it...
Token-based authentication
Password authentication
No authentication
Using SSL
How to do it...
Creating an SSL certificate
Apply the SSL certificate
The Jupyter trust model
How to do it...
Trust overrides
Collaboration
Controlling network access
How to do it...
Controlling domain access
Controlling IP access
Additional practices
How to do it...
Server IP address
URL prefix
No browser
Jupyter Labs
Introduction
JupyterLab features
Installing and starting JupyterLab
How to do it...
Installing JupyterLab
Starting JupyterLab
JupyterLab display
How to do it...
JupyterLab menus
How to do it...
Starting a Notebook
How to do it...
Starting a console
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.
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.
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.
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.
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:
Log in or register at
www.packtpub.com
.
Select the
SUPPORT
tab.
Click on
Code Downloads & Errata
.
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!
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.