I am trying to create a simple map with Geoviews which allows me to select between different values of a dataframe column such as the following example taken from here.
I tried to reproduce the same example on this simple dataset:
id;lat;lng;name 0;47.397773;8.546508;peter 1;47.398487;8.544288;frank 2;47.397013;8.543065;elsa
which I read in with pandas like so:
df = pd.read_csv('test.csv', delimiter=';')
then create the GeoViews interactive map with a Bokeh backend:
layer = gv.Points(df, kdims=['lng', 'lat'], vdims=['name']).groupby('name') layer.opts(size=10, height=1200, width=1200, alpha=0.5, tools=['hover']) * gts.Wikipedia
the output is not the desired one but rather an empty drop down menu with no map at all (unfortunately I cannot post another image since I’m a new user). But no error.
If I remove the
.groupby('name') the map appears as expected but obviously without any dropdown menu to select different map layers that show point of different name.
I am on a Windows 10 machine using Jupyter Notebook and Python 3.7.3 with anaconda and among others the following library versions:
holoviews 1.12.7 geoviews 1.6.6 pandas 0.25.1
If anybody could lead me into the right direction of what I’m doing wrong that would be awesome
EDIT: Was able to solve the problem by updating my conda environment and with it the geoviews and holoview library to 1.6.6, 1.12.7 (so no change there - wasn’t the issue) and then manually setting
bokeh to version 1.4.0 (apparently an issue with v2.0.0 according to this thread). Hope that helps anyone else