Skip to main content
Log in

Application of Twitter sentiment analysis in election prediction: a case study of 2019 Indian general election

  • Original Article
  • Published:
Social Network Analysis and Mining Aims and scope Submit manuscript

A Correction to this article was published on 12 June 2023

This article has been updated

Abstract

Everyone must have experienced a huge collection of political content on their social media account’s home page during election time. Most of the users are busy in liking, sharing, and commenting political posts on the social media platform at that time, and these user activities show their attitude or behaviour towards the electoral or the political party. This study has mined the collective behaviour of Twitter users towards the Indian General election 2019. This work performed weekly sentiment analysis of massive Twitter content related to electoral and political parties during election time using a lexicon-based sentiment analysis approach. Based on this empirical study, the aim is to find out the feasibility of election prediction through social media analysis in a developing country like India. Further, an explorative analysis has been performed on the collected data, which gives answers to some dominant research hypotheses formulated in this paper. This paper shows how public mood can be gauged from social media content during the election period and how it can be considered as a parameter to predict the election results along with other factors. In addition, results evaluation has been done based on mean absolute error by considering the vote share and seat share of competing parties and leaders in the election. The predicted result of this work has been compared with exit poll results from various news agencies and the actual election result. It was found that our result of election prediction is quite similar to the final election results.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16

Similar content being viewed by others

Data availability

The dataset analysed during the current study is available from the corresponding author on reasonable request.

Change history

Notes

  1. RCP is a website (https://www.realclearpolitics.com/) that predicts election results by calculating the average of many popular media and survey institutes.

References

Download references

Funding

No funding was received for conducting this study.

Author information

Authors and Affiliations

Authors

Contributions

All authors contributed to the study conception and design. Material preparation, data collection and analysis were performed by PC. The first draft of the manuscript was written by PC and all authors commented on previous versions of the manuscript. All authors read and approved the final manuscript.

Corresponding author

Correspondence to Priyavrat Chauhan.

Ethics declarations

Conflict of interest

The authors have no competing interests to declare that are relevant to the content of this article.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

The original article is revised to update Equation 7 and some missed out corrections.

Appendices

Appendix A: Major alliance of Indian political parties

Alliance

Supporting parties

NDA(Sharma 2019b)

Bhartiya Janta Party (BJP), All India Anna Dravida Munnetra Kazhgam (AIADMK), Janta Dal United (JDU), Shiv Sena (SHS), Shiromani Akali Dal (SAD), Pattali Makkal Katchi (PMK), Lok Janshakti Party (LJP), Desiya Murpokku Dravida Kazhagam (DMDK), Bharath Dharma Jana Sena (BDJS), Asom Gana Parishad (AGP), Apna Dal, All Jharkhand Students Union (AJSU), Puthiya Tamilagam (PT), Tamil Maanila Congress (TMC), Puthiya Needhi Katchi (PNK), All India N.R. Congress (AINRC), Bodoland People’s Front (BPF), Nationalist Democratic Progressive Party (NDPP), Kerala Congress Thomas (KCT), Rashtriya Loktantrik Party (RLP) and one independent candidate

UPA(Sharma 2019c)

Indian National Congress (INC), National Congress Party (NCP), Dravida Munnetra Kazhagam (DMK), Rashtriya Janta Dal (RJD), Rashtriya Lok Samta Party (RLSP), Jharkhand Mukti Morcha (JMM), Hindustani Awam Morcha (HAM), Vikassheel Insaan Party (VIP), Communist Party of India (CPI), Indian Union Muslim League (IUML), Jan Adhikar Party (JAP), Viduthalai Chiruthaigal Katchi (VCK), Jharkhand Vikas Morcha (JVM), Swabhimani Paksha, Bahujan Vikas aaghadi, Communist Party of India (CPI), Kerala Congress Mani (KCM), Revolutionary Socialist Party (RSP), Kongunadu Makkal Desia Katchi (KMDK), Indhiya Jananayaga Katchi (IJK), Marumalarchi Dravida Munnetra Kezhagam (MDMK), Jammu & Kashmir National Conference and three other independent candidate

The Grand alliance (Mahagathbandhan) (The Hindu 2019b)

Smajwadi Party (SP), Bahujan Samajwadi Party (BSP), Rashtriya Lok Dal (RLD), Loktantra Suraksha Party, Punjab Ekta Party, Lok Insaaf Party, Punjab Front, Communist Party of India, Revolutionary Marxist Party of India, Janta Congress Chattisgarh, Gondwana Ganatantra Party, Jana Sena Party

Federal Front (Karthikeyan 2019)

All India Trinamool Congress (AITMC), Telugu Desam Party (TDP), Rashtriya Lok Dal (RLD), Gorkha National Liberation (GNLF), Loktantrik Janata Dal (LJD)

Appendix B: Hashtags used during week-wise data collection

Week

Hashtags

Week 1 (Feb 1–7)

#BJP, #Budget2019, #LoksabhaElection2019, #Mahagathbandhan, #MamataBanerjee, #Modi, #RahulGandhi, #SurgicalStrike, #MamataVsCBI, #NarendraModi, #MamataFreeBengal

Week 2 (Feb 8–14)

#BJP, #BudgetSession2019, #GoBackModi, #Congress, #FraudCongress, #UPAera, #LoksabhaElection2019, #Mahagathbandhan, #Modi, #PriyankaGandhi, #RahulGandhi, #SurgicalStrike, #MerePyarePM, #MODIfiedCities, #MulayamWithModi, #SamarpanDiwas, #SouthIndiaForNaMo, #UttrakhandThanksModi, #NayiUmeedNayaDesh, #PriyankaUPRoadshow, #ComeAgainModiJi, #MiddlemanModi, #Modi4NewIndia, #ModiInsulted, #NarendraModi

Week 3 (Feb 15–21)

#BJP, #BudgetSession2019, #MerePyarePM, #JharkhandWithModi, #SuccessOfMakeInIndia, #DMKCongressAlliance, #FraudCongress, #LoksabhaElection2019, #Mahagathbandhan, #Modi, #ModiInsulted, #NarendraModi, #NaMoAgain2019, #NoMo, #NayiUmeedNayaDesh, #RahulGandhi, #ModiPunishesPak, #NoWaterForPakistan, #ShivSena, #SurgicalStrike

Week 4 (Feb 22–28)

#BJP, #BudgetSession2019, #BJPForSamridhKisan, #MerePyarePM, #NamumkinAbMumkinHai, #VijaySankalpWithModi, #DMKCongressAlliance, #FraudCongress, #NayiUmeedNayaDesh, #PakPremiCongress, #LoksabhaElection2019, #Mahagathbandhan, #Modi, #ModiInsulted, #ModiPunishesPak, #NarendraModi, #NaMoAgain2019, #NoMo, #RahulGandhi, #ModiPunishesPak, #NoWaterForPakistan, #ShivSena, #AirSurgicalStrikes, #SalutetoIndianAirForce, #SurgicalStrike

Week 5 (March 1–7)

#BJPMP, #BJP, #DefenceMinistry, #BudgetSession2019, #BJPForSamridhKisan, #MerePyarePM, #NamumkinAbMumkinHai, #VijaySankalpWithModi, #DMKCongressAlliance, #FraudCongress, #NayiUmeedNayaDesh, #AndhraThanksModi #PakPremiCongress, #LoksabhaElection2019, #Mahagathbandhan, #Modi, #ModiInsulted, #ModiPunishesPak, #NarendraModi, #NaMoAgain2019, #NoMo, #RahulGandhi, #ModiPunishesPak, #NoWaterForPakistan, #ShivSena, #AirSurgicalStrikes, #SalutetoIndianAirForce, #SurgicalStrike, #GoBackSadistModi, #MerePyarePM, #WhyTheyHateModi #ModiInKumbh, #PMKoChitthi, #TNTrustsModi, #TNWelcomesModi, #RafaleDeal

Week 6 (March 8–14)

#BJPMP, #BJP, #DefenceMinistry, #BudgetSession2019, #BJPForSamridhKisan, #MaharashtraMODIfied, #MerePyarePM, #NamumkinAbMumkinHai, #CongressCollapse, #VijaySankalpWithModi, #DMKCongressAlliance, #FraudCongress, #NayiUmeedNayaDesh, #CongressHelpingBJP, #Modi2019Wave, #AndhraThanksModi, #ModiInKumbh, #ModiCorruptionYaadRakhna #PakPremiCongress, #LoksabhaElection2019, #Mahagathbandhan, #Modi, #ModiInsulted, #ModiPunishesPak, #NarendraModi, #NaMoAgain2019, #NoMo, #RahulGandhi, #ModiPunishesPak, #NoWaterForPakistan, #ShivSena, #SalutetoIndianAirForce, #SurgicalStrike, #GoBackSadistModi, #MerePyarePM, #WhyTheyHateModi #ModiInKumbh, #PMKoChitthi, #TNWelcomesModi, #PriyankaGandhi

Week 7 (March 15–21)

#BJPMP, #BJP, #DefenceMinistry, #BudgetSession2019, #BJPForSamridhKisan, #MaharashtraMODIfied, #MainBhiChowkidar #MerePyarePM, #NamumkinAbMumkinHai, #iTrustChowkidar, #CongressCollapse, #GandhiMarchesOn #VijaySankalpWithModi, #DMKCongressAlliance, #FraudCongress, #NayiUmeedNayaDesh, #CongressHelpingBJP, #Modi2019Wave, #AndhraThanksModi, #ModiInKumbh, #ModiCorruptionYaadRakhna, #PakPremiCongress, #LoksabhaElection2019, #Mahagathbandhan, #Modi, #ModiInsulted, #ModiPunishesPak, #NarendraModi, #NiravArrested, #PMKoChitthi, #TNWelcomesModi, #NaMoAgain2019, #NoMo, #RahulGandhi, #ModiPunishesPak, #NoWaterForPakistan, #ShivSena, #SurgicalStrike, #GoBackSadistModi, #MerePyarePM, #WhyTheyHateModi #ModiInKumbh, #PriyankaGandhi

Week 8 (March 22–28)

#BJPMP, #BJP, #DefenceMinistry, #BJPForSamridhKisan, #MaharashtraMODIfied, #MainBhiChowkidar, #NamumkinAbMumkinHai, #iTrustChowkidar, #CongressCollapse, #GandhiMarchesOn, #DMKCongressAlliance, #FraudCongress, #NayiUmeedNayaDesh, #CongressHelpingBJP, #Modi2019Wave, #ModiCorruptionYaadRakhna #PakPremiCongress, #LoksabhaElection2019, #Mahagathbandhan, #Modi, #ModiInsulted, #ModiPunishesPak, #NarendraModi, #NiravArrested, #PMKoChitthi, #TNWelcomesModi, #NaMoAgain2019, #NoMo, #RahulGandhi, #ModiPunishesPak, #NoWaterForPakistan, #ShivSena, #GoBackSadistModi, #PriyankaGandhi, #SurgicalStrike

Week 9 (March 29–April 4)

#BJPMP, #BJP, #DefenceMinistry, #BJPForSamridhKisan, #MaharashtraMODIfied, #BharatBoleModiModi, #MainBhiChowkidar, #NamumkinAbMumkinHai, #iTrustChowkidar, #CongressCollapse, #GandhiMarchesOn, #DMKCongressAlliance, #FraudCongress, #NayiUmeedNayaDesh, #CongressHelpingBJP, #Modi2019Wave, #ModiMatBanao, #ModiCorruptionYaadRakhna, #CongVsNationalInterest, #PappuDiwas, #PakPremiCongress, #LoksabhaElection2019, #Mahagathbandhan, #Modi, #ModiInsulted, #NarendraModi, #NaMoAgain2019, #NoMo, #RahulGandhi, #ModiPunishesPak, #ShivSena, #GoBackSadistModi, #PriyankaGandhi, #SurgicalStrike

Week 10 (April 5–10)

#AugustaWestlandScam, #BJPMP, #BJP, #DefenceMinistry, #BJPManifesto, #BharatBoleModiModi, #MainBhiChowkidar, #NamumkinAbMumkinHai, #iTrustChowkidar, #CongressCollapse, #GandhiMarchesOn, #DMKCongressAlliance, #FraudCongress, #NayiUmeedNayaDesh, #CongressHelpingBJP, #Modi2019Wave, #ModiMatBanao, #AbHogaNYAY, #ModiCorruptionYaadRakhna, #CongVsNationalInterest, #IsBaarPhirModi, #PappuDiwas, #PakPremiCongress, #LoksabhaElection2019, #PMModiOnABP, #Mahagathbandhan, #Modi, #NarendraModi, #NaMoAgain2019, #NoMo, #RahulGandhi, #ShivSena, #PriyankaGandhi, #SurgicalStrike

Week 11 (April 11–17)

#BJPManifesto, #Vote4BJP, #VoteForIndia, #VoteKar, #BJP, #CongressManifesto, #MyVoteForCongress, #IndiaElections2019, #IndiaBoleModiDobara, #ModiHiAayega, #LoksabhaElection2019, #Mahagathbandhan, #Modi, #NarendraModi, #NaMoAgain2019, #NoMo, #RahulGandhi, #JanaNayakanRahulGandhi, #ShivSena, #PriyankaGandhi

Week 12 (April 18–24)

#BJPManifesto, #Vote4BJP, #VoteForIndia, #VoteKar, #VoteMaaDi, #BJP, #VoteForNewIndia, #CongressManifesto, #MyVoteForCongress, #VoteForChange, #IndiaElections2019, #BharatMangeModiDobara, #ModiHiAayega, #ModiWithAkshay, #RemovingModi, #EveryVoteForModi, #IndiaBoleModiDobara, #AayegaToModiHi, #LoksabhaElection2019, #Mahagathbandhan, #Modi, #NarendraModi, #NaMoAgain2019, #NoMo, #RahulGandhi, #JanaNayakanRahulGandhi

Week 13 (April 25–May 1)

#BJP, #IndiaBoleNaMoPhirSe, #KashiBoleNaMoNaMo, #VoteForNewIndia, #HogiCongressKiJeet, #AayegaToModiHi, #BharatMangeModiDobara, #EveryVoteForModi, #FekuModi, #Modi, #ModiWithAkshay, #RemovingModi, #NaMoAgain2019, #NoMo, #RahulGandhi

Week 14 (May 2–8)

#BJP, #IndiaBoleNaMoPhirSe, #JaiShreeRam, #KashiBoleNaMoNaMo, #VoteForNewIndia, #AayegaToModiHi, #BharatKaGarvModi, #BharatMangeModiDobara, #EveryVoteForModi, #FekuModi, #Modi, #JawanVirodhiModi, #ModiMeinHaiDum, #ModiWithAkshay, #RemovingModi, #ShameOnPMModi, #NaMoAgain2019, #NoMo, #RahulGandhi

Week 15 (May 9–15)

#BengalWithBJP, #BJP, #JaiShreeRam, #CloudyModi, #DeshKiShaanModi, #Modi, #SabseBadaJhootaModi, #ShameOnPMModi, #RahulBadlegaIndia, #NaMoAgain2019, #NoMo, #RahulGandhi

Week 16 May (16–19)

#BengalWithBJP, #BJP, #JaiShreeRam, #ExitPoll2019, #CloudyModi, #DeshKiShaanModi, #Modi, #SabseBadaJhootaModi, #ShameOnPMModi, #RahulBadlegaIndia, #NaMoAgain2019, #NoMo, #RahulGandhi

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Chauhan, P., Sharma, N. & Sikka, G. Application of Twitter sentiment analysis in election prediction: a case study of 2019 Indian general election. Soc. Netw. Anal. Min. 13, 88 (2023). https://doi.org/10.1007/s13278-023-01087-8

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s13278-023-01087-8

Keywords

Navigation