Practice: kiosk glyphs

vbar + line.

vbar + line.

Goal

Run every block and confirm the chart is visible.

from bokeh.plotting import figure, show
from bokeh.layouts import column
cities = ["Nairobi", "Mombasa", "Kisumu", "Nakuru", "Eldoret"]
a = figure(x_range=cities, width=420, height=220, title="Units")
a.vbar(x=cities, top=[21, 15, 15, 18, 12], width=0.6, color="#1d4f7a")
b = figure(x_range=["Jan", "Feb", "Mar", "Apr"], width=420, height=220, title="Rain")
b.line(["Jan", "Feb", "Mar", "Apr"], [48, 55, 92, 150], legend_label="Nairobi")
b.line(["Jan", "Feb", "Mar", "Apr"], [22, 18, 40, 80], legend_label="Mombasa", color="#c45c26")
show(column(a, b))
print("practice")
from bokeh.plotting import figure, show
cities = ["Nairobi", "Mombasa", "Kisumu", "Nakuru", "Eldoret"]
p = figure(x_range=cities, width=420, height=280, title="Units")
p.vbar(x=cities, top=[21, 15, 15, 18, 12], width=0.6, color="#1d4f7a")
show(p)
print("bar")
from bokeh.plotting import figure, show
p = figure(width=420, height=280, title="scatter")
p.circle([12, 7, 9, 4], [1260, 1540, 945, 880], size=10, color="#1d4f7a")
p.xaxis.axis_label = "units"
p.yaxis.axis_label = "shillings"
show(p)
print("scatter")
print('practice')