How can I center data for Bokeh heatmaps?
I’m referencing the logic in seaborn, heatmap param ‘center’ - seaborn.heatmap — seaborn 0.11.2 documentation
Using the bokeh example code for heatmap:
import pandas as pd
from bokeh.charts import HeatMap, bins, output_file, show
from bokeh.palettes import RdYlGn6, RdYlGn9
from bokeh.sampledata.unemployment1948 import data
data[‘Year’] = data[‘Year’].astype(str)
unempl = pd.melt(data, var_name=‘Month’, value_name=‘Unemployment’, id_vars=[‘Year’])
output_file(“heatmap.html”, title=“heatmap.py example”)
hm = HeatMap(unempl, x=‘Year’, y=‘Month’, values=‘Unemployment’, stat=None, sort_dim={‘x’: False}, width=900, plot_height=500, palette=RdYlGn9)
show(hm)
How can I center data for Bokeh heatmaps?
Thanks,
Ben

