Skip to content

itsfarhan/LiveLocationTweets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛰️ TweetSentinel

Map the World's Sentiment in Real-Time.

TweetSentinel is a tool that analyzes the collective mood of the planet. By harnessing the power of the Twitter API and TextBlob AI, it scrapes geolocated tweets, scores their sentiment, and plots them on an interactive, high-fidelity world map.

TweetSentinel Homepage

✨ Features

  • 🧠 AI-Powered Sentiment Analysis: Leverages TextBlob to classify tweets into Positive, Neutral, or Negative.
  • 📍 Precision Geo-Mapping: Plots tweets based on precise GPS coordinates or user-profile locations.
  • Real-Time Visualization: Watch public opinion light up across the globe as data is fetched.

🛠️ Tech Stack

  • Backend: Python, Flask
  • Analysis: TextBlob (Natural Language Processing)
  • Mapping: Folium, Leaflet.js, CartoDB Dark Matter
  • API: Tweepy (X/Twitter API)
  • Frontend: Vanilla HTML5, CSS3, ES6 Javascript

🚀 Getting Started

1. Prerequisites

Ensure you have Python 3.12+ installed.

2. Installation

Clone the repository and set up a virtual environment:

# Create virtual environment
python3 -m venv .venv

# Activate (bash/zsh)
source .venv/bin/activate

# Install dependencies
pip install flask textblob folium tweepy geocoder

3. Configuration

Open app.py and insert your Twitter/X API credentials:

CONSUMER_KEY        = 'YOUR_KEY'
CONSUMER_SECRET     = 'YOUR_SECRET'
ACCESS_TOKEN        = 'YOUR_TOKEN'
ACCESS_TOKEN_SECRET = 'YOUR_TOKEN_SECRET'

4. Launch

python app.py

Visit http://localhost:5000 to start mapping.

📸 Interface Preview

Map Result Screen

⚖️ Sentiment Scoring

The map uses a clear color-coded system to represent public mood:

  • 🟢 Green: Positive sentiment
  • Gray: Neutral / Objective information
  • 🔴 Red: Negative sentiment

Designed & Developed by Farhan Ahmed

About

Explore Twitter sentiment analysis and real-time tracking. Utilize TextBlob for sentiment analysis, categorizing tweets as positive, negative, or neutral. Geolocate and visualize tweets on an interactive map using Folium. Stream live tweets based on user-defined keywords. Easy-to-use Flask interface.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors