How do you add GeoJsonTooltip to folium.Choropleth class in folium?
Two things:
- You need to use the
GeoJsonTooltip
class to use the geojson fields. The regularTooltip
class only works with simple text. That's the error you're getting. - You can pass the
GeoJsonTooltip
to theGeoJson
object that is created byChoropleth
under the hood:GeoJsonTooltip(....).add_to(theft.geojson)