April 2018
Beginner
238 pages
7h 13m
English
We can use this script:
from bokeh.io import output_notebook, showfrom bokeh.layouts import widgetboxfrom bokeh.models.widgets import TextInputfrom bokeh.models import WidgetBoximport numpy as npimport pandas as pdfrom bokeh.plotting import figure, showfrom bokeh.layouts import layoutoutput_notebook()# load the vote countsfrom_counts = np.load("from_counts.npy")# convert array to a dataframe (Histogram requires a dataframe)df = pd.DataFrame({'Votes':from_counts})#print(df.head())p = figure(plot_height=200,plot_width=600, title="How Many Votes Made by Users")p.vbar(x=range(0,6110), width=0.5, bottom=0, top=df.Votes, color="firebrick")button = Button(label="Foo", button_type="success")text = TextInput(title="title", value='A ...