FORECASTING THE RESULTS OF THE PRESIDENTIAL ELECTIONS IN FRANCE BASED ON TWITTER DATA

Authors

DOI:

https://doi.org/10.31891/csit-2022-4-4

Keywords:

political rating, sociological poll, Twitter, Python, Selenium, data collection, machine learning, natural language processing

Abstract

This paper presents the study to collect, store and analyze data from Twitter to forecast French presidential election results, compared to sociological polls. The first and probably the most important step of the research is to collect, store and clean data, the whole result depends on the amount and quality of data. In the next step of research, datasets are analyzed. Lastly, complete report and visualizations are provided. In the study, we propose modern technics, mathematical algorithms, and machine learning approaches to analyze big amounts of data from the Twitter social network in order to forecast the 2022 French presidential election results. The determined outcome is compared with sociological polls and the real results of elections.

In the conducted research modern types of media are compared to select the best one for election prediction. Selected Twitter social network as the one with the most appropriate data and availability to download big amounts of useful information. The approach based on the usage of Python programming language, Selenium browser emulation and MongoDB database was used to collect, store and clean data about the main French election candidates – Emmanuel Macron and Marine Le Pen. The research was made from August 2021 until the election itself in April 2022. The determined outcome is compared with sociological polls and the results of elections and showed that analysis of social network data could be a good alternative to traditional sociological polls as it shows the same trends month by month and well predicted the win of Emmanuel Macron in elections. Moreover, the proposed approach has its benefits compared to sociological polls such as always being fresh, and close to real-time information, the price of research is much lower and could be reused for the next parliamentary or presidential elections with a small modification.

The research could be extended and adapted for other countries. Currently, the proposed algorithms and mathematical models showed good results in the French and Ukraine elections. It works well with English, French, Ukrainian and Russian languages. This allows us to claim that it will also work fine with other Latin or Cyrillic alphabets but for Asian or Arabic languages more research would be needed. Twitter is a good choice for European and American countries. In the future, other social networks should be considered for the countries in which it is not so popular.

Downloads

Published

2022-12-29

How to Cite

RUDNYK, T., & CHERTOV, O. (2022). FORECASTING THE RESULTS OF THE PRESIDENTIAL ELECTIONS IN FRANCE BASED ON TWITTER DATA . Computer Systems and Information Technologies, (4), 27–33. https://doi.org/10.31891/csit-2022-4-4