On The Edge of 30

Atonye Nyingifa
6 min readApr 1, 2021

Analysis of over 10000 tweets on the topic of turning 30

Photo by Marina Lima on Unsplash

From the moment I turned 28, I started flirting with the thought of turning 30. The idea immediately brought a maelstrom of emotions -pervasive thoughts that compared where I thought I’d be at 30 to where I currently was. In all the important spheres of my life: family, career, self-confidence, and body positivity, I still felt like I hadn’t quite arrived yet. The road to 30 has been rocky, to say the least, with short bursts of self-actualization, resting imposter syndrome, a quarter-life crisis, and constantly wondering if this emotional rollercoaster is what constitutes “adulting”. I set out to discover what other people like me were thinking and feeling to answer my question — On the verge of 30, what really matters?. In this article, I’ll be doing my best to answer that question using data gathered from scraped tweets, so this will be part data analysis and part-Iyanla fix my life lol…

  1. The Data: With over 200 billion tweets per year, Twitter was an obvious choice to glean opinions from my target audience. Whilst Gen Z may own TikTok, Gen Y definitely planted its flag first on Twitter (I’ll fight to the death with anyone that says otherwise lol). For the timeline of tweets, I choose to limit my search to tweets between 2018 and the present, in case tweets in late 2020/2021 were skewed towards higher negativity because of the current pandemic. I searched for the phrases “turn 30”, “turning 30”, “turning thirty”, etc. and filtered only tweets with the exact phrase.
Percentage of Tweets gotten by year — pie chart created in Plotly

2. Data Exploration: We love emojis !!, why write “haha” when you can just use the 🤣 emoji ten times, whilst keeping a completely straight face 😐. Many studies on social media text analysis believe emojis and hashtags are pretty great too, giving a clue to the emotions and the intensity thereof that the user was trying to convey when tweeting. To explore that, I used the Emoji and Emot libraries on Python to parse out any emojis/emoticons in the tweets along with the Re (Regular Expression) library to retrieve a unique set of hashtags and emojis from each tweet (some people use upwards of 10 hashtags in 1 tweet !…. It’s me, I am some people). I plotted the top 5 hashtags and emojis used.

Top Emojis used in Tweets and Hashtags in Dataframe

Only about a quarter of the tweets collected had emojis, but a quick look at the top emojis does give an idea of the range of emotions that may have been experienced — joy, mock crying/sadness, and disbelief (Me at 25 — Stop the count 😭!!!). The hashtags don’t give much by way of information, except for the top tweets related to the newly trending “DontLookYourAgeChallenge”

3. Word/Topic Analysis: Apart from the emojis, the words of tweets themselves are especially important, especially when two or more words appear next to each other frequently. After preprocessing the tweets by removing emojis, links, usernames, and stopwords (which are just common words like I, am, etc.) I created a Wordcloud showing the 4000 most common words (Just like bubble charts, bigger words mean that a word appeared more times). Using Python’s Nltk module, I extracted all the two-word pairings, also known as bigrams, from the cleaned tweets.

Word Cloud for top 4000 words….

The word cloud shows that many tweets included words like good, friend, happy, kid, and baby, maybe because a lot of the tweets revolved around either still feeling like a kid or wanting one (Hear ! Hear !).

I can’t help but think that the word “friend” also shows up a lot because as we get older, we tend to value our friendships a lot more, having been built on sturdy stuff like shared milestones, mountain highs, and valley lows.

And at the heart of the word cloud is the word that showed up the most times: good — maybe because, in the end, it really will be…

Wordcloud and Bigram Pairing — created with Matplotlib

The bigrams show a different side of the story, with the top 3 bigrams being somewhat nostalgic — pointing to reflecting on past mistakes, saying sorry to those that one may have wronged, and thinking back to the good (or bad ?) days of high school.

I didn’t get the Wesley Snipe reference either, but apparently, it’s a line from Kendrick Lamar’s wildly popular song, Wesley’s theory ( “I’ll Wesley Snipe your ass before thirty-five”).

Another interesting topic was the number of people mentioning social media/medium, which is something else I’ve been having mixed feelings about lately. There’s definitely an urge to compare yourself with your peers, and social media makes that all too easy. I think it’s important to know when to take a breather from social media, to pat yourself on the back for your achievements — no matter how little, and re-orient your mind to see those pages as inspiration, not condemnation.

5. Sentiment Analysis: Finally, I explored the sentiment of the tweets. Python NLTK’s Sentiment Intensity Analyzer or Textblob’s sentiment modules both allow you to feed in a statement and receive a sentiment score for (positive, negative, neutral — NLTK) and polarity, subjectivity(Textblob)

In their backend, both of these methods have a lexicon (basically a dictionary) of words that have been rated manually according to how positive or negative they are. So good words like happy are assigned a positive score and qualifiers like “not” or “never” would reduce the polarity/positivity of the sentiment. When you feed in your tweet, it basically looks up the words and takes into account how many times they appear to calculate a sentiment score.

To go a little deeper than positive or negative, I cross-referenced the words with the NRC Word Emotion Association Lexicon, available with permission here, which maps over 14,000 words to an associated emotion. For the emotions, I’ve colored the bar according to the emotion it is most correlated with.

Sentiment Analysis of gathered tweets

I was surprised but really happy to see that there was a lot of anticipation and generally more positive than negative feelings towards turning 30 than I’d have imagined, with words related to trust and joy coming up more than fear or sadness.

And rightly so.

30 isn’t some monolith or magic number. Even if you haven’t figured out what exactly you’re good at yet, and what you even want to do, you still have time. From Stan Lee to Vera Wang, to my personal favorite Steve Carell (i.e. Micheal Scott — World’s Best Boss), all of these people had a late start in becoming successful, yet their impact will be felt for generations to come.

So ease up on yourself, breathe and save a piece of cake for me on the day! 💓💓💓

All notebooks may be found here

As always, if you’d like to connect on LinkedIn, I would love to hear your feedback.

--

--

Atonye Nyingifa

Data Analyst, Storyteller, Unrequited Love Poems Writer, African, Avid Binger of the Office and World Traveler (once the panini is over :) ))