Skip to content

Analyzing 9801 tweets using Python's Tweepy library and VADER model for sentiment analysis. Results mapped to emotions ('happy,' 'curious,' 'neutral,' 'upset,' 'angry'). Insights gathered on popular discussions, famous accounts, hashtags, and tweet locations for a deeper understanding of user sentiments.

Notifications You must be signed in to change notification settings

hosseinhimself/Missing-Baby

Repository files navigation

Missing-Baby

This project is about delving into a real-life, heart-wrenching case that captured public attention, where Constance Marten and Mark Gordon mysteriously disappeared with their newborn baby. Through the analysis of Twitter data using the Tweepy library in Python and applying the VADER sentiment analysis model, we aim to uncover the collective sentiments, reactions, and behaviors of users in response to this distressing news.

Data Collection

Data collection for this project was carried out between January 23 and March 6, 2023, utilizing the Tweepy library in Python. During this period, a total of 9801 tweets were gathered, forming the basis for our analysis.

Sentiment Analysis with VADER

For the sentiment analysis, we employed the VADER model (Valence Aware Dictionary and sEntiment Reasoner). VADER is a lexicon and a simple rule-based model that's particularly well-suited for sentiment analysis on social media platforms. It excels at handling the diverse expressions commonly found on social media, including slang, abbreviations, capitalizations, repeated punctuations, and emoticons, to accurately determine sentiment.

We utilized the SentimentIntensityAnalyzer module in the NLTK library of Python to implement the VADER model. The results generated by VADER consist of a dictionary with four keys: 'neg', 'neu', 'pos', and 'compound'. 'neg', 'neu', and 'pos' represent negative, neutral, and positive sentiments, respectively. The sum of these values should be approximately 1 when using floating-point arithmetic.

Emotion Classification

To assign specific emotions to the sentiment scores obtained from VADER, we established a logical mapping system. This system is presented in the following table:

Positive Negative Neutral Emotion
+ - - Happy
+ - + Curious
- - + Neutral
- + + Upset
- + - Angry

These mappings allow us to interpret the sentiment scores ('positive', 'neutral', and 'negative') from VADER as corresponding emotions ('happy', 'curious', 'neutral', 'upset', and 'angry').

Additional Insights

In addition to sentiment analysis, we also explored other facets of the collected data. We determined the frequency of tweets from prominent accounts based on their follower counts. Hashtags in the tweets were counted to identify popular discussions on the platform. We also identified the locations of the tweets by extracting information from user profiles, shedding light on the geographical distribution of sentiments and behaviors among Twitter users in response to the news of the Missing Baby.

This comprehensive analysis provided valuable insights into the sentiment and behaviors of Twitter users surrounding this sensitive and significant topic.

About

Analyzing 9801 tweets using Python's Tweepy library and VADER model for sentiment analysis. Results mapped to emotions ('happy,' 'curious,' 'neutral,' 'upset,' 'angry'). Insights gathered on popular discussions, famous accounts, hashtags, and tweet locations for a deeper understanding of user sentiments.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published