All Projects → rossant → euroscipy2014

rossant / euroscipy2014

Licence: other
IPython advanced tutorial: introducing the interactive features of the IPython Notebook

EuroSciPy 2014 IPython Advanced Tutorial

Introducing the interactive features of the IPython 2.0 Notebook.

Most of the code examples come from the IPython Cookbook, Packt Publishing, featuring high-performance interactive computing methods for data science and mathematical modeling.

Requirements

Simpler option is to install Anaconda.

  • Python 2.7 or Python >= 3.3
  • IPython 2.2 (This has been written with the latest stable version, released in August. Some tweaking might be necessary if you use the development version 3.0.0.dev)
  • NumPy
  • matplotlib
  • scikit-learn (part 2)
  • mpld3 (part 4, pip install mpld3)
  • networkX (part 4, pip install networkx)
  • a recent browser:
    • Chrome >= 13
    • Safari >= 5
    • Firefox >= 6

Installation

git clone https://github.com/rossant/euroscipy2014.git
cd euroscipy2014
ipython notebook --profile=euroscipy2014

Contents

In this tutorial, we illustrate different features and APIs for creating interactive widgets and visualizations in the IPython notebook.

1. Calling your Python functions with graphical controls

We show how to use the @interact decorator to create simple GUI controlling Python functions in real time.

Part 1

2. Creating a GUI in the notebook

Elaborating on the previous example, we show how to create a more complex GUI with custom positioning, styling, and logic. The entire GUI is implemented in Python: there is no JavaScript code to write at this point.

Part 2

3. Creating a custom notebook widget with backbone.js

In this part, we create an entirely custom widget with HTML, JavaScript, and backbone.js. We show how custom widgets can be designed to play well with the rest of the widget machinery.

Part 3

4. Interactive data visualization in the notebook

In this part, we explore several interactive data visualization solutions in the notebook, mostly based on the d3.js JavaScript library. We first show how to easily make matplotlib figures interactive in the notebook with mpld3.

Then, we introduce the very basics of d3.js, and we show how to render a networkX graph dynamically in the notebook. There is some JavaScript code to write here.

Part 4

Further reading

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].