![]() I cannot really help you because your example does not run without modifications. #Update the data every 10seconds (1000*10 ms)Ĭurdoc().add_periodic_callback(callback=update_data, period_milliseconds=1000 * 10) # stock.stream(dict(Date=new_data,Ĭurdoc().title = 'Bitcoin Live Data Plot' # Second try update - different error codes relating to dataframe issues Stock.stream(new_data=new_data, rollover=10) New_data = dict(Date=,Open=, High =, Low = ,Close=, Volume=, index = ) # ValueError: "Must stream updates to all existing columns (missing: level_0) # First try update- error code relating to Must stream updates to all existing columns (missing: %s)" % #", ".join(sorted(missing))) #Bokeh Magic# stock = ColumnDataSource(data=dict(Date=, Open=, High=, Low=, Close=, Volume =, index=)) # map dataframe indices to date strings and use as label overrides even during zoom in function View_dec = CDSView(source=stock, filters=) View_inc = CDSView(source=stock, filters=) Inc = stock.data > stock.dataĭec = stock.data > stock.data Title="Bitcoin Live - Bitfinex", toolbar_location='above') P = figure(plot_width=W_PLOT, plot_height=H_PLOT, tools=TOOLS, Python Function to plot stock def plot_stock_price(stock): Python function below to collect data from csv file to format as above file extract def get_symbol_df(symbol=None):ĭf = pd.DataFrame(pd.read_csv('D_Crypto_Bitfinance/' + symbol + '.csv')) pd.read_csv)įrom otting import figure, ColumnDataSourceįrom import Dropdownįrom bokeh.models import BooleanFilter, CDSView, Select, Range1d, HoverToolįrom import NumeralTickFormatter # import pandas as pd # data processing, CSV file I/O (e.g. Please can someone help that my candles can update automatically? ValueError: "Must stream updates to all existing columns (missing: level_0) “Must stream updates to all existing columns (missing: %s)” % ", ".join(sorted(missing))) I’m getting following error from the bokeh serve -show app and cant seem to get behind the problem: My “update_data” stream function does not update my plot automatically. As a note, my csv file is not “appending data” it rewrites the full set of data every few seconds… don’t know if the problem sits here perhaps… Data seems fine as the candles do plot perfectly with manually refreshing the browser though. I’m new to bokeh - on a steep learning curve- Love bokeh and its power though… I’m pulling live data from Bitfinex and saving it to csv with chosen interval required for live streamed plotting.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |