Predicting the Outcome of Spanish General Elections 2016 Using Twitter as a Tool

  • Prabhsimran SinghEmail author
  • Ravinder Singh Sawhney
  • Karanjeet Singh Kahlon
Conference paper
Part of the Communications in Computer and Information Science book series (CCIS, volume 712)


In recent years, twitter has become a popular micro blogging tool among the people world over. These persons post small messages depicting their likes and dislike towards a certain entity e.g. election results. These messages can be used to predict their opinion towards a political party in general or an individual candidate in particular. This paper takes into consideration numerous tweets related data towards the context of 2016 Spanish General Elections. Next, we have tried to establish a relationship between the tweets gathered during the campaigning period and actual vote share that various political parties received in 2016 Spanish General Elections. We have developed a tool in ASP.Net and collected 90154 tweets from 6th June to 26th June 2016 and computed our results based on these tweets. Finally, we compared our computations to establish a close co-relation with the actual results. The factors those may have caused small variance, are minutely investigated upon to give us better insight so as elucidate even closer predictions for future events.


Twitter Tweet Opinion mining Sentiment analysis Election prediction 


  1. 1.
  2. 2.
    Liu, B.: Sentiment analysis and opinion mining. Synth. Lect. Hum. Lang. Technol. 5(1), 1–167 (2012). doi: 10.2200/S00416ED1V01Y201204HLT016 MathSciNetCrossRefGoogle Scholar
  3. 3.
    Spanish General Elections Results December (2015).
  4. 4.
  5. 5.
  6. 6.
  7. 7.
    Tumasjan, A., Sprenger, T.O., Sandner, P.G., Welpe, I.M.: Predicting elections with twitter: what 140 characters reveal about political sentiment. In: ICWSM 10, pp. 178–185 (2010)Google Scholar
  8. 8.
    Choy, M., Cheong, M.L.F., Laik, M.N., Shung, K.P.: A sentiment analysis of Singapore Presidential Election 2011 using Twitter data with census correction. arXiv preprint arXiv:1108.5520 (2011)
  9. 9.
    Nooralahzadeh, F., Arunachalam, V., Chiru, C.: 2012 presidential elections on Twitter–an analysis of how the US and French Election were reflected in tweets. In: 2013 19th International Conference on Control Systems and Computer Science (CSCS), pp. 240–246. IEEE (2013). doi: 10.1109/CSCS.2013.72
  10. 10.
    Prasetyo, N.D., Hauff, C.: Twitter-based Election Prediction in the developing world. In: Proceedings of the 26th ACM Conference on Hypertext & Social Media, pp. 149–158. ACM (2015)Google Scholar
  11. 11.
    Khatua, A., Khatua, A., Ghosh, K., Chaki, N.: Can# Twitter_Trends predict election results? Evidence from 2014 Indian General Election. In: 2015 48th Hawaii International Conference on System Sciences (HICSS), pp. 1676–1685. IEEE (2015) doi: 10.1109/HICSS.2015.202
  12. 12.
    Burnap, P., Gibson, R., Sloan, L., Southern, R., Williams, M.: 140 characters to victory?: using Twitter to predict the UK 2015 General Election. Electoral Stud. (2015). doi: 10.1016/j.electstud.2015.11.017
  13. 13.
    Srivastava, R., Kumar, H., Bhatia, M.P. Jain, S.: Analyzing Delhi Assembly Election 2015 using textual content of social network. In: Proceedings of the Sixth International Conference on Computer and Communication Technology 2015, pp. 78–85. ACM (2015). doi: 10.1145/2818567.2818582
  14. 14.
  15. 15.
  16. 16.
    Spanish General Election Results, June 2016.
  17. 17.
    Gaurav, M., Srivastava, A., Kumar, A., Miller, S.: Leveraging candidate popularity on Twitter to predict election outcome. In: Proceedings of the 7th Workshop on Social Network Mining and Analysis, p. 7. ACM (2013). doi: 10.1145/2501025.2501038

Copyright information

© Springer Nature Singapore Pte Ltd. 2017

Authors and Affiliations

  • Prabhsimran Singh
    • 1
    • 3
    Email author
  • Ravinder Singh Sawhney
    • 2
    • 3
  • Karanjeet Singh Kahlon
    • 1
    • 3
  1. 1.Department of Computer ScienceGuru Nanak Dev UniversityAmritsarIndia
  2. 2.Department of Electronics TechnologyGuru Nanak Dev UniversityAmritsarIndia
  3. 3.Guru Nanak Dev UniversityAmritsarIndia

Personalised recommendations