2020 3 rd International Conference on Computer and Informatics Engineering (IC2IE) 336 Community Understanding of the Importance of Social Distancing Using Sentiment Analysis in Twitter Tri Buana Tungga Dewi, Nadina Adelia Indrawan, Indra Budi, Aris Budi Santoso, Prabu Kresna Putra Master of Information Technology University of Indonesia Jakarta, Indonesia tri.buana91@ui.ac.id, nadina.adelia@ui.ac.id, indra@cs.ui.ac.id, aris.budi@ui.ac.id, prabu.kresna@ui.ac.id Abstract—The government may use social media, such as Twitter, to socialize a policy or a program to society. We may predict whether a program is successful or not by analyzing the sentiment of societies towards such program or communities through their tweets. The latest program of Indonesia's government during the COVID-19 pandemic is to make people do social distancing. It is socialized using the hashtag of stay at home appeal (#dirumahaja). The objective of this study is to analyze the understanding of societies regarding this program through people’s tweet. We compared two classification algorithms (Naïve Bayes and Random Forest), using tokenization and unigram features to build classification model of tweet sentiment. The tweets that included some hashtags regarding social distancing program, were collected with 5101 tweets in total. The highest accuracy is obtained using the Random Forest algorithm and term weighting feature, which yielded 95.98%. From the model we found that the number of positive sentiments is greater than the negative sentiment. Which can be concluded that the societies are understand and agree to the social distancing program. Keywords—classification, sentiment analysis, random forest, naïve Bayes, COVID-19, social appeal I. INTRODUCTION Recently, countries all over the world including Indonesia is being stricken by the COVID-19 virus pandemic. COVID- 19 virus spread has been increasing since the beginning of this year. Based on the report of Indonesian’s COVID-19 handling task force, the total number of patients exposed to COVID-19 is 2273 by 5 th of April, 2020 [1]. The number of COVID-19 cases is predicted to keep growing until May 2020 [2]. In an effort to decrease and cut off the spread of COVID- 19, Indonesian Government create a program by appealing Indonesian citizens to do distance themselves from social crowd by staying at home. Moreover, the President of Indonesia, Joko Widodo, appealed the citizen to "work from home, study from home, and pray from home”. In order to support the program, each regional government started to implement the program. For example, in Jakarta and several surrounding cities, students are studying from home and the workers are working from home. Although the government has appealed to remain home, there were still a lot of people who ignored the appeal. For example, when the provincial government of Jakarta limited the frequency of transportation in order to decrease the spread of Covid-19, a very long passenger queue occurs instead [3]. Furthermore, after schools and offices were closed so that © IEEE 2020. This article is free to access and download, along with rights for full text and data mining, re-use and analysis people can stay at home, some people took the opportunity to take vacations and visit tourist attractions. Based on news reported by iNews[4], Carita beach is filled by tourists from Jakarta and Tangerang on March 15, 2020. This indicates that public awareness of Covid-19 spread remains low. The phenomenon encouraged many social media users to help increasing the awareness by spreading the hashtag of #stayathome, #stayhome, #dirumahaja, #workfromhome, #socialdistancing on Twitter and Instagram. On Twitter, #dirumahaja, or can be translated as #juststayathome, had become a trending topic. However, those tweets regarding stay home appeal were not entirely supportive, there were also many contradictive tweets which indicates negative sentiment towards government’s program. According to Liu, positive and negative sentiment may express agreement or disagreement [5]. Therefore, this study aims to measure people's sentiment toward government appeal in facing the COVID-19 pandemic. Sentiment measurement is done using tweets with #stayathome, #stayhome, #juststayathome #workfromhome #socialdistancing in Bahasa Indonesia using text mining. There are 6 sections in this paper. The first section conveys the purpose of this study. The second section tells about the theories used. We described our methodology in section 3 that comprises, data collection, data preprocessing, representation, and model testing. The results were displayed and elucidated in section 4. The conclusion of the study was placed in section 5. The possibilities of future work are in section 6. II. LITERATURE REVIEW A. Twitter API Twitter is a website operated by Twitter Inc. It offers a microblogging social network that allows users to communicate online through tweets[6]. Twitter has Application Programming Interface (API) that is provided for companies, developers, and users as programmed access to Twitter data. Fig. 1 shows several types of API. Twitter REST API: provides core data and core Twitter objects. The Twitter REST API also consists of Twitter Search. Twitter search is used to search for instances of Twitter objects and trends. Twitter Streaming API: used for real-time information extraction