Streamlit + Twitter Data Magic
If you like python and want and easier way to build GUI's, you will love Streamlit!
My new favorite Python package is Streamlit. I can’t explain it any more succinctly than they can, so here is the definition from the Streamlit website:
Streamlit turns data scripts into shareable web apps in minutes.
All in pure Python. No front‑end experience required.
And they aren’t kidding about “No front-end experience required”. You can take a machine learning model, data aggregation tool, etc and put it into a GUI within a matter of minutes. There aren’t extensive customization options, and this is not something you’d want to use to make a complete website, but for demo’s and quick value propositions, Streamlit is gold!!
(For those who just want to see the code skip to the bottom and make sure to subscribe. I am planning on including my code on all future posts)
I am working on another project using Twitter data. More on that next article! But, before that comes out I wanted to share the tool I built in Streamlit to pull Twitter data. Essentially all one has to do is enter the Twitter handle of the person they are interested in, hit “Pull Twitter Data”, and let it run. Try it out! I’d love to hear about any project you do with the data you are able to pull.

Here is the app!
https://noelham-data-dives-hamilton-twitter-streamlit-058vku.streamlitapp.com/
If you’d like to set up your own app I found this youtube channel helpful in setting up an API key with Twitter.
And for those that just want to see the code… you can find it here:
https://gitlab.com/-/snippets/2414593
Lastly, if you are looking to try out Streamlit, I highly recommend their cheatsheet guide here: https://docs.streamlit.io/library/cheatsheet. It has pretty much all the buttons, user inputs, title options etc. that you would need for 90% of use cases. Streamlit even supports caching 🤯 so you don’t have to do big data pulls over and over again!
Excited to share what I find out digging into the twitter data next time! And a quick thanks to Phil for opening my eyes to the world of Streamlit.