Skip to content

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

License

Notifications You must be signed in to change notification settings

akabii/euroscipy2014

 
 

Repository files navigation

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.

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

Part 1

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

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

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published