Inspired by several other similar existing projects, I began making my weekend project last Saturday and kinda accomplished it on Sunday afternoon. Why did I do this, by the way? Well although I’ve been using Python’s Streamlit and Heroku for a while at work, I have never used them for any of my personal projects—not that I’ve had any personal projects ever since I started my new job anyway, but, well—
So the idea of the word cloud is pretty simple: you make a cloud of words, based on a text, where the words that appear most would have a bigger size. In the case of my web app, it will extract the tweets from a certain user (we can choose any user, simply input their username, and as long as their profile is open and public, you’ll be able to scrape their tweets), get all the words they’ve used, and make a word cloud from them. That’s it.
In the beginning, I thought of copying the others and making some kind of “Your 2021 Twitter Highlights”, but in the end, I decided to make the app work in two modes: either by inputting the number of last tweets that you want to extract (max. 2000 tweets) or extracting the dates within one interval (by default, starts from today until a year ago, max. interval one year, and max. 2000 tweets). You might be asking, why only 2000 tweets? Well, I don’t want my app to be blocked by Twitter, that’s the first thing, the second is I’m running my app on the free version of Heroku, so limiting the processing time and power is kinda necessary for me.
Anyway, above is a short demo on using the app on mobile, and here are two examples of the word clouds that I have generated based on these two users’ last 1000 tweets:
The project is finished and deployed here: https://tweetcloudmaker.herokuapp.com. Let me know what you think!