Overview
This project analyzes global Twitter conversations around the UN’s Sustainable Development Goal 2 (Zero Hunger) using Natural Language Processing (NLP). With data from 2019–2024, it leverages techniques like n-gram analysis, sentiment tracking, topic modeling, and emotion detection to uncover what the world is saying and feeling about food security, sustainability, and hunger. This project was made a student team, led by me, named "rookie.ai"
Tools and Technologies
Languages/Frameworks: Python, Hugging Face Transformers
Libraries: pandas, matplotlib, nltk, gensim, scikit-learn
Techniques:
N-Grams (Unigrams, Bigrams, Trigrams)
Time Series Tweet Count Analysis
Sentiment Over Time
LDA Topic Modeling
Emotion Detection using Hugging Face (T5 fine-tuned model)
Part 1: N-Gram Analysis - What the World Talks About
By analyzing unigrams, bigrams, and trigrams, we identified recurring keywords and themes.
Highlights:
Frequent mentions: "food security", "malnutrition", "sustainable agriculture"
These phrases reflect urgent global focus areas: not just hunger, but how climate change and agriculture impact it.
Strategic Insight:
These findings reveal a global framing of hunger as a systemic issue, with intertwined environmental and economic implications.
Recommendations:
• Give Sustainable Agriculture priority. The regular debates between sustainability and agriculture point that governments should give sustainable agricultural techniques top priority.
• Governments could undertake awareness campaigns using the increased public interest in food security, therefore promoting more sustainable agricultural methods and consumption. Policies should stress the long-term advantages of sustainable food systems to help to solve hunger.
• Highlighting the worldwide character of food insecurity, international organizations should leverage the findings of N-grams analysis to customize their activities. To help to reduce poverty and advance food equality, they should support measures enhancing world cooperation.
Part 2: Tweet Count Over Time – When People Speak Up
We tracked tweet volume from 2019 to 2024, with drill-down into daily activity for July 2024, aligning with the UN High-Level Political Forum.
Key Findings:
Sharp spike in mid-July 2024, clearly showing that major international events spark global engagement on Twitter.
Activity around food security discussions mirrors the event calendar of global summits, policy launches, and public crises.
Strategic Insight:
Governments and NGOs can time campaigns, awareness drives, and announcements to align with global forums for maximum reach.
Part 3: Sentiment Over Time – How People Feel About Hunger
We tracked tweet volume from 2019 to 2024, with drill-down into daily activity for July 2024, aligning with the UN High-Level Political Forum.
Key Findings:
Sharp spike in mid-July 2024, clearly showing that major international events spark global engagement on Twitter.
Activity around food security discussions mirrors the event calendar of global summits, policy launches, and public crises.
Strategic Insight:
Governments and NGOs can time campaigns, awareness drives, and announcements to align with global forums for maximum reach.
Part 4: LDA Topic Modeling – Discovering What’s Trending
We used Latent Dirichlet Allocation (LDA) to find underlying discussion themes across the dataset.
Discovered Topics:
Sustainable Agriculture & Food Security
Malnutrition & Global Hunger
Climate Impact on Food Systems
Policy Change & Global Alliances
Strategic Insight:
Hunger is not discussed in isolation — it’s intertwined with climate change, economic stability, and global cooperation.
Highlights a need for integrated policy solutions.
Part 5: Emotion Detection – What Emotions Drive These Conversations
Using Hugging Face’s T5-base fine-tuned emotion model, we categorized tweets into:
Joy, Sadness, Anger, Fear, Love, Surprise
Findings:
Joy dominated — often tied to campaigns, celebrations, or project launches
Sadness & Fear appeared around food scarcity, famine, or policy failure
Anger indicated public dissatisfaction with the political or social handling of hunger
Strategic Insight:
Emotional resonance can be leveraged in communication campaigns.
Joyful messaging and success stories amplify engagement, while fear/sadness highlights urgent needs for action and empathy.