I'm hugely excited to work with the new widgets framework. It might be slightly outside the designed use-case of the IPython notebook, but I'm interested in doing live plotting inside of a notebook and using a notebook as a sort of analytics dashboard.
Bokeh (http://bokeh.pydata.org) has excellent IPython notebook support, and provides interactive, live plots inside the notebook.
It also has matplotlib support, so you can trivially turn Matplotlib figures into interactive web plots (e.g. this interactive plot built via Seaborn, which is a statistical plotting package that uses matplotlib): http://bokeh.pydata.org/docs/gallery/violin.html
Actually, Bokeh plots are not (yet) integrated with the widget infrastructure at all, and work in IPython 1.x. There is a fully embeddable javascript library (BokehJS) which handles all the interactivity entirely in the browser. Data can be directly and fully embedded in the DOM.
If you want to view larger data, access the downsampling capabilities of the Bokeh plot server, coordinate views between multiple instances of the notebook, or do streaming and animated plots, then you will need to run the bokeh server.
The "technical vision" document is really off-putting. It starts with some BS about photography and then asks me
What are the best perceptual approaches to honestly and accurately represent the data to domain experts and SMEs so they can apply their intuition to the data?
Yes! This is precisely the use case I have been waiting for. I just used days to implement a simple bar chart and a map visualization in Notebook. In IPython 1.0 this requires matplotlib know-how, the whole Python GIS library system to get shapefiles into Python format, not to mention changing projections and such to our somewhat peculiar needs.
Now I can just create widgets from my D3 visualizations, connect the Pandas dataframe and it is done. Also, I can continue to refine my standalone D3 visualizations and the widgets will benefit. All of this I used to do by hand, in a separate multistage process, I can now do directly and interactively.
Getting a real table view from Dataframe is the missing link. Now to search for the JS table plugin that can handle multi-index, hierarchical tables...
I'd love a drop-down filter mechanism on pandas similar to the one Excel has. That's the one thing that makes me open Excel when I'm working on a new dataset on python. It's just so much easier to inspect data that way....
Some Drake University students and I have been working on wrapping the three.js library for 3d webgl graphics and are nearly complete [0]. We also implemented a simple webcam widget [1]. Here's a live demo illustrating both, using the Sage Cell Server: http://sagecell.sagemath.org/?q=qjjurl (you may need to click Evaluate once, and you'll need to click the permission notification to allow the browser to use your webcam)
The principal milestones of 2.0 are:
- interactive widgets for the notebook
- directory navigation in the notebook dashboard
- persistent URLs for notebooks
- a new modal user interface in the notebook
- a security model for notebooks
I've noticed more and more projects are not making it easy for people to find what changed in a new release. It's extremely annoying. A pointer to a changelog or what's new page used to be standard in all announcements.
Right. While I would be honored to be an IPython person, all I meant was that I changed the url to be the better one suggested by shoyer. Clerical staff at your service.
If I do "conda search ipython" then for each of ipython, ipython-notebook and ipython-qtconsole it shows that I'm at version 1.1.0 on python 2.7. It also shows other previous or later versions available (but not 2.0.0).
So I think the answer to your question may be "not today."
Probably the simplest thing is to wait until a version of Anaconda with the new ipython is available, then update Anaconda itself.
Someone please correct me, I'm a newish Anaconda user.
Interesting. I just did that, got ipython 2.0.0 installed, then searched again and saw 2.0.0 for ipython, but 1.1.0 for the other two. When I then tried to update notebook it said that it would revert ipython back to 1.1.0, so I said no.
Then I started ipython notebook and got the new interface. So cool, but not sure what conda search is telling me now. Anyway, thanks for that, I'll use it with care and eyes open.
Anaconda is a meta-package with exact versions of packages that work well together. Any packages that are listed in Anaconda will be set to those exact versions (upgraded or downgraded).
Weird, I don't see anything on their homepage yet: http://ipython.org/ There is of course a link to the 2.0 version in development--perhaps you just stumbled on the current in development 2.0 bits on pypi?
I've always hovered around iPython with a vague sense that it could be used in a really cool way, but have never managed to make the jump to incorporate it into my daily workflow despite some fun experiments.
It is much more clear how those using Python for scientific work would use it, but does anyone have some great examples on how you use it when building apps or other projects?
A use case that is related to to (data) science work is scraping data from Web sites, which can of course be useful in other cases too. I got used to start and test those kind of scripts in IPython Notebook and once they work save them as a standalone script.
My primary use of IPython is as an interactive environment, but I've used it in production in a couple ways:
- I have a script that runs at midnight to fetch the last day's data and run an IPython notebook with runipy (https://pypi.python.org/pypi/runipy). I render the notebook to HTML with nbconvert with a template that hides the Python code, and emails me the output.
- I have a model that needs to be trained occasionally as part of a workflow. Rather than writing a python script, I use a notebook. After training the model I plot some graphs to evaluate/validate the model and these become part of an HTML report that gets generated alongside the model. I use runipy to automate the pipeline.
I use it as a better shell. Scripting in bash or sh is a horrible experience, and pure Python lacks the conciseness of bash for simple exploration and manipulation of a file system hierarchy (cd, cp, mv, ls...).
For example, you can write stuff like
files = !ls -a
for f in files:
!diff $f "some_file"
if _exit_code != 0:
some_function(f)
and it even correctly handles spaces in file names. (what sorcery is this?!)
> Not at all to pick a nit, but that still depends on bash or sh (the bang commands).
That's a good point, and not nit-picky at all. However, I think the dependency is on the Unix commands (mv, cp, ...), not bash or sh, which still makes this mixed approach unsuitable for truly platform-independent scripting.
Of course, this point is moot when you use it as your personal shell, or when scripting for your Unix servers, etc.
I'm using fish <http://fishshell.com/> for both scripting (saner syntax, space handling) and interactive (multiline syntax highlighted prompt) and never looked back.
But this makes me consider ipython again, perhaps even as main shell.
Hmm, after %rehashx I can use commands without !, e.g. git diff. <http://ipython.org/ipython-doc/stable/interactive/shell.html...
Moreover, this means I can have a notebook experience for my shell. Together with the new directory navigation and friendly URLs this is becoming very attractive!
There is however a deal-breaker: no smart completion for shell commands. But it'd be clearly possible to implement it by harnessing bash (or zsh or fish) for completions.
Wow. The one thing that makes bash scripting better than Python for certain things is that using the subprocess module makes your code really verbose. This fixes that.
Just grabbed it off pip. Turns out a simple `pip install ipython` doesn't pull in all the dependencies for iPython Notebook. To grab all of those as well, run:
I just woke up and, after seeing this announcement, I know it's going to be a great day. I do statistical research for my university, and I just found ipython notebook a couple weeks ago. I don't remember being so excited about a piece of software since I first installed sublime. Although I've been doing data-heavy software engineering for several years now, this one tool has already completely revolutionalized the way I do day-to-day data mining. Props to everyone involved in this release!
I'm especially excited about the notebook subfolders. Ah, the little things in life.
Subfolders is huge. That, combined with URLs like http://127.0.0.1:8888/notebooks/SomeFolder/aRandomNotebook.i... means I can organize and reference files elsewhere. I happen to keep a TiddlyWiki worklog, and being able to directly hotlink to my IPython workspace is just fantastic!
Congrats, ipython is an very usefull tool,especially for teaching when one cant afford Mathlab or paid software.It's simple and fun to use. thanks again,cant wait to try that new version.
For me, IPython will always be a double-edged sword. On the one hand I love what the project brings in terms of scientific exploration and ease of use. On the other hand it is annoyingly hard to integrate the shell into my own application: the API changes way too often and the source is a very complex and tangled mess.
Just a quick heads up -- if you are using Vimium for Chrome or Vimperator on Firefox, make sure to exclude iPython Notebook from the plugin. Otherwise the majority of "Command Mode" keyboard shortcuts won't work.
ipython is something I miss when I use any other language's shell. Amazing Ruby doesn't have something nearly as good (well, there is a hack: http://nbviewer.ipython.org/gist/minrk/4689728)
Hooray, IPython 2.0.0 now has `Audio` in IPython.display. As someone who uses IPython notebooks for audio signal processing, this is huge. There were previous user-contributed ways to get around it, but now it's built in.
I must admit that I never saw that much value in ipython. Of course I understand that you can create a nice notebook with embedded plots, etc. but apart from that what does ipython give me? How does it compare to Vim + Jedi (autocompletion) + QuickRun (running the script with a single key)?
57 comments
[ 3.9 ms ] story [ 127 ms ] threadIt also has matplotlib support, so you can trivially turn Matplotlib figures into interactive web plots (e.g. this interactive plot built via Seaborn, which is a statistical plotting package that uses matplotlib): http://bokeh.pydata.org/docs/gallery/violin.html
If you want to view larger data, access the downsampling capabilities of the Bokeh plot server, coordinate views between multiple instances of the notebook, or do streaming and animated plots, then you will need to run the bokeh server.
What are the best perceptual approaches to honestly and accurately represent the data to domain experts and SMEs so they can apply their intuition to the data?
I dunno mate, what's an SME for fucking starters?
Now I can just create widgets from my D3 visualizations, connect the Pandas dataframe and it is done. Also, I can continue to refine my standalone D3 visualizations and the widgets will benefit. All of this I used to do by hand, in a separate multistage process, I can now do directly and interactively.
Getting a real table view from Dataframe is the missing link. Now to search for the JS table plugin that can handle multi-index, hierarchical tables...
[0] https://github.com/jasongrout/pythreejs
[1] https://github.com/jasongrout/ipywidgets
If you're in the mood to fix something else: the changelog doesn't currently agree with itself about whether Python 3.2 is supported.
So I think the answer to your question may be "not today."
Probably the simplest thing is to wait until a version of Anaconda with the new ipython is available, then update Anaconda itself.
Someone please correct me, I'm a newish Anaconda user.
Interestingly, if I then do `conda update anaconda`, it unlinks IPython 2.0.0 and re-links 1.1.0 after confirmation (which I decline, of course).
Then I started ipython notebook and got the new interface. So cool, but not sure what conda search is telling me now. Anyway, thanks for that, I'll use it with care and eyes open.
It is much more clear how those using Python for scientific work would use it, but does anyone have some great examples on how you use it when building apps or other projects?
- I have a script that runs at midnight to fetch the last day's data and run an IPython notebook with runipy (https://pypi.python.org/pypi/runipy). I render the notebook to HTML with nbconvert with a template that hides the Python code, and emails me the output.
- I have a model that needs to be trained occasionally as part of a workflow. Rather than writing a python script, I use a notebook. After training the model I plot some graphs to evaluate/validate the model and these become part of an HTML report that gets generated alongside the model. I use runipy to automate the pipeline.
For example, you can write stuff like
and it even correctly handles spaces in file names. (what sorcery is this?!)Does anyone have any experience reports on using ipython as a better shell on top of cmd.exe rather than on top of a *nix shell?
That's a good point, and not nit-picky at all. However, I think the dependency is on the Unix commands (mv, cp, ...), not bash or sh, which still makes this mixed approach unsuitable for truly platform-independent scripting.
Of course, this point is moot when you use it as your personal shell, or when scripting for your Unix servers, etc.
I'm using fish <http://fishshell.com/> for both scripting (saner syntax, space handling) and interactive (multiline syntax highlighted prompt) and never looked back.
But this makes me consider ipython again, perhaps even as main shell. Hmm, after %rehashx I can use commands without !, e.g. git diff. <http://ipython.org/ipython-doc/stable/interactive/shell.html... Moreover, this means I can have a notebook experience for my shell. Together with the new directory navigation and friendly URLs this is becoming very attractive!
There is however a deal-breaker: no smart completion for shell commands. But it'd be clearly possible to implement it by harnessing bash (or zsh or fish) for completions.
I have no idea how I debugged before ipdb, and my node suffers because node inspector isn't anywhere near as powerful.
Seriously, it's awesome.
I'm especially excited about the notebook subfolders. Ah, the little things in life.
See http://nbviewer.ipython.org/github/ipython/ipython/blob/2.x/... for an example.
ipython is a pretty sweet interactive interpreter. Also try ipdb[0]. I can't live without the interactive debugging it offers.
[0] https://pypi.python.org/pypi/ipdb