Posts

Showing posts with the label bokeh

bokeh on_change for patches

bokeh on_change for patches Using python 3.6 and bokeh 13.0. I'm combining a bokeh patches to create a map of provinces and and bokeh circle to overlay the cities. I want to use this map as interactive input filter for another plot. When clicking cities is no problem, I get the name of the city. When trying to do the same for a province, which is not a single point, but rather a polygon, I receive the following error message: error handling message Message 'PATCH-DOC' (revision 1): TypeError('list indices must be integers or slices, not list',) I just want the index/name of the row. How should I approach this? with open('map_NL_provinces.pickle', 'rb') as f: provinces = pickle.load(f) with open('map_NL_cities.pickle', 'rb') as f: cities = pickle.load(f) # renaming key in in dict provinces['name'] = provinces.pop('names') provinces = ColumnDataSource(data = provinces) # from df to CDS cities = ColumnDataSour...