Overview
The Paris Olympics 2024 promises to be one of the most significant global events of the decade, uniting nations, cultures, and athletes from around the world. As excitement builds and discussions around the event intensify, understanding public sentiment becomes crucial for stakeholders, including organizers, sponsors, media outlets, and even fans. This project aims to analyze the sentiment of conversations surrounding the Paris Olympics 2024, offering insights into public opinion, perceptions, and the overall sentiment landscape leading up to and during the event.
Goal
This project aims to capture and decode the global sentiment surrounding the Paris Olympics 2024. By analyzing emotions and opinions from diverse sources, we seek to provide real-time insights that empower organizers, brands, and media to align with public sentiment, ensuring the Paris Olympics 2024 resonates positively worldwide.
Objectives
- Develop a comprehensive social media sentiment analysis model that accurately captures and interprets public sentiment about the Paris Olympics from social media data.
- To extract, preprocess and clean social media data from multiple platforms addressing quality issues and handling multilingual content related to the Paris Olympics.
- To develop and train advanced natural language processing models to accurately classify sentiments incorporating techniques to handle sarcasm and contextual nuances.
- To create interactive visualizations to display sentiment trends and key events providing actionable insights to stakeholders based on comprehensive analysis of public opinions.
- Organizers of the Paris Olympics 2024 - Sentiment analysis helps them gauge public opinion allowing them to make informed decisions and adjust their strategies accordingly.
- Sponsors - Sentiment analysis helps them understand how their brand is perceived in relation to the Olympics.
- Media outlets - Sentiment analysis provides them with insights into public interest and trending topics.
- Fans and general public - They are the primary audience for the Olympics and their sentiment directly impacts the event's success.
- Athletes - They are the central figures of the Olympics and public sentiment towards them can affect their performance and well-being.
- Local authorities and businesses in Paris - The Olympics significantly impact the host city and sentiment analysis can help gauge public opinion on local issues related to the event.
The data was extracted from X using Octorparse Webscraping Tool. The focus was on tweets in the form of hashtags, comments and retweets discussing the various aspects of the Paris Olympics.
The data processing step involved analyzing and cleaning a merged dataset of tweets related to the 2024 Paris Olympics originally composed of multiple CSV files. A DataUnderstanding class was created to examine the dataset revealing missing values and discrepancies as well as a large number of apparent duplicates most of which were false positives due to partial similarities.
The model development and evaluation process involved testing several approaches. We started with traditional machine learning models, including Logistic Regression, Support Vector Machine, Random Forest, and Naive Bayes. Among these, the Random Forest model emerged as the best performer initially achieving 97.4% accuracy which slightly decreased to 96.6% after tuning. We also implemented an XGBoost model using RandomizedSearchCV for hyperparameter tuning, which achieved 82.2% accuracy. The VADER model demonstrated excellent performance with 94.92% accuracy and impressive overall metrics: 95.20% Precision, 94.92% Recall and 95.01% F1-Score. In contrast, the DistilBERT model showed lower performance with 44.34% accuracy and overall metrics of 45.94% Precision, 44.34% Recall and 44.62% F1-Score.
The VADER (Valence Aware Dictionary and sEntiment Reasoner) model significantly outperformed all other models including the tuned Random Forest. The success of VADER, a rule-based model designed specifically for social media text, highlights the importance of domain-specific tools in sentiment analysis especially when dealing with the nuanced language of Olympic-related discussions on social media platforms.
- Implement a real-time sentiment tracking dashboard for organizers and media partners, allowing them to respond quickly to shifts in public opinion.
- Develop a multi-lingual sentiment analysis capability to cater to the international nature of the Olympics using language-specific versions of VADER where available.
- Create a sentiment-based alert system for potentially controversial or viral topics enabling rapid response from the communications team.
- Integrate sentiment analysis results with other data sources (e.g. ticket sales, TV ratings) to provide a comprehensive view of public engagement.
- Use sentiment trends to guide content creation and social media strategies focusing on themes and athletes that generate positive engagement.
- Provide regular sentiment reports to sponsors helping them optimize their Olympic-related marketing campaigns.
- Collaborate with local Paris businesses to use sentiment data for improving visitor experiences during the Olympics.
- Incorporate Olympics-specific features such as mentions of specific sports, athletes or events to improve classification accuracy.
- Create a specialized lexicon for VADER that includes Olympic-specific terms and their sentiment associations.
- Extend the sentiment analysis to multiple social media platforms and news sources for a more comprehensive view.
- Develop user-friendly and interactive dashboards for stakeholders to explore sentiment data in real-time.
- Set up a system to compare sentiment trends with previous Olympic events to identify unique characteristics of the Paris Olympics.
- Develop algorithms to automatically identify and report on significant shifts in sentiment or emerging trends.
- Offer training sessions for various stakeholders on how to interpret and act upon the sentiment analysis results.
- Set up infrastructure for continued analysis post-Olympics to track the event's lasting impact on public sentiment towards Paris and the Olympic movement.
Check out our app by clicking on your favorite color:
To run the application locally, follow the following steps:
Clone the repository
https:
git clone https://github.com/Atieng/sentiment-analysis-2024-olympics.git
ssh:
git clone [email protected]:Atieng/sentiment-analysis-2024-olympics.git
Navigate to the project directory
cd sentiment-analysis-2024-olympics.git
Create a virtual environment
python -m venv vader_env
Activate the virtual environment
Windows:
vader_env\Scripts\activate
MacOS/Linux:
source vader_env/bin/activate
Install dependencies
pip install -r requirements.txt
Execute the app on Streamlit
streamlit run vader.py
MIT License
Kindly don't hesitate to reach out to the team if you have any questions.
Sentiment Analysis-Paris Olympics 2024/
โ
โโโ Project Files/
โโโ .ipynb_checkpoints
โโโ .streamlit
โโโ Csv Files
โโโ Images
โโโ Models
โโโ Notebooks
โโโ the_team
โโโ .DS_Store
โโโ .gitattributes
โโโ .gitignore
โโโ LICENSE
โโโ README.md
โโโ Sentiment Analysis Presentation.pdf
โโโ requirements.txt
โโโ sentiment_analysis_paris_olympics.docx
โโโ vader.py