Part 2: evolving Streamlit in Snowflake

evolv Consulting
5 min readFeb 22, 2024

Leveraging Emojis to Provide the Visual Firepower You Need to Make the Point in your Native App in Snowflake đŸ”„đŸ”„đŸ”„

Written by Chris Schneider

I am proud to continue our journey with you on the second part of our three-part series on taking your custom Snowflake Native App in Streamlit to the next level. Drawing inspiration from real-life problem-solving adventures at our evolv #Hackathon, we’ve got a fun twist for you in this chapter of “evolving Streamlit in Snowflake
” In this edition we will reveal a quick, ingenious way to transform your app’s user experience by using emojis to quickly show a historical representation of continuous status execution. Whether you’re a beginner or an expert, these techniques will elevate your app to new (emoji-infused) heights 🚀✹

What is Streamlit?

In case you missed the first part of our series, Streamlit is an approachable open-source Python library that enables you to quickly build simple and robust data-centric applications. The impact of Streamlit on data app development and dissemination has been groundbreaking. Its user-friendly interface, rapid performance, and vibrant community have truly revolutionized the landscape for data professionals.

[For those new to Streamlit, here’s a quick-start guide that will help you install and run your first app.]

Short but Sweet!

Creating a custom app involves the challenge of presenting large volumes of history concisely to convey key points effectively. For instance, when dealing with numerous iterations of tasks or automated processes, it’s crucial to maintain user engagement with quick, precise outputs. Rather than requiring users to sift through extensive lines of data to grasp historical trends, offering a brief overview of past iterations proves more beneficial. However, summarizing information too broadly can hinder understanding of intricacies and relationships within continuous executions.

We recently encountered a scenario where we wanted to display a list of common tasks that automatically execute over time within our systems; daily, weekly, or even monthly. We need to provide the appropriate representation of the data to quickly detect trends or inconsistencies that require attention. Just having summarized a set of counts and KPIs wouldn’t provide the right pane of glass to convert the information into insights.

Right Out-of-the-Box, Well Maybe?

Initially our intentions of solving our problem was leveraging a column configuration using a Streamlit data_editor widget. Those out-of-the-box options look promising! See for yourself


These options do enable the historical representation, but this output seems too binary. The results are either “Success” or “Not Success” over time. I can start to see a trend using the Line Chart option, but what about the execution results that are neither ‘successful’ nor ‘unsuccessful?’ Could there be something in between that highlights a potential area of concern? Looking at the above visuals, I must remind myself constantly what means success or not. Sure, I can always add more variability to get past the binary nature of this output, but that would produce a more complex, maybe even unusable output.

Here is another version using a Plotly Scatter chart. Intriguing
 this option provides better granularity, but I am limited in presenting additional data for each item to embellish the data story. Therefore, I keep focusing on columnar options



honestly, after reviewing all these options, I am left yearning for more. đŸ€”

An Epiphany is Realized!

Then it hits me; let’s find a way to display the standard đŸš„ values strung together to properly represent each iteration in a column like shown above. This method, commonly seen in other orchestration systems to showcase execution history, aligns better with our requirements than the current column configurations output. After a bit of trial and error, I conclude that Streamlit emojis work perfectly for this alternative. With the additional possibilities that emojis provide, I can have some fun with this and connect better with our users. All that’s left is to retrieve my status data, reference emoji content, and present in the application to the user. Sweet! Excitedly I go off to update our output. 🏃💹

The results are in! Switching to a more variable output provides the granularity we were looking for and provides a deeper connection to the user and their experience within the app. The added beauty of this solution: I am not using the Streamlit data_editor any longer enabling this option to easily work in our Snowflake Native App
 double bonus!! 🎉🎉

If you are interested in more information about the technical bits and pieces of this solution, including access to the sample code, data tables, and sample data, you can access the full project repository on GitHub.

Emojis are louder than words.

Making your data tell a story better, not just a better story, can be the difference between losing your users amid data overload or providing that simple (yet clever!) output, allowing users to easily digest the message. Clarity in your Streamlit app speaks volumes about your dedication to providing your users with the tools to make them successful.

Emojis, initially designed to simplify intricate human emotions, now play a pivotal role in the digital era dominated by text. In a virtual realm where subtleties and feelings risk getting lost in written content, emojis emerge as a visual language of sentiments, effectively encapsulating our thoughts in a few pixels. These symbols blend complexity with simplicity, and this Streamlit solution empowers users to effortlessly grasp valuable insights, streamlining the data exploration process.

It goes beyond mere technical enhancement; it serves as a gateway to a more profound and efficient journey in data analysis, fostering enhanced decision-making and increased efficiency in data-related tasks.

’Til Next Time!

Excited for the upcoming and final edition of “evolving Streamlit.” 🚀 (Be sure to check out the first of our series if you missed it.) Stay tuned for more tips & tricks, from beginner to advanced, to elevate UX in Streamlit for your custom apps. Keep experimenting, innovating, and sharing to keep our community vibrant!

If you’re interested in how evolv can help you shape the future of Data, visit our blog and check out some of our previous featured pieces. Feel free to drop your comments below and be a part of the conversation that is shaping the future of data apps.

evolv Features:

by @Chris Schneider, “evolving Streamlit in Snowflake, Custom Branding your Native Apps”

by @Rose Ellison, “Join the AI Elite, Master the Untapped Power for GenAI,”

evolv is a cloud-native consulting firm who brings a fresh perspective to help clients overcome #management and #technology challenges. We specialize in strategy, data & analytics, and digital transformations. Learn more at www.evolvconsulting.com.

--

--

evolv Consulting

We are cloud-native, business consultants who bring a fresh perspective to help clients overcome #management and #technology challenges.