Skip to main content

Using Twitter Data to Monitor Political Campaigns and Predict Election Results

  • Conference paper
  • First Online:
Book cover Trends in Cyber-Physical Multi-Agent Systems. The PAAMS Collection - 15th International Conference, PAAMS 2017 (PAAMS 2017)

Part of the book series: Advances in Intelligent Systems and Computing ((AISC,volume 619))

Abstract

In recent years social networks have increasingly been used to study political opinion formation, monitor electoral campaigns and predict electoral outcomes as they are able to generate huge amount of data, usually in textual and non structured form. In this paper we aim at collecting and analysing data from Twitter posts identifying emerging patterns of topics related to a constitutional referendum that recently took place in Italy to better understand and nowcast its outcome. Using the Twitter API we collect tweets expressing voting intentions in the four weeks before the elections obtaining a database of approximately one million tweets. We restrict the data collection to tweets that contain hashtags referring to the referendum, therefore we are sure to include in the analysis only relevant text. On this huge volume of data, we perform a topic modelling analysis using a Latent Dirichelet Allocation model (LDA) to extract frequent topics and keywords. Analysing the behaviour of frequent words we find that connected to voting in favour of the constitutional reform there are positive words such as future and change while connected to voting against it there are words such ad fear and risk.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 129.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 169.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    We collected this information using the Twitter API trough the R package twitteR. The R package used is available at the following link: https://cran.r-project.org/web/packages/twitteR/index.html.

References

  • Bermingham, A., Smeaton, A.F.: On using twitter to monitor political sentiment and predict election results (2011)

    Google Scholar 

  • Blei, D.M., Lafferty, J.D.: Topic models. Text Mining Classif. Clustering Appl. 10(71), 34 (2009)

    MathSciNet  Google Scholar 

  • Blei, D.M., Ng, A.Y., Jordan, M.I.: Latent dirichlet allocation. J. Mach. Learn. Res. 3, 993–1022 (2003)

    MATH  Google Scholar 

  • Ceron, A., Curini, L., Iacus, S.: Using social media to fore-cast electoral results: a review of state-of-the-art. Ital. J. Appl. Stat. 25(3), 237–259 (2015)

    Google Scholar 

  • Deerwester, S., Dumais, S.T., Furnas, G.W., Landauer, T.K., Harshman, R.: Indexing by latent semantic analysis. J. Am. Soc. Inform. Sci. 41(6), 391 (1990)

    Article  Google Scholar 

  • Diakopoulos, N.A., Shamma, D.A.: Characterizing debate performance via aggregated twitter sentiment. In: Proceedings of the SIGCHI Conference on Human Factors in Computing Systems, pp. 1195–1198. ACM (2010)

    Google Scholar 

  • Gloor, P.A., Krauss, J., Nann, S., Fischbach, K., Schoder, D.: Web science 2.0: Identifying trends through semantic social network analysis. In: International Conference on Computational Science and Engineering, CSE 2009, vol. 4, pp. 215–222. IEEE (2009)

    Google Scholar 

  • Hornik, K., Grün, B.: topicmodels: an r package for fitting topic models. J. Stat. Softw. 40(13), 1–30 (2011)

    Google Scholar 

  • Nigam, K., McCallum, A.K., Thrun, S., Mitchell, T.: Text classification from labeled and unlabeled documents using em. Mach. Learn. 39(2–3), 103–134 (2000)

    Article  MATH  Google Scholar 

  • Ribeiro Soriano, D., Garrigos-Simon, F.J., Lapiedra Alcamí, R., Barberá Ribera, T.: Social networks and web 3.0: their impact on the management and marketing of organizations. Manag. Decis. 50(10), 1880–1890 (2012)

    Google Scholar 

  • Steyvers, M., Griffiths, T.: Probabilistic topic models. Handb. Latent Semant. Anal. 427(7), 424–440 (2007)

    Google Scholar 

  • Tumasjan, A., Sprenger, T.O., Sandner, P.G., Welpe, I.M.: Predicting elections with twitter: what 140 characters reveal about political sentiment. In: ICWSM, vol. 10(1), pp. 178–185 (2010)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Shira Fano .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer International Publishing AG

About this paper

Cite this paper

Fano, S., Slanzi, D. (2018). Using Twitter Data to Monitor Political Campaigns and Predict Election Results. In: De la Prieta, F., et al. Trends in Cyber-Physical Multi-Agent Systems. The PAAMS Collection - 15th International Conference, PAAMS 2017. PAAMS 2017. Advances in Intelligent Systems and Computing, vol 619. Springer, Cham. https://doi.org/10.1007/978-3-319-61578-3_19

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-61578-3_19

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-61577-6

  • Online ISBN: 978-3-319-61578-3

  • eBook Packages: EngineeringEngineering (R0)

Publish with us

Policies and ethics