Analyzing Brexit’s impact using sentiment analysis and topic modeling on Twiter discussion Sardar Haider Waseem Ilyas haider@waseemilyas.com Lahore University of Management Sciences Zainab Tariq Soomro zainabsoomro@gmail.com Lahore University of Management Sciences Ahmed Anwar ahmedanwar5295@gmail.com Lahore University of Management Sciences Hamza Shahzad hamzashahzad156@gmail.com Lahore University of Management Sciences Ussama Yaqub ussama.yaqub@lums.edu.pk Lahore University of Management Sciences ABSTRACT In this paper we evaluate public sentiment and opinion on Brexit during September and October 2019 by collecting over 16 million user messages from Twitter - world’s largest online micro-blogging service. We perform sentiment analysis using the Python VADER library, and topic modeling using Latent Dirichlet Allocation func- tion of the gensim library. Through sentiment analysis, we quantify daily public sentiment towards Brexit and use it to evaluate Brexit’s impact on the British currency exchange rate and stock markets in Britain. With the aid of topic modeling, we discover the most popular daily topics of discussion on Twitter using the keyword "Brexit". Some of our fndings include the discovery of positive correlation between Twitter sentiment towards Brexit and British pound sterling exchange rate. We also found daily discussion topics on Twitter, identifed through unsupervised machine learning to be a good proxy of important current events related with Brexit. CCS CONCEPTS · Information systems Document topic models; Sentiment analysis. KEYWORDS Twitter, Sentiment Analysis, Topic Modeling, Currency fuctuation, Machine Learning, Unsupervised Learning ACM Reference Format: Sardar Haider Waseem Ilyas, Zainab Tariq Soomro, Ahmed Anwar, Hamza Shahzad, and Ussama Yaqub. 2020. Analyzing Brexit’s impact using senti- ment analysis and topic modeling on Twitter discussion. In dg.o ’20: The 21st Annual International Conference on Digital Government Research (dg.o ’20), June 15ś19, 2020, Seoul, NY, USA. ACM, New York, NY, USA, 6 pages. https://doi.org/10.1145/3396956.3396973 Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for proft or commercial advantage and that copies bear this notice and the full citation on the frst page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specifc permission and/or a fee. Request permissions from permissions@acm.org. dg.o ’20, June 15ś19, 2020, Seoul, NY, USA © 2020 Association for Computing Machinery. ACM ISBN 978-1-4503-8791-0/20/06. . . $15.00 https://doi.org/10.1145/3396956.3396973 1 INTRODUCTION Social media outlets have shown an acute rise in the quantity of information being disseminated on a day-to-day basis. In addition, the reach of this information has also grown exponentially as social media has become much more accessible. Twitter, for example, has over 330 million active users monthly and over 500 million tweets per day. This sheer amount of data comprises of facts, statements, opinions and replies of people ranging from the leaders in diferent industries to the common man. The data being produced every- day allows these platforms to be the subject of multiple scientifc analysis [26]. Various scientifc analyses can be performed which can be used to measure sentiment, fnd correlations of diferent events and explore diferent trends. Events such as elections and referendums are of great social signifcance as they result in an out-pour of public sentiment. Such work can reveal public mood and help see the efect of the event in various ways. In this paper we look to deploy scientifc techniques through which we can perform sentiment analysis to gauge the public mood in relation to Brexit. Moreover, we will extend this analysis to understand the efect of the measured sentiment on other indicators of economic health such as stock market and exchange rate. We also look to highlight prevalent topics on Twitter using our data and see if they are illustrative of the actual events surrounding Brexit. The data we used to perform this analysis was gathered over 51 days and comprises 16 million tweets. In this paper we make the following contributions: Sentiment Analysis of Brexit related conversation on Twitter vis-à-vis the British pound sterling and stock rate. Topic modeling for extracting the most trending topics from Sep 11 to Oct 31 and comparing them with actual events. 2 LITERATURE REVIEW Online social platforms - such as twitter - provide millions of in- dividuals unlimited access to information and connectivity. The content produced on these social platforms has a considerable infu- ence on the opinions of individuals and an extensive social impact [15, 17, 21, 26]. The analysis of this data can be done in various ways and can be leveraged to quantify the opinions of the public and create reliable forecast models across various domains. For in- stance, researchers have used sentiment analysis on twitter data to extract diferent public moods and emotions with respect to actual