This project aims to scrape and analyze Twitter conversations on specific topics using the Twitter API. The collected data is cleaned and processed in Python, and the analysis is presented through visualizations.
We define a specific scope for analysis and use the Twitter API to fetch relevant data. The data is then restored and cleaned in Python, followed by detailed analysis and visualization.
My teammate and I, worked together to collect and analyze tweets containing the following hashtags:
#MahsaAmini
#OpIran
#IranRevolution2022
#MohsenShekari
#HosseinRonaghi
#WomenLifeFreedom
- Install Twitter Developer account and upgrade the plan.
- Define hashtags to search for on Twitter.
- Run Python scripts to fetch tweets containing the specified hashtags.
- Collect tweets from the last seven days.
- Save tweets in CSV files.
- Remove duplicates.
- Normalize text (lowercase).
- Remove unicodes and stopwords.
- Apply stemming using the NLTK package in Python.
- Perform text analysis to find the most repeated words in tweets.
- Create bar charts and other visualizations to represent the frequency of key terms.
- HosseinRonaghi: 123 tweets (13 Dec - 22 Dec)
- IranRevolution: 6200 tweets (17 Dec - 18 Dec)
- MahsaAmini: 10368 tweets (5 Dec)
- MohsenShekari: 33589 tweets (14 Dec - 20 Dec)
- OpIran: 16000 tweets (7 Dec - 17 Dec)
- WomenLifeFreedom: 10000 tweets (8 Dec - 17 Dec)
This project highlights the influence of social media on societal and political issues. It provides insights into the narrative surrounding key social movements, supports academic research, and informs media and policy-making.
- Programming Languages: Python
- Libraries: Tweepy (Twitter API), NLTK (Natural Language Processing)
- Databases: Local CSV files
- Visualization: Matplotlib, Seaborn
- Amirhosein
- Fereshteh
This project demonstrates the ability to harness social media data for insightful analysis, contributing to a deeper understanding of significant social issues and the power of digital platforms.