Heat maps visualize data in a matrix using a set of colors. Originally, heat maps were used to represent prices of financial assets, such as stocks. Bokeh is a Python package that can display heatmaps in an IPython notebook or produce a standalone HTML file.
I have Bokeh 0.9.1 via Anaconda. The Bokeh installation instructions are available at http://bokeh.pydata.org/en/latest/docs/installation.html (retrieved July 2015).
from collections import OrderedDict from dautil import data from dautil import ts from dautil import plotting import numpy as np import bokeh.plotting as bkh_plt from bokeh.models import HoverTool
The following function loads temperature data and groups it by year and month:
def load(): df = data.Weather.load()['TEMP'] return ts.groupby_year_month(df)
Define a function that rearranges data in a special Bokeh structure:
def create_source(): colors = plotting.sample_hex_cmap() month = [] ...