Old api had very simple way of ploting multiple values:
http://bokeh.pydata.org/en/0.10.0/docs/gallery/stacked_bar_chart.html
However on new api everything is wrong, I found no way to replicate it.
I tried to replicate it:
from collections import OrderedDict
import pandas as pd
from bokeh.charts import Bar, output_file, show
from bokeh.sampledata.olympics2014 import data
df = pd.io.json.json_normalize(data[‘data’])
filter by countries with at least one medal and sort
df = df[df[‘medals.total’] > 0]
df = df.sort(“medals.total”, ascending=False)
get the countries and we group the data by medal type
countries = df.abbr.values.tolist()
gold = df[‘medals.gold’].astype(float).values
silver = df[‘medals.silver’].astype(float).values
bronze = df[‘medals.bronze’].astype(float).values
build a dict containing the grouped data
medals = OrderedDict(countries=countries, bronze=bronze, silver=silver, gold=gold)
any of the following commented are also alid Bar inputs
medals = pd.DataFrame(medals)
#medals = list(medals.values())
output_file(“stacked_bar.html”)
bar = Bar(medals, values=‘gold’, label=“countries”, title=“Stacked bars”)
show(bar)
``
However values keyword argument does not accept multiple columns. That’s stupid.
You can replicate something by duplicating table, puting everything in single column and adding new column with type of medal. And using that column as ‘group’.
But why? Isn’t whole point of bar plot to comprehend data set from multiple columns to groups, without resorting to data move?
Am I missing something?

