PyCon Australia 2013

Visualizaciones dinámicas con IPython Notebook

Brianna Laugher  · 

Transcripción

Extracto de la transcripción automática del vídeo realizada por YouTube.

welcome to the plenary hall our next speaker is Python developer at the Center for Australian weather and climate research at the Bureau of Meteorology she's a regular presenter at PyCon Australia and her presentation this year is on the dynamic visualization

with the Python notebook please welcome Brianna law hi everyone thanks for coming along now all my slides and code are available on github if you want to download them and play along or just to save taking notes now I work in the research department of the

bureau of meteorology and we have an ipad notebook set up for collaborating with the remote members of our team so we have a lot of gridded data that we need to work with that we want to explore that we want to modify in different ways and look at the result

to see if we're making an improvement in some fashion so it's very easy with the ipython notebook because of its matplotlib support to plot that out and as you can see this is an example of some data which is a forecast for minimum temperature around

tasmania and because it's kind of geographically based maybe we would like to take a closer look at a particular area this is a plot that's kind of zoomed in around the lat/long that represents hobart but that's not really a super ideal solution

for really exploring this data in detail so we can't we can't zoom in really like us a little bit awkward we can't pan can't move side to side to have a more dynamic look at what's there and we can't easily add multiple layers to matplotlib

so map hotly plots with a lot of backends so for example if you use a cute cutie i think or TK egg back end they'll actually pop up a separate window on your desktop and you can you can play with those interact but for the ones that are embedded in line

in the notebook you can't really interact with them in the same way so because we're dealing with gridded data so what we what we really want is a map interface so we'd like something like this we just want to have something simple that we can

pass all the relevant parameters to and have a proper actual map there you know these JavaScript people will know what they're doing they've got all the mapping stuff sorted so let's just use that so just briefly to talk about the data that I'm

using in this example it's from a service that the bureau provides called the Australian digital forecast database as links to it you can download the sample grids for a bunch of different weather parameters like minimum temperature maximum temperature

sea-level pressure wind speeds a percentage of precipitation these kinds of things and these grids are also these grids are the output of the project that I work on and they feed into the bureau's new web app which is called meta it's only just recently

released so do have a look at it it's quite cool you can get all the different parameters on the left for your particular location and of course you can interact with it like a map which is nice so if we think about what are the things that we need to

get in place to have our map in our notebook this is this is one way we can do it and what I'm going to do is talk us through each of these steps actually working backwards and we're going to see how do we need to set those up and configure those so

that they can all play nice together so yeah netcdf is just a quite common data format that's used for gridded data it could be hdf5 or something like that that we're dealing with as well and that's just a common format that is quite popular in

oceanography and climate ology so if you're interested in that kind of data you probably are already familiar with it so if you have been paying attention at all you've probably heard about the notebook quite a few times this weekend and I'm just

going to echo what everyone else says and say that I think it's a really useful tool for working with remote people and working with people who maybe are not as comfortable as you are just opening a script in a text editor and and modifying it and I also

think it's a really great tool for your own purposes when you're exploring a new API so for example matplotlib is kind of finicky and because the support from that Portland is already built into the notebook it's perfect if you need to remember

or what parameter do I need to set to change this axis or change the color of this plot you can keep all your working recorded there so that when you go back later you don't you didn't you know delete that because that was just a working step you still

got available so setting it up is really easy and then we run it with pylab in line so that our images are embedded in the page instead of popping up separately now I partha notebook has what's they like to call this rich display system and so you might

have seen already that it can embed la tech and all these different types of images and also JSON and HTML and we're just using the HTML the current version of the notebook is only like point 13 and they have a pretty detailed road map for improving support

[ ... ]

Nota: se han omitido las otras 2.501 palabras de la transcripción completa para cumplir con las normas de «uso razonable» de YouTube.