Skip to content

This project provides a website that allows users to analyze real-time tweets from Twitter based on a specific hashtag. The website includes a tweet sentiment analyzer to determine the sentiment (positive, negative, or neutral) of the collected tweets.

Notifications You must be signed in to change notification settings

shaadclt/Twitter-Hashtag-Analysis

Repository files navigation

Real-time Twitter Hashtag Analysis and Sentiment Analyzer

image

image

This project provides a website that allows users to analyze real-time tweets from Twitter based on a specific hashtag. The website includes a tweet sentiment analyzer to determine the sentiment (positive, negative, or neutral) of the collected tweets. Data collection is performed using Snscrape, data cleaning and transformation are done using NumPy and Pandas, data preprocessing utilizes NLTK, sentiment analysis is performed using Textblob, and the application is deployed and hosted on an AWS EC2 instance. The backend is implemented using Django.

Table of Contents

Introduction

The Real-time Twitter Hashtag Analysis and Sentiment Analyzer website aims to provide users with a platform to analyze real-time tweets from Twitter based on a specific hashtag. The backend, implemented using Django, handles data collection, cleaning, preprocessing, sentiment analysis, and serves the data to the frontend for visualization and user interaction. The website is deployed and hosted on an AWS EC2 instance for easy access and scalability.

Features

The Real-time Twitter Hashtag Analysis and Sentiment Analyzer website offers the following features:

  • Hashtag Selection: Users can input a specific hashtag to analyze tweets related to that hashtag in real-time.
  • Data Collection: The backend uses Snscrape to collect real-time tweet data based on the selected hashtag.
  • Data Cleaning and Transformation: NumPy and Pandas are utilized to clean and transform the collected tweet data into a suitable format for analysis.
  • Data Preprocessing: NLTK (Natural Language Toolkit) is used to preprocess the tweet text data, including tokenization, stopword removal, and stemming.
  • Sentiment Analysis: The backend employs Textblob, a Python library, to perform sentiment analysis on the preprocessed tweet data, determining the sentiment (positive, negative, or neutral) of each tweet.
  • Interactive Visualizations: The website generates interactive visualizations, such as word clouds or sentiment distribution charts, to present the analyzed tweet data.
  • User-friendly Interface: The frontend provides a user-friendly interface for users to input hashtags, view analysis results, and interact with the visualizations.
  • Deployment on AWS EC2: The website is deployed and hosted on an AWS EC2 instance, providing easy access and scalability.

Setup

To use this project locally, follow these steps:

  1. Clone the repository:
git clone https://github.com/shaadclt/Twitter-Hashtag-Analysis.git
  1. Install the required dependencies by running:
pip install -r requirements.txt
  1. Set up an AWS EC2 instance to deploy the application. Make sure to configure the necessary security groups, networking, and storage according to your requirements.

  2. Update the necessary configurations in the project files, including Twitter API credentials, AWS EC2 instance details, Django settings, and any other relevant settings.

Usage

To use the Real-time Twitter Hashtag Analysis and Sentiment Analyzer website, follow these steps:

  1. Start the Django development server using the provided command:
python manage.py runserver
  1. Access the website by opening the provided URL in your web browser.

  2. Enter the desired hashtag in the input field to start analyzing real-time tweets related to that hashtag.

  3. Explore the visualizations and sentiment analysis results displayed on the website.

  4. Customize the application as needed by modifying the code, adding more visualizations, or incorporating additional analysis techniques.

  5. Monitor the AWS EC2 instance

About

This project provides a website that allows users to analyze real-time tweets from Twitter based on a specific hashtag. The website includes a tweet sentiment analyzer to determine the sentiment (positive, negative, or neutral) of the collected tweets.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published