Is it possible to implement multi-layer tooltips with Pydeck?

Hello Streamlit Community!

I’m wondering if anyone has successfully implemented multi-layer tooltips using Pydeck. As far as I can tell, this doesn’t seem to be supported by Pydeck, but wanted to see if anyone had a workaround.

Relevant post from last year: How can I set different tooltips for multiple layers on a pydeck streamlit

Pydeck’s tooltip documentation

Caroline

Sorry I’m so late to this party on this topic.

I was trying to assess the possibility of this exact requirement as I learned PyDeck and while it’s a little complicated to achieve, tooltips involving any data and formatting are certainly possible in off-the-shelf Streamlit.

The key takeaway is understanding that PyDeck (by default) makes assertions about which data to use for tooltips for each layer. Overcoming my disconnect with the way PyDeck works was 50% of the challenge. I had to simply transform the data for the layers into GeoPandas so the tooltips feature could be instructed to access [exactly] I wanted the tooltip data sources to be.

Outcome? Just pure Streamlit coolness which makes data science simply delightful. :wink:

2 Likes