Exploring the political pulse of a country using data science tools

Journal of Computational Social Science - Tập 5 - Trang 987-1000 - 2022
Miguel G. Folgado1, Veronica Sanz1,2
1Instituto de Física Corpuscular (IFIC), Universidad de Valencia-CSIC, Valencia, Spain
2Department of Physics and Astronomy, University of Sussex, Brighton, UK

Tóm tắt

In this paper we illustrate the use of Data Science techniques to analyse complex human communication. In particular, we consider tweets from leaders of political parties as a dynamical proxy to political programmes and ideas. We also study the temporal evolution of their contents as a reaction to specific events. We analyse levels of positive and negative sentiment in the tweets using new tools adapted to social media. We also train a Fully-Connected Neural Network (FCNN) to recognise the political affiliation of a tweet. The FCNN is able to predict the origin of the tweet with a precision in the range of 71–75%, and the political leaning (left or right) with a precision of around 90%. This study is meant to be viewed as an example of how to use Twitter data and different types of Data Science tools for a political analysis.

Tài liệu tham khảo

The INE webpage provides historical data on employment. https://www.ine.es. Accessed 20 Nov 2020. Governmental page with electoral results from 1976: http://www.infoelectoral.mir.es/. The names of separatist parties can be found in for example this link https://en.wikipedia.org/wiki/List_of_political_parties_in_Spain under those with the word separatism in their description. Accessed 20 Nov 2020. Lazer, D. M., Pentland, A., Watts, D. J., Aral, S., Athey, S., Contractor, N., et al. (2020). Computational social science: Obstacles and opportunities. Science, 369(6507), 1060–1062. Lazer, D. M. J., Pentland, A., Watts, D. J., Aral, S., Athey, S., Contractor, N., et al. (2020). Computational social science: Obstacles and opportunities. Science, 369(6507), 1060–1062. Hofman, J. M., Watts, D. J., Athey, S., Garip, F., Griffiths, T. L., Kleinberg, J., et al. (2021). Integrating explanation and prediction in computational social science. Nature, 595(7866), 181–188. Di Giovanni, F., & Santurro, M. (2021). Machine learning, artificial neural networks and social research. Quality and Quantity, 55(3), 1007–1025. Forradellas, R. F., Reier, S. L., Alonso, N., Jorge-Vazquez, J., & Rodriguez, M. L. (2020). Applied machine learning in social sciences: Neural networks and crime prediction. Social Sciences, 10(1), 1. The official Twitter API. http://www.tweepy.org. Accessed 20 Nov 2020. See details in the webpage in Python. https://pypi.org/project/GetOldTweets3. Accessed 20 Nov 2020. See e.g. Zhou, Z., Guan, H., Bhat, M.M., & Hsu, J., (2019). Fake news detection via NLP is vulnerable to adversarial attacks. arXiv preprint. arXiv:1901.09657. See e.g. Ghosh, S., Vinyals, O., Strope, B., Roy, S., Dean, T., & Heck, L., (2016). Contextual lstm (clstm) models for large scale nlp tasks. arXiv preprint. arXiv:1602.06291. See e.g. Kamath, U., Liu, J., & Whitaker, J., (2019). Deep learning for nlp and speech recognition (Vol. 84). Springer. See e.g. Goodman, D., & Zhonghou, L., (2020). FastWordBug: A fast method to generate adversarial text against NLP applications. arXiv preprint. arXiv:2002.00760. Hutto, C.J., & Gilbert, E.E. (2014). VADER: A Parsimonious rule-based model for sentiment analysis of social media Text. In: Eighth international conference on weblogs and social media (ICWSM-14). Ann Arbor, MI, June 2014. See the API provided by Google Translate. https://pypi.org/project/translate/. Accessed 20 Nov 2020.