Giter Club home page Giter Club logo

twitterify's Introduction

TWITTERIFY

Twitterify Logo

A web platform to get quick, accurate and valuable statistical insights for real time twitter data.

Table of contents

About

  • Twitterify is a web application which provides quick accurate and valuable statistical insights on real time twitter data.
  • The application consists of three modules that focusses on analyzing trending data, threads and user profiles respectively.
  • The application aquires real time twitter data from the twitter API's. The data is processed and then analyzed before the insights are shown to the users
  • Check out the website landing page for more information: https://ssrtdevs.github.io/Twitterify-landing-page/

Why Twitterify?

  • Twitter is a popular platform where millions of tweets are posted daily to share opinions. To comprehend user opinions or trending hashtags, users have to spend a significant amount of time reading tweets.
  • The application aims to provide insightful information based on the sentiments and emotions expressed in trending Twitter data, including threads and hashtags. It can be useful for gaining a better understanding of people's opinions on current events.

Demonstration

Trending Section

  • Summaries, category and sentiments of the top trends are shown
  • Users can read a few tweets associated with a particular hashtag
  • Search Anything feature enables users to know about any hashtag or trending topic in different geographic locations

Thread Section

Thread Analysis Page

  • Displays the summary of a thread, sentiment, emtion expressed, thread lenght, replies to thread.
  • Media carousel and links of the thread are provided in different sections

User Profile Section


  • Ther sentiments in the user tweets are noted and a statistical figure of the positive and negative tweets tweeted by the user is displayed
  • User timeline is displayed
  • Word cloud is generated to showcase the most frequently used words by the user

Project Architecture

Architecture Diagram

Tech Stack

  • React JS, Flask, Daisy UI, Hugging Face ML Models, Tweepy library

Implementation Details

  • The platform uses the BART model for Abstractive Text Summarization and BERT model for Sentiment Analysis from Hugging Face
  • The Tweepy library was used to extract the required tweets using the Twitter API's.
  • The application conisted of 2 servers catering to the frontend and backend of the application.
  • The frontend server was made using React JS and made use of data processed by the Flask server at the backend.
  • The flask server soley interacted with the Twitter API's to extract data and processed it based on the corresponding requests made by the React Server at the frontend.

Performance and Analysis


Twitterify has achieved a perfect score of 100 in the Best Practices category of the Lighthouse report, indicating that the project conforms to recommended web development standards.

Achievement

  • ๐ŸŽ‰ Secured runner-up position at the Project Expo organized by our college

Steps to Download and Integrate

  • Prerequisite
    • Nodejs >= 18
    • Python >= 3.0
  1. Fork and Clone the repository on your local machine.
  2. The frontend and backend servers of the application run independently and need to be set up before starting them.
  • Setting frontend
  1. To run the react server, simply navigate to the reactfrontend directory and run npm install. Once the installation completes you just need npm start. This would start the react server on port 3000 on the localhost.
  2. The application then can be viewed on the browser on localhost:3000 and can be used by the users.
  • Setting Backend
  1. Setting the Backend could be quite a hassle.
  2. To set up the flask server, open the terminal in the flaskBackend directory and run pip install -r requirements.txt. This would install all the necessary packages for the flask server.
  • Setting the API keys
  1. You need to make .env inside flaskbackend dir and put the API keys in there. Get your API keys here.
api_key=**********
api_key_secret=***************
access_token=**********
access_token_secret=********
consumer_key=********
consumer_secret=**********
bearer_token=********
  • Setting up models: (This will be time consuming ๐Ÿ˜ข)
  1. Head over here to know about model setup
  2. To run the flask server, run flask --app server run subsequently on the terminal opened for the flask server. This would start the flask server on port 5000 on the localhost.

Project Contributors

Abhishek Sharma

Saket Thota

Shashwat Satao

Prithvi Rohira

twitterify's People

Contributors

abhi-tech-09 avatar kafka-654 avatar prithvirohira8 avatar saketthota avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

prithvirohira8

twitterify's Issues

Using chatGpt API for summarization

Our summarization model exceeds one gigabyte in size, occupying significant storage space. Utilizing the Open API for summarization would effectively eliminate the need for this bulky model and hence streamlining the process.

Trending Page API data

We need the tweets as well along with summary.

image
This is how currently the data looks like.

  • We need the tweets associated with these hashtags as well.
  • If possible try to convert sentiment parameters (pos, neg, neu) into percentages before sending them.

@SaketThota Please have a look into it.

Handle sensitive data

In api payload we get possibly_sensitive field. Which indicates whether the data is sensitive or not. We have to discard any image/video content in carousel incase its set to true.

Design issues in thread summary

  1. Image carousel should spread across the width so it can contain more images in one window instead of one.
  2. References should go below images
  3. Accordion on thread summary should be open by default. (also do we need accordion here?)

Set false to unwanted data fields

We can set false to some default data fields while calling twitter API incase we don't need them. By doing this across project we can decrease load time to a good extent

Followers Count representation

Followers count should be represented as <some_number>K or <some_number>M once it gets to thousand(s) or million(s) or more.

Current behaviour : 552826 followers
Expected behaviour : 552.8K followers

Server Caching

The data received from tweepy can be cached on the server. I'm not sure if this is the correct terminology, but instead of making the trending api call from the frontend, we can do it from the backend. Every X minutes, we'll make an API call to the server to retrieve the data and store it there. The newly received data will be displayed the next time the frontend renders.

@SaketThota @prithvirohira8

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.