Awesome Jupyter Notebooks

Note that Matt Davis has conveniently written a set of bookmarklets and extensions to make it a one-click affair to load a Notebook URL into your browser of choice, directly opening into nbviewer.

Table of Contents

- 1.
- 2.
- 3.
- 4.
- 8.
- 9.
- 12.

Entire books or other large collections of notebooks on a topic

Introductory Tutorials

- First things first, how to run code in the notebook. There is also a general collection of notebooks from IPython. Another useful one from this collection is an explanation of our rich display system.
- A great matplotlib tutorial, part of the fantastic Lectures on Scientific Computing with Python by J.R. Johansson.
- The code of the IPython mini-book by C. Rossant, introducing IPython, NumPy, SciPy, Pandas and matplotlib for interactive computing and data visualization.
- βGrowing Neat Software Architecture from Jupyter Notebooks, a primer by Guillaume Chevalier on how to build clean software using notebooks.

Programming and Computer Science

- βAutomata and Computability using Jupyter, an entire course, based on forthcoming book published by Taylor and Francis; book title: "Automata and Computability: Programmer's Perspective", by Ganesh Gopalakrishnan, Professor, School of Computing, University of Utah, Salt Lake City. [in English, has Youtube videos]
- βIntroduction to Programming (using Python), an entire introductory Python course written by Eric Matthes. This post explains the educational context in an Alaskan high school where Eric is a teacher.
- βNumeric Computing is Fun A series of notebooks created to help educate aspiring computer programmers and data scientists of all ages with no previous programming experience.
- βPython for Developers, a complete book on Python programming by Ricardo Duarte. Note the book also exists in Portuguese, website translated into Englishβ
- βCS1001.py - Extended Introduction to Computer Science. Recitations from Tel-Aviv University introductory course to computer science, assembled as IPython notebooks by Yoav Ram.
- βExploratory Computing with Python, a set of 15 Notebooks that cover exploratory computing, data analysis, and visualization. No prior programming knowledge required. Each Notebook includes a number of exercises (with answers) that should take less than 4 hours to complete. Developed by Mark Bakker for undergraduate engineering students at the Delft University of Technology.
- βCode Katas in Python, a collection of algorithmic and data structure exercises covering search and sorting algorithms, stacks, queues, linked lists, graphs, backtracking and greedy problems.
- βIntroduction to Python for Computational Science and Engineering (Hans Fangohr): Textbook for beginners, broken into one Jupyter Notebook per chapter. Can be executed and interacted with online using Binder.

Statistics, Machine Learning, and Data Science

- [Predicting PewDiePie's daily subscribers using Linear Regression](https://github.com/Tanu-N-Prabhu/Python/blob/master/Predicting_PewDiePie's_daily_subscribers_using_Machine_Learning_.ipynb), a notebook which explains the implementation of Linear Regression from scratch, by Tanu Nanda Prabhu, author and editor at Towards data science.
- βTop Python Libraries Used In Data Science, this notebook explain the important library used in data science, by Tanu Nanda Prabhu, author and editor at Towards data science.
- βWeb scraping using Python with BeautifulSoup and Requests libraries, a notebook which explains scraping the data from the internet from scratch, by Tanu Nanda Prabhu, author and editor at Towards data science.
- βExploratory data analysis in Python, a notebook which explains the steps to perform Exploratory data Analysis in python from the scratch, by Tanu Nanda Prabhu, author and editor at Towards data science.
- βAn introductory notebook on uncertainty quantification and sensitivity analysis developed for the Workshop On Uncertainty Quantification And Sensitivity Analysis For Cardiovascular Modeling by Leif Rune Hellevik, Vinzenz Eck and Jacob T. Sturdy.
- βPython Data Science Handbook Supplemental Materials, a collection of notebooks by Jake VanderPlas to accompany the book.
- βData Cleaning using Python with Pandas Library, a Date Science notebook which clearly explains Data Cleaning using Python with Pandas Library at a beginner level, by Tanu Nanda Prabhu.
- βSocial Network Analysis: From Graph Theory to Applications with Python. A tutorial on network creation, analysis, information flow and influence maximization with Networkx by Dima Goldenberg.
- β"ISP": Introduction to Statistics with Python, a collection of notebooks accompanying the book of the same name, by Thomas Haslwanter.
- βNotebooks for the exercises in Andrew Ng's online ML course, Spark and TensorFlow, as well as extra material on other tools from the scipy stack, by John Wittenauer.
- βAM207: Monte Carlo Methods, Stochastic Optimization: a complete course by Verena Kaynig-Fittkau and Pavlos Protopapas from Harvard, with all lecture materials and homework sets as notebooks.
- βAn introduction to Bayesian inference, this is just chapter 1 in an ongoing book titled Probabilistic Programming and Bayesian Methods for Hackers Using Python and PyMC, by Cameron Davidson-Pilon.
- βDoing Bayesian Data Analysis: Python/PyMC3 code for a selection of models and figures from the book
*'Doing Bayesian Data Analysis: A Tutorial with R, JAGS, and Stan'*, Second Edition, by John Kruschke (2015). - βIPython Cookbook by Cyrille Rossant, a comprehensive guide to Python for Data Science. The code of the 100 recipes is available on the GitHub repository.
- βClustering and Regression, part of the UC Berkeley 2014 Introduction to Data Science course taught by Michael Franklin.
- The Statsmodels Project has two excellent collections of examples: in their official documentation and extra ones in their wiki. Too many there to directly duplicate here, but they provide great learning materials on statistical modeling with Python.
- βMachine Learning with the Shogun Toolbox. This is a complete
*service*that includes a ready-to-run IPython instance with a collection of notebooks illustrating the use of the Shogun Toolbox. Just log in and start running the examples. - βPython for Data Analysis, an introductory collection from the CU Boulder Research Computing Group.
- βThe Kaggle bulldozers competition example, one of a set on tutorials on exploratory data analysis with the copper toolkit by Daniel RodrΓguez/
- βUnderstanding model reliability, part of a complete course on statistics and data analysis for psychologists by Michael Waskom.
- βGraphical Representations of Linear Models, an illustration of the Seaborn statistical visualization library, that also includes Visualizing distributions of data and Representing variability in timeseries plots. By Michael Waskom.
- The classic 'An Introduction to Statistical Learning with Applications in R' by James, Witten, Hastie, Tibshirani (2013), has not one but
*two*collections of notebooks to accompany the book with Python (instead of the book's default R examples). One by Jordi Warmenhoven and one by Matt Caudill. - βPython Notebooks for StatLearning Exercises, Python implementations of the R labs for the StatLearning: Statistical Learning online course from Stanford University taught by Profs Trevor Hastie and Rob Tibshirani.
- βApplied Predictive Modeling with Python, Python implementations of the examples (originally written in R) from a famous introductory book, Applied Predictive Modeling, by Max Kuhn and Kjell Johnson.
- A collection of four courses in foundations of data science, algorithms and databases from multiple faculty at Columbia University's Lede Program.
- βSciPy and OpenCV as an interactive computing environment for computer vision by Thiago Santos, a tutorial presented at SIBGRAPI 2014.
- βAdaboost for digit classification, by Shashwat Shukla. A complete implementation of Adaboost in Python, with code for digit recognition.
- βData Science Notebooks, a frequently updated collection of notebooks on statistical inference, data analysis, visualization and machine learning, by Donne Martin.
- βETL with Python, a tutorial for ETL (Extract, Transfer and Load) using python petl package, loading to MySQL and working with csv files by Dima Goldenberg.
- βthe-elements-of-statistical-learning, a collection of notebooks implementing the algorithms, reproducing the graphics found in the book "The Elements of Statistical Learning" by Trevor Hastie, Robert Tibshirani and Jerome Friedman and summary of the textbook.
- βInteractive Machine Learning Experiments - collection of notebooks that use convolutional neural networks (CNNs), recurrent neural networks (RNNs) and multilayer perceptrons (MLPs) to solve basic machine learning tasks like objects detection and classification, sequence-to-sequence predictions etc.

Mathematics, Physics, Chemistry, Biology

- A single-atom laser model. This is one of a complete set of lectures on quantum mechanics and quantum optics using QuTiP by J.R. Johansson.
- β2-d rigid-body transformations. This is part of Scientific Computing in Biomechanics and Motor Control, a complete collection of notebooks by Marcos Duarte.
- βWorking with Reactions, part of a set of tutorials on cheminformatics and machine learning with the rdkit project, by Greg Landrum.
- βCFD Python: 12 steps to Navier-Stokes. A complete set of lectures on Computational Fluid Dynamics, from 1-d linear waves to full 2-d Navier-Stokes, by Lorena Barba.
- βPytherm - Applied Thermodynamics. Lectures on applied thermodynamics using Python and the SciPy ecosystem, by ATOMS.
- βAeroPython: Aerodynamics-Hydrodynamics with Python, a complete course taught at George Washington University by Lorena Barba.
- βPractical Numerical Methods with Python, a collection of learning modules (each consisting of several IPython Notebooks) for a course in numerical differential equations taught at George Washington University by Lorena Barba. Also offered as a "massive, open online course" (MOOC) on the GW SEAS Open edX platform.
- βGet Data Off the Ground with Python by Lorena Barba: Learn to interact with Python and handle data with Python; assumes no coding experience and creates a foundation in programming applied to technical contexts. With an accompanying online course.
- βTake Off with Stats in Python by Lorena Barba: Hands-on data analysis using a computational approach and real-life applications. With an accompanying online course.
- βTour the dynamics of change and motion by Lorena Barba: Tour of the dynamics of change and motion using computational thinking with Python. With an accompanying online course.
- βpyuvvis: tools for explorative spectroscopy, spectroscopy library built for integration ipython notebooks, matplotlib and pandas.
- βAn Introduction to Applied Bioinformatics: Interactive lessons in bioinformatics, by Greg Caporaso.
- Colour science computations with colour, a Python package implementing a comprehensive number of colour theory transformations and algorithms supported by a dedicated collection of IPython Notebooks. More colour science related IPython Notebooks are available on colour-science.org.
- The notebooks from the Book Bioinformatics with Python Cookbook, covering several fields like Next-Generation Sequencing, Population Genetics, Phylogenetics, Genomics, Proteomics and Geo-referenced information.
- βLearning Population Genetics in an RNA world is an interactive notebook that explains basic population genetics tools and techniques by building an in silico evolutionary model of RNA molecules.
- βAn open RNA-Seq data analysis pipeline tutorial with an example of reprocessing data from a recent Zika virus study. This notebook fully reproduces the research published in this paper. The notebook uses mostly python but includes some bash and R as well and is relevant for researchers in bioinformatics and public health.
- βLung Cancer Post-Translational Modification and Gene Expression Regulation. This Python notebook uses the Jupyter-widget Clustergrammer-Widget to visualize hierarchical clustering of gene expression and post-translational modification data from 37 lung cancer cell lines as an interactive heatmap. The notebook is part of the research project from this paper.
- βMaterials Science in Python using pymatgen. A series of python notebooks using the pymatgen package and materials project API for materials science.
- βApplied Elasticity: A collection of notebooks used to determine solutions to some classical 2D elasticity problems. These were mostly live coded during class hours by Jeevanjyoti Chakraborty as part of the course "Applied Elasticity" in the Mechanical Engineering Department of the Indian Institute of Technology Kharagpur.

Earth Science and Geo-Spatial data

- βEarthPy, a collection of IPython notebooks with a focus on Earth Sciences, from whale tracks to the flow of the Amazon.
- βPython for Geosciences, a tutorial series aimed at the Earth Sciences community, by Nikolay Koldunov.
- βLogistic models of well switching in Bangladesh, part of the "Will it Python" blog series (repo) on Machine Learning and data analysis in Python. By Carl Vogel.
- βEstimated likelihood of observing a large earthquake on a continental lowβangle normal fault and implications for lowβangle normal fault activity, an executable version of a paper by Richard Styron and Eric Hetland published in
*Geophysical Research Letters*, on earthquake probabilities. - βpython4oceanographers, a blog demonstrating analyses in physical oceanography from resource-demanding numerical computations with functions in compiled languages to specialized tidal analysis to visualization of various geo data using fancy things like interactive maps.
- βMachinalis has a public repo with material support for geospatial-data processing related blog posts. It includes notebooks about Object Based Image Analysis and irrigation circles detection.
- βseismo-live is a collection of live Jupyter notebooks for seismology. It includes a fairly large number of notebooks on how to solve the acoustic and elastic wave equation with various different numerical methods. Additionally it contains notebooks with an extensive introduction to data handling and signal processing in seismology, and notebooks tackling ambient seismic noise, rotational and glacial seismology, and more.
- βGeo-Python is an introduction to programming in Python for Bachelors and Masters students in geo-fields (geology, geophysics, geography) taught by members of the Department of Geosciences and Geography at University of Helsinki, Finland. Course lessons and exercises are based on Jupyter notebooks and open for use by any interested person.

Linguistics and Text Mining

- βDetecting Algorithmically Generated Domains, part of the Data Hacking collection on security-oriented data analysis with IPython & friends.
- βMining the Social Web (3rd Edition). A complete collection of notebooks accompanying Matthew Russell and Mikhail Klassen's book by O'Reilly.

Engineering Education

- βIntroduction to Chemical Engineering Analysis by Jeff Kantor. A collection of IPython notebooks illustrating topics in introductory chemical engineering analysis, including stoichiometry, generation-consumption analysis, mass and energy balances.
- βSensors and Actuators by Andres Marrugo. A collection of Jupyter notebooks in the form of lecture notes and engineering calculations for the course IMTR 1713 Sensors and Actuators taught at the Universidad TecnolΓ³gica de BolΓvar.

Scientific computing and data analysis with the SciPy Stack

General topics in scientific computing

- βCythonGSL: a Cython interface for the GNU Scientific Library (GSL) (Project repo, by Thomas Wiecki.
- βComparing different approaches to evolutionary simulations. Also available here to better visualization. The notebook was converted to a HTML presentation using an old nbconvert with the first developing implementation of
`reveal`

converter. By Yoav Ram. - βInteractive Curve-Fitting The
`lmfit`

package provides a widget-based interface to the curve-fitting algorithms in SciPy. - βCodeCombat gridmancer solver by Arn-O. This notebook explains how to improve a recursive tree search with an heuristic function and to find the minimum solution to the gridmancer.

Social data

- A reconstruction of Nate Silver's 538 model for the 2012 US Presidential Election, by Skipper Seabold (complete repo).
- βData about the Sandy Hook massacre in Newtown, Conneticut, which accompanies a more detailed blog post on the subject. Here are the notebook and accompanying data. By Brian Keegan.
- βGetting started with GDELT, by David Masad. GDELT is a dataset containing more than 200-million geolocated events with global coverage for 1979 to the present. Another GDELT example from David, that nicely integrates mapping visualizations.
- Analyzing the VΓ©lib dataset from Paris, by Cyrille Rossant (VΓ©lib is Paris' [bicycle-sharing program](https://en.wikipedia.org/wiki/V%C3%A9lib')).
- βHow clean are San Francisco's restaurants?, a data science tutorial that accompanies a blog post from Zipfian Academy.
- βPredicting usage of the subway system in NYC, a final project for the Udacity Intro to Data Science Course, by Asim Ihsan.
- βGeographic Data Science is an entire course by Dani Arribas-Bel to learn to access, munge, and analyse spatial data on social phenomena.
- βAnalysis and visualization of a public OKCupid profile dataset using Python and Pandas by Alessandro Giusti includes many colorful data visualizations.

Psychology and Neuroscience

- βCue Combination with Neural Populations by Will Adler. Intuition and simulation for the theory (Ma
*et al.*, 2006) that through probabilistic population codes, neurons can perform optimal cue combination with simple linear operations. Demonstrates that variance in cortical activity, rather than impairing sensory systems, is an adaptive mechanism to encode uncertainty in sensory measurements. - βVisualizing mathematical models of brain cell connections. The effect of convolution of different receptive field functions and natural images is examined.
- βPython for Vision Research. A three-day crash course for vision researchers in programming with Python, building experiments with PsychoPy and psychopy_ext, learning the fMRI multi-voxel pattern analysis with PyMVPA, and understading image processing in Python.

Machine Learning, Statistics and Probability

- βA tutorial introduction to machine learning with sklearn, an IPython-based slide deck by Andreas Mueller.
- βIntroduction to Machine Learning in Python with scikit-learn by Cyrille Rossant, a free recipe from the IPython Cookbook, a comprehensive guide to Python for Data Science.
- βMachine learning in Python, a series based on Andrew Ng's Coursera class on machine learning. Part of a larger collection of data science notebooks by John Wittenauer.

Physics, Chemistry and Biology

- βThe sound of Hydrogen, visualizing and listening to the quantum-mechanical spectrum of Hydrogen. By Matthias Bussonnier.
- Particle physics at the Large Hadron Collider (LHC): using ROOT in an LHCb masterclass: Notebook 1 and Notebook 2 notebooks by Alexander Mazurov and Andrey Ustyuzhanin at CERN.
- βA Reaction-Diffusion Equation Solver in Python with Numpy, a demonstration of how IPython notebooks can be used to discuss both the theory and implementation of numerical algorithms on one page, by Georg Walther.
- βComparing different approaches to evolutionary simulations. Also available here to better visualization. The notebook was converted to a HTML presentation using an old nbconvert with the first developing implementation of
`reveal`

converter. By Yoav Ram.

Economics and Finance

- βfecon235 for Financial Economics series of notebooks which examines time-series data for economics and finance. Easy API to freely access data from the Federal Reserve, SEC, CFTC, stock and futures exchanges. Thus research from older notebooks can be replicated, and updated using the most current data. For example, this notebook forecasts likely Fed policy for setting the Fed Funds rate, but market sentiment across major asset classes is observable from the CFTC Commitment of Traders Report. Major economics indicators are renormalized: for example, various measures of inflation, optionally with the forward-looking break-even rates derived from U.S. Treasury bonds. Other notebooks examine international markets: especially, gold and foreign exchange.
- βFixed Income: A Structured Bond- Interactive scenarios , Sequential repayment of a bond using interactive widgets and Python in Jupyter, by Mats Gustavsson.

Earth science and geo-spatial data

- βExploring seafloor habitats: geographic analysis using IPython Notebook with GRASS & R. This embeds a slideshow and a Web Spinning Globe (Cesium) in the notebook. By Massimo Di Stefano.

Data visualization and plotting

- βPlotting pitfalls: common problems when plotting large datasets, and how to avoid them. By James A. Bednar.
- βData and visualization integration via web based resources. Using NetCDF, Matplotlib, IPython Parallel and ffmpeg to generate video animation from time series of gridded data. By Massimo Di Stefano.
- βbqplot is a d3-based interactive visualization library built entirely on top of that
`ipywidgets`

infrastructure. Checkout the pythonic recreation of Hans Rosling's Wealth of Nations. - βA D3 Viewer for Matplotlib Visualizations, different from above by not depending on Plot.ly account.
- βBokeh is an interactive web visualization library for Python (and other languages). It provides d3-like novel graphics, over large datasets, all without requiring any knowledge of Javascript. It also has a Matplotlib compatibility layer.
- βWinner of the 2014 E. Tufte Slope Graphs contest, by Pascal Schetelat. The original contest info on Tufte's site.
- βClustergrammer Interactive Heatmap and DataFrame Viewer This Python notebook shows a simple example of how to visualize a matrix file and Pandas DataFrame as an interactive heatmap (built using D3.js) using the Jupyter Widget Clustergrammer (see paper).

Mathematics

- βLinear algebra with Cython. A tutorial that styles the notebook differently to show that you can produce high-quality typography online with the Notebook. By Carl Vogel.
- βExploring how smooth-looking functions can have very surprising derivatives even at low orders, combining SymPy and matplotlib. By Javier Moreno.
- βA Collection of Applied Mathematics and Machine Learning Tutorials (in Turkish) and its English Translation By Burak Bayramli.
- βFunction minimization with iminuit, an introductory companion to their hard core tutorial. By the iminuit project.
- βThe Discrete Cosine Transform, a brief explanation and illustration of the math behind the DCT and its role in the JPEG image format, by Jim Mahoney.
- βChebfun in Python, a demo of PyChebfun, by Olivier Verdier. PyChebfun is a pure-python implementation of the celebrated Chebfun package by Battles and Trefethen.
- βThe Matrix Exponential, an introduction to the matrix exponential, its applications, and a list of available software in Python and MATLAB. By Sam Relton.
- βIntroduction to Mathematics with Python, a collection of notebooks aimed at Mathematicians with no/little Python knowledge. Notebooks can be selected to serve as resources for a workshop. By Vince Knight.

Signal and Sound Processing

- βSimulation of Delta Sigma modulators in Python with deltasigma, Python port of of Richard Schreier's
*excellent*MATLAB Delta Sigma Toolbox, by Giuseppe Venturini. Several demonstrative notebooks on the package README. - βPoisson Image Editing | Seamless Cloning by Dhruv Ilesh Shah is a notebook that achieves Seamless Image Cloning by employing the Poisson Solver in the iterative form.
- βBlind Source Separation | Cocktail Party Problem by Dhruv Ilesh Shah & Shashwat Shukla is a notebook that achieves blind source separation, on audio signals in an attempt to approach the Cocktail Party Prblem. The problem has been tackled in two different methods - the FOBI and fastICA.

Natural Language Processing

Pandas for data analysis

Note that in the 'collections' section above there are also pandas-related links, such as the one for an 11-lesson tutorial.

- βPython Pandas DataFrame Basics, this notebook explains the basic concepts of a pandas data frame from scratch for beginners with examples, by Tanu Nanda Prabhu.
- βA 10-minute whirlwind tour of pandas, this is the notebook accompanying a video presentation by Wes McKinney, author of Pandas and the Python for Data Analysis book.
- βManipulating the data with Pandas using Python, this notebook explains various operations and methods of Pandas library from the scratch with the help of an example, by Tanu Nanda Prabhu.
- βClustering of smartphone sensor data for human activity detection using pandas and scipy, part of Coursera data analysis course, done in Python (repo).
- βAnalyzing and visualizing sun spot data with Pandas, by Josh Hemann. An enlightening discussion of how naive plotting choices subtly influence our interpretation of data.
- βStatistical Data Analysis in Python, by Christopher Fonnesbeck, SciPy 2013. Companion videos 1, 2, 3, 4β

General Python Programming

- βHow_to_get_started_coding_in_Python?, this notebook explains how to become a good python programmer, by Tanu Nanda Prabhu, author and editor at Towards data scienceβ
- βPython Strings from Scratch !!!, this notebook explains Python Strings from basic to advance level, by Tanu Nanda Prabhuβ
- βPython Tuples from Scratch !!!, this notebook explains Python Tuples from basic to advance level, by Tanu Nanda Prabhuβ
- βPython Dictionary from Scratch !!!, this notebook explains Python Dictionary from basic to advance level, by Tanu Nanda Prabhuβ
- βPython Lists from Scratch !!!, this notebook explains Python Lists from basic to advance level with the help of an example, by Tanu Nanda Prabhu.
- βLearning to code with Python, part of an introduction to Python from the Waterloo Python users group.
- βIntroduction to Python for Data Scientists by Steve Phelps (part of a larger collection on Data Science and Big Data).
- βPython Descriptors Demystified, an in-depth discussion of the descriptor protocol in Python, by Chris Beaumont.
- βHow to Aggregate Subscriber's Interest using the 3 methods: (1) Python Dictionary, (2) Apache PySpark - GroupBy Transformation, and (3) Apache PySpark - ReduceBy Transformation by Abbas Taher.

Notebooks in languages other than Python

Julia

The IPython protocols to communicate between kernels and clients are language agnostic, and other programming language communities have started to build support for this protocol in their language. The Julia team has created IJulia, and these are some Julia notebooks:

- βThe Design Impact of Multiple Dispatch, a detailed explanation of Julia's multiple dispatch design, by Stefan Karpinski.
- Coursework using IJulia notebooks:
- Other collections of IJulia notebooks:
- βCrossing Language Barriers with Julia, Scipy, and IPython, presented at EuroSciPy '14 by Steven G. Johnson.

Haskell

- βHomophone reduction, a solution to a cute problem involving treating English letters as generators of a large group.
- βGradient descent typeclass, a look at how arbitrary gradient descent algorithms can be represented with a typeclass.

OCaml

Ruby

Perl

F#

C#

- βXamarin Workbooks Create a rich C# workbook for Android, iOS, Mac, WPF, or Console, and get instant live results as you learn these APIs.

Javascript