Thanks for the great tool! Streamlit is a hoot to play with. I’m putting together my first non-toy application with Streamlit (demo next week) and have a use case for deck.gl that requires additional layer types.
Of interest (to my fairly specific IoT application):
GeoJsonLayer (must-have)
IconLayer (nice-to-have)
As a workaround (as these features might not be of interest to a large audience), is there a good way to use the pydeck bindings within streamlit? I’m not super familiar with deck.gl but have been impressed so far.
Thanks for your help!
Experimented a bit trying to embed the html created by pydeck into streamlit using st.write and the option unsafe_allow_html=True (putting it in a division and an iFrame). Currently returning a blank figure (likely operator error on my part). Does anyone have a good example of a similar use case working with Streamlit? Thanks for your help
Hi @kuttacondition. Welcome to the community !
I’m sorry that you’re running up against this limitation.
Your best bet in the short term would be to use Altair instead of deck_gl. Altair can render maps and has good Streamlit support. In particular, this stack overflow response presents like a nice explanation of how to render GeoJSON in Altair.
Of course, I understand that you were hoping to use deck_gl, and I apologize that we don’t yet support these two layer types. Two Github issues track your request:
Please follow these issues on Github for the latest updates. If you’re feeling particularly ambitious, you could even implement them yourself! I’m sure the community would be excited!
More generally, please feel free to submit feature requests directly on Github.
Best of luck with your demo next week!!
@Adrien_Treuille. Thanks for the tips and adding the feature request for the IconLayer. I’ll track the requests (along with a few other relevant ones) on GitHub. I managed to get the GeoJson input (with time slider) working with matplotlib and for a simpler case, Altair. I was seeing errors (and empty figures) when I tried to overlay multiple polygons —likely the topic of a post on the Altair site. Altair is working very well for more traditional line/scatter plots and has a nice clean look and interactivity. It took a combination of plotting libraries but the demo should go well. Thanks for the great tool and look forward to future developments.
1 Like
Just an update – demo with the customer went well yesterday. I (an engineer developing physics-based models) did a preview for management the day before and they were (surprisingly) not pleased with my work. They were quite concerned that the streamlit app was stepping on the toes of the UI group and would confuse the customer. The customer on other hand was simply happy to see results, and fast. To quote: “this is awesome --I really like the visualizations and where this is going” followed with a conversation about how they are interested in funding future model development Thanks for the useful tool!
1 Like
Thanks for sharing the feedback @kuttacondition. We really appreciate it! I saw that you already saw our upcoming Pydeck support which should also solve your problem, and I’m including the link here for others who come across the conversation.