Prediction of Election Result based on Twitter Data


Objective: –

The goal of this project is to build a predictive model to predict the outcomes of election before the elections were held.

Prediction of Election Result based on Twitter Data

Abstract: –

Democracy is a form of government in which citizens elect their own leaders. Elections are held on a regular basis in our country, India, to elect a political leader. People nowadays prefer to know who will win an election ahead of time. They make predictions based on the news, personal conversations, and online platforms. Facebook, Twitter, and WhatsApp have all become popular in recent years. These social networking services are accessible to everyone with an internet connection.

The opinions, news, and discussions available on these platforms aid in the prediction of results. These are the places where one can express oneself on the internet. Twitter is one such network that becomes popular in our country following major events. On Twitter, anything that is news becomes a trend. People express their opinions, their anger, and their campaigns against any political party, figure, or leader. Predicting election results before exit polls is quite useful. As a result, this study examines tweets gathered from Twitter and uses emotional analysis to forecast election outcomes.

Introduction: –

Sentimental Analysis is a technique for teaching a computer to extract emotion from the text. A text can be anything, whether a basic review, a social statement, tweets, or text messages. On digital platforms, a substantial amount of high-value and diverse social data has been accumulated. This large amount of social data might be computationally processed and analyzed to learn about people’s preferences and affinities with any subject.

When people’s opinions on social media platforms are processed and analyzed, they can be utilized to forecast outcomes that are valuable in business and other areas of life.

Existing Model of System: –

There has been a lot of study on utilising machine learning models for emotive analysis to forecast election results. For predicting election results in diverse places around the world, researchers have utilised everything from rudimentary machine learning models to advanced deep learning algorithms. Studies on election prediction have been conducted since the early 2000s, and numerous methodologies and researches have been proposed. The popularity of tweets was used to forecast the outcome of the 2017 French elections. Their model, however, was only relevant to tweets in French. further explained how a multiclass classification on two political groups or parties can be done on tweets connected to them and compared to determine a winner. I worked on Twitter trends connected to the president’s performance. He employed a lexicon-based methodology to extract strong sentiments from Twitter data linked to elections and used a date-time series method to forecast the final outcome.

Using a sentiment analyser, we categorised tweets and stored them in MongoDB. Rather than focusing on certain parties, the writers used tweets from all of the candidates in the election.

This study examines the 2019 Indian Lok Sabha election and converts the problem of unsupervised learning to supervised learning using a Python tool called VADER, as well as various machine learning models and two feature extraction strategies. Prediction of Election Result based on Twitter Data

Proposed Model of System: –

The main approach of this paper is to convert an unsupervised problem to a supervised learning problem and then perform sentimental analysis on the data followed by visualization and prediction of results.

  1. Dataset Collection and Cleaning
  2. Splitting of dataset and Applying VADER
  • Model Training
  1. Logistic Regression
  2. Decision Tree
  • Naive-Bayes
  1. LinearSVC
  2. XGBoost
  1. XGBoost

    Prediction of Election Result based on Twitter Data abstract
    Prediction of Election Result based on Twitter Data abstract

System Requirements: –

  • Hardware

OS ? Windows 7, 8 and 10 (32 and 64 bit)


  • Software:


Anaconda navigator

Python built-in modules

Customer Reviews

There are no reviews yet.

Be the first to review “Prediction of Election Result based on Twitter Data”

This site uses Akismet to reduce spam. Learn how your comment data is processed.