'Bokeh HoverTool formating

I have the Bokeh chart on the map with hover. The data comes from 3 df sources. All are geographical locations of events on the map. In some cases under one location there is only one event, but in tooltip the other 2 non existent events appears as ???

tooltip

Here is my code:

wikimedia = get_provider(WIKIMEDIA)
output_file('Geological_Disasters.html')

#1

tooltips = [('Tsunami Location', '@{Location Name}'), ('Volcano', '@{Volcano Name}'),
        ('Earthquake Location', '@place')]
p = figure(plot_width=800, plot_height=600,
           x_range=(world_lon1, world_lon2), y_range=(world_lat1, world_lat2),
           x_axis_type="mercator", y_axis_type="mercator",
           tools="pan, box_select, zoom_in, zoom_out, save, reset, hover",
           tooltips=tooltips,
           title='Geological Disasters')

p.add_tile(wikimedia)

p.circle(x="MercatorX", y="MercatorY",
          source=tsunamis19_20)

# 2

p.circle(x="MercatorX", y="MercatorY",
         size=12,
         fill_alpha=0.8,
         source=volcano19_20)

#3

p.circle(x="MercatorX", y="MercatorY",
         size=3,
         fill_color="red", line_color="red",
         line_alpha=0.1,
         fill_alpha=0.1,
         source=earthquakes19_20)


show(p)
save(p)

Is there a way that I could configure the code to "not show event if name of locations" doesn't exist?

Thx



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source