Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

Hmati/Twitter-Sentiment-Analysis-on-Kenyan-Politics-May2025

Domain:

natural language processing

Record type:

project
Creator:
Hma
Host:
The goal of this project is to analyze public sentiment around Kenyan politics by extracting, cleaning, and analyzing tweets related to key political figures, parties, and trending political topics. This will provide insights into public opinion, voter sentiment, and political trends in Kenya. # Twitter Sentiment Analysis on Kenyan Politics – Project Plan ## **1. Project Overview** The goal of this project is to analyze public sentiment around Kenyan politics by extracting, cleaning, and analyzing tweets related to key political figures, parties, and trending political topics. This will provide insights into public opinion, voter sentiment, and political trends in Kenya. --- ## **2. Project Objectives** * **Understand Public Sentiment:** Assess how Kenyans feel about key political figures, parties, and major political events. * **Track Political Trends:** Identify shifts in sentiment over time and during major political events (e.g., elections, rallies, scandals). * **Measure Impact of Hashtags:** Evaluate the influence of popular political hashtags like #Maandamano, #AzimioLaUmoja, #KenyaKwanza, #RutoThe5th. * **Identify Key Influencers:** Detect influential accounts driving political discussions. --- ## **3. Tools and Technologies** * **Data Collection:** Tweepy (Python), Twitter API, SNScrape (optional for bypassing API limits) * **Data Preprocessing:** Pandas, NLTK, Regular Expressions * **Sentiment Analysis:** VADER, TextBlob, BERT (Hugging Face), or a fine-tuned LLM * **Data Visualization:** Matplotlib, Seaborn, Plotly, WordCloud * **Deployment (Optional):** Streamlit or Flask for a live sentiment dashboard --- ## **4. Data Collection** ### **4.1 Twitter API Setup** * Create a Twitter Developer account and get API keys and tokens. * Set up the Tweepy library or use SNScrape for more flexibility. * Filter tweets based on: * Keywords: Ruto, Raila, Gachagua, #KenyaPolitics, #Maandamano, #RutoThe5th * Language: English and Swahili * Location: Focus on Kenya (use geo-location filters if possible) ### **4.2 Data Collection Strategy** * Use both real-time streaming (Twitter API v2) and historical search (SNScrape) for comprehensive coverage. * Capture metadata like date, retweets, likes, and user followers to assess tweet impact. * Store dat …

Visit

github.com

Tasks

sentiment analysistext classification

Languages

Swahili

Similar

MangutJ/twitter-sentiment-analysisTwitter Sentiment Analysis - Xitsongaziqubusibusiso-svg/Sentiment-Analysis-on-South-African-Twitter-DataMwangiMwaniki/Kenya-Power-Sentiment-Analysis-Model-on-the-TwitterHana14/Amharic-twitter-sentiment-analysis-AfriBERTanlubalo/president-Kenyatta-twitter-sentiment-analysis-

MangutJ/twitter-sentiment-analysis

I did a sentiment analysis of the tweets on the tweeter handle of the Covid-19 Presidential Task For

Twitter Sentiment Analysis - Xitsonga

Xitsonga Twitter Sentiment Analysis Dataset

ziqubusibusiso-svg/Sentiment-Analysis-on-South-African-Twitter-Data

Predicting Xenophobic Attacks: Sentiment Analysis on South African Twitter Data # Sentiment-Analysi

MwangiMwaniki/Kenya-Power-Sentiment-Analysis-Model-on-the-Twitter

# Kenya-Power-Sentiment-Analysis-Model-on-the-Twitter ## Defining the Question Kenya Power is the on

Hana14/Amharic-twitter-sentiment-analysis-AfriBERTa

nlubalo/president-Kenyatta-twitter-sentiment-analysis-

An analysis of Kenya's president Uhuru Kenyatta 2017 tweets using python