Hi everyone,
Please to see that I can add tooltips to geojson!
I've been following this notebook example and I see that I can hover over different areas and get tooltips.
In that example the geometry and tooltip data appear to all be in a DataFrame. Is there a way to get tooltip data if the polygons are in a dictionary structure but the values for the tooltips (e.g., employment rates) are in a DataFrame?
Okay I just looped through and added a new field to the dictionary. Thanks very much.
@Alcampopiano check the current (>v0.6.0 or current master) docstring in GeoJson, this feature wound up getting split into two separate classes - GeoJsonTooltip and Tooltip. GeoJsonTooltip allows you to access the properties keys in each GeoJson feature with a fields kwarg, while Tooltip will write the same text string as Tooltip content for each feature.
I'm going to add a new notebook example to the directory now to have some better examples of it.
Thanks for the helpful information. I was confused by the split, but this clears it up. Thanks very much.
Most helpful comment
@Alcampopiano check the current (>v0.6.0 or current master) docstring in
GeoJson, this feature wound up getting split into two separate classes -GeoJsonTooltipandTooltip.GeoJsonTooltipallows you to access thepropertieskeys in each GeoJson feature with afieldskwarg, whileTooltipwill write the sametextstring as Tooltip content for each feature.I'm going to add a new notebook example to the directory now to have some better examples of it.