Project driven tutorial
Anaconda: Python + Conda + a bunch of packages
$ conda update conda
$ conda update anaconda
or
Miniconda: Python + Conda +
$ conda env create
$ source activate scipy-tutorial
$ git clone https://github.com/chdoig/scipy2015-blaze-bokeh.git
$ cd scipy2015-blaze-bokeh
$ ipython notebook
Bokeh version: 0.9.0
Blaze version: 0.8.0
Download:
https://s3.amazonaws.com/scipy-blaze-bokeh/Land_and_Ocean_LatLong1.nc
https://s3.amazonaws.com/scipy-blaze-bokeh/lahman2013.sqlite
Move those datasets to the folder:
~/scipy2015-blaze-bokeh/data
Python interactive visualization library that targets modern web browsers for presentation
http://bokeh.pydata.org/en/latest/
@BokehPlots
Bokeh organization
http://bokeh.pydata.org/en/latest/docs/user_guide/charts.html
1.1 Charts - Timeseries.ipynb
Visualize the evolution of the temperature anomaly monthly average over time with a timeseries chart
1.1 Charts - Timeseries.ipynb
1.1 Charts - Timeseries.ipynb
Style your plot
Ideas:
1.1 Charts - Timeseries.ipynb
1.1 Charts - Timeseries.ipynb
Add the moving annual average to your chart
1.1 Charts - Timeseries.ipynb
http://bokeh.pydata.org/en/latest/docs/user_guide/plotting.html
1.2 Plotting - Timeseries.ipynb
Reproduce the timeseries chart using the plotting interface
1.2 Plotting - Timeseries.ipynb
http://bokeh.pydata.org/en/latest/docs/user_guide/styling.html
1.2 Plotting - Timeseries.ipynb
Style the plot appropriately
1.2 Plotting - Timeseries.ipynb
http://bokeh.pydata.org/en/latest/docs/user_guide/tools.html
1.2 Plotting - Timeseries.ipynb
Add a crosshair and hover tool to the plot
1.2 Plotting - Timeseries.ipynb
1.2 Plotting - Timeseries.ipynb
[OPTIONAL] Style the hover tooltip
1.2 Plotting - Timeseries.ipynb
1.3 Plotting - Worldmap.ipynb
Draw a worldmap with the plotting interface
1.3 Plotting - Worldmap.ipynb
1.4 Plotting - Climate.ipynb
Plot temperature anomaly monthly average for a given year and month by lat/lon with bokeh.plotting.image_rgba()
1.4 Plotting - Climate.ipynb
1.4 Plotting - Climate.ipynb
Overlay the worldmap boundaries in the temperature image plot
1.4 Plotting - Climate.ipynb
http://bokeh.pydata.org/en/latest/docs/reference/models.html
1.5 Glyphs - Legend.ipynb
Create a legend plot for the temperature map with the Glyph interface
1.5 Glyphs - Legend.ipynb
http://bokeh.pydata.org/en/latest/docs/reference/resources_embedding.html#bokeh-io
http://bokeh.pydata.org/en/latest/docs/user_guide/layout.html
1.6 Layout.ipynb
Wrap your visualizations in functions
Wrap each of the previous visualizations in a function in a python file (e.g. viz.py):
1.6 Layout.ipynb
Layout your plots using hplot and vplot
1.6 Layout.ipynb
1.6 Layout.ipynb
Store your layout in an html page
http://bokeh.pydata.org/en/latest/docs/reference/plot_objects.html
http://bokeh.pydata.org/en/latest/docs/user_guide/server.html
Examples:
1.7 Animate.ipynb
Animate the climate map
1.7 Animate.ipynb
1.7 Animate - optional.ipynb
[OPTIONAL] Add a title plot for the app with month and year that gets updated with the plot animation
1.7 Animate - optional.ipynb
1.7 Animate - optional 2.ipynb
[OPTIONAL] Animate the timeseries plot
1.7 Animate - optional 2.ipynb
http://bokeh.pydata.org/en/latest/docs/user_guide/interaction.html
Examples:
1.8 Animate Widgets
[OPTION A] Add a play and stop button
[OPTION B] Add sliders to select the year and month
1.8 Animate Widgets
1.9 Embed
[Exercise 1] Embed the original static layout into a flask app
[Exercise 2] Embed your interactive app into a flask application
1.9 Embed
2. Blaze.ipynb
Create a Baseball application (Lahman dataset) with Blaze and Bokeh
Slides:
http://chdoig.github.com/scipy2015-blaze-bokeh
Email: christine.doig@continuum.io
Twitter: ch_doig