Interacting with IPython Notebook widgets
Interactive IPython notebook widgets are, at the time of writing (July 2015), an experimental feature. I, and as far as I know, many other people, hope that this feature will remain. In a nutshell, the widgets let you select values as you would with HTML forms. This includes sliders, drop-down boxes, and check boxes. As you can read, these widgets are very convenient for visualizing the weather data I introduced in Chapter 1, Laying the Foundation for Reproducible Data Analysis.
How to do it...
- Import the following:
import seaborn as sns import numpy as np import pandas as pd import matplotlib.pyplot as plt from IPython.html.widgets import interact from dautil import data from dautil import ts
- Load the data and request inline plots:
%matplotlib inline df = data.Weather.load()
- Define the following function, which displays bubble plots:
def plot_data(x='TEMP', y='RAIN', z='WIND_SPEED', f='A', size=10, cmap='Blues...