Basically I want to:
a) Load up a list of water quality sites (that may be different every month).
b) Load these into a multi-select drop-down menu.
c) Allow the user to select one or multiple swimming sites.
d) Based on user selection, display the data from the swimming site.
Is this possible now or in the future with Streamlit?
I’d also suggest an alternative that it seems may work in the future selecting inputs from either a dataframe of the sites, or from the points on a map, à la: https://github.com/streamlit/streamlit/issues/455
I really appreciate any thoughts or input you have.
Streamlit is like a drug to me, it is all I can think about this past week, how to use it to improve my communication of my water quality data analysis! Thank you for such a useful and wonderful tool!
Thank you for the response.
Agreed that I could use multiselect.
I just think that the check-boxes would be quite a bit easier and quicker to click multiple items (for example, I plan on having quite a number of swimming sites in the list). I am also a fan on the simple layout of the check-boxes.
But for sure, if it is not possible then I could try multiselect.
It is possible - but currently not (yet) with the available standard streamlit components.
You could write of course your own custom streamlit component that supports multi-select-drop-down lists.
It’s not something I would use for this project (the site names are very specific and will be used to reference the water quality data in the data frame). But for sure I can see myself using this for some public outreach survey work we sometimes do.
Ah right, I see that streamlit can be quite flexible with the user-defined components.
I will have to read up about how these work (I am generally not a programmer, but am OK at scripting for data analysis).
Related to this, the multiselect option refreshes the page for every selection. Is it possible with a custom component to only update after finishing selection for a drop down box?
Apologies, I will be slow to reply now, it is almost midnight here and I need to sleep!
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.