Sebuah Kajian Pustaka: IT Journal Research and Development (ITJRD) Vol.7, No.1, August 2022, E-ISSN : 2528-4053 | P-ISSN : 2528-4061 DOI : 10.25299/itjrd.2022.10599 135 Journal homepage: http://journal.uir.ac.id/index/php/ITJRD Twitter Sentiment Analysis and Its Effect on Society on the Fall of Cryptocurrency Hafiza Oktasia Nasution1, Henni Noviasari2, Lisa Melinda3 Department of Business Economics, University of Riau1,2 Department of Informatics Engineering, Faculty of Engineering, Universitas Islam Riau3 hafiza@lecturer.unri.ac.id1, henni.noviasari@lecturer.unri.ac.id 2, lisa.melinda2235@student.unri.ac.id3 Article Info ABSTRACT Article history: Received Jun 11, 2022 Revised Aug 21, 2022 Accepted Sept 21, 2022 Cryptocurrency has become a global phenomenon today. Based on the results of the GlobalWebIndex Survey, around 10% of internet users in Indonesia have digital currencies. But in recent years, the price of cryptocurrencies has fallen. This has resulted in people starting to hesitate to invest in crypto. With this problem, it causes responses that arise from the community such as positive, negative, and neutral responses. The purpose of this study is to classify public opinion through the response given to the fall of crypto by applying sentiment analysis through Twitter social media. Sentiment analysis data collection on Twitter uses the python programming language. In the data analysis process, there are 3 stages of the process, namely data crawling, preprocessing and finally the results of classification and visualization. Based on research from sentiment analysis through social media Twitter, it was obtained that 57.9% produced a neutral value, 35.7% produced a positive value, and 6.4% produced a neutral value. Keyword: Sentiment Analysis Cryptocrash Twitter Python © This work is licensed under a Creative Commons Attribution- ShareAlike 4.0 International License. Corresponding Author: Henni Noviasari Management Study Program Faculty of Economis Business, Universitas of Riau Jl. Kaharuddin Nst No.113, Pekanbaru, Riau 28284 Email: henni.novasari@lecturer.uir.ac.id 1. INTRODUCTION Cryptocurrency or known as digital currency has become a global phenomenon today in a number of countries, such as the United States, Japan and China. In Indonesia, the existence of cryptocurrencies is still experiencing pros and cons, both in terms of regulation and the legality of its use. The Indonesian government, in this case the Commodity Futures Trading Regulatory Agency (CoFTRA) is still continuing to review and issue several regulations regarding cryptocurrency assets. According to Gormantara (2020) sentiment analysis is a field of science that can build a system for recognizing and extracting opinions in text form using Natural Language Processing (NLP). With this sentiment analysis, sentences or words expressed through social media can be grouped into positive responses, negative responses, or neutral responses. In addition, this sentiment analysis can also be used to assess the conditions that occur in the community and later can be used as a guide for making a decision or policy[2]. IT Jou Res and Dev, Vol.7, No.1, August 2022 : 133 - 138 Twitter Sentiment Analysis and Its Effect on Society on the Fall of Cryptocurrency, Hafiza 136 Sentiment analysis is highly developed and has been widely discussed in various research journals, including research conducted by Nurfidah Dwiyanti (2021) with the title "New Normal Twitter Sentiment Analysis". This research aims to classify people's sentiments towards new habits or what is called the New Normal by using sentiment analysis. The results of this research show that positive sentiment is greater than negative and neutral sentiment. The results for positive sentiment were 57%, negative sentiment was 8% and neutral sentiment was 35% [3]. The current research is crawling data using the Tweepy library in Python. For classification, use the Textblob library in Python and for the search key on Twitter, use English. So based on the description above, the purpose of this research is the application of sentiment analysis to classify public views on the fall of crypto through social media Twitter into positive, negative, and neutral sentiments. The expected benefit in this research is to know the influence of society on crypto. With this sentiment analysis, it is also a view for the public to be careful in investing public funds into crypto. 2. RESEARCH METHOD 2.1. Method of collecting data The data collection method used in this research is to analyze the sentiment of Twitter users with the hashtag cryptocrash using Python. The stages carried out in this research are 3 stages, namely data crawling, preprocessing and classification results and visualization of results. The description of the flow of the research carried out is as follows: Figure 1. Sentiment Analysis Research Flow Based on Figure 1 above, the first stage is to collect public opinion or views on Twitter social media. The second stage is cleaning the data before the data is analyzed further by means of filters to remove retweets that contain duplication, and res.sub to delete urls using regular expressions that are accessed from a predetermined character set and others. As for the classification of sentiment analysis in this study using the Textblob library in Python. The library identifies opinions in the text data about the subject in the form of sentiment (polarity, subjectivity). 2.3. Python Python is one of the most widely used programming languages programmers or programmers in making their programs. Python has characteristics that are not too complicated. So that Python becomes one of the languages Easy-to-use high-level programming. In writing a code program using the Python programming language, there are some rules that must be followed fulfilled. This is to anticipate the occurrence of errors or problems in the program created. The first Python syntax rule is in writing statements or commands. 3. RESULTS AND ANALYSIS The results of data collection carried out in this study were by means of a tweet data crawler from the Twitter API using the Tweepy library. This Tweepy library makes it easy to get data on IT Jou Res and Dev, Vol.7, No.1, August 2022 : 135 - 139 Twitter Sentiment Analysis and Its Effect on Society on the Fall of Cryptocurrency, Hafiza 137 Twitter from users based on the keywords used. The keyword used is a variable with the hashtag cryptocrash (#cryptocrash) using English in the last 30 days. An illustration of the results of the sample data crawling results can be seen in Figure 2. Figure 2. Tweet Data Collection Results #cryptocrash API.search_30_day can retrieve tweet data from the previous 30 days by querying #cryptocrash. If with the standard API format, a maximum of 1 execution can only retrieve 100 tweets. In order to retrieve 3000 tweets, additional pagination is needed, namely tweepy.Cursor(method,*args,*kwargs) so as to produce 3000 tweets. After collecting data, the next process is to process the data preprocessing twitter data. The data preprocessing process which is done by cleaning the data includes deleting URLs and hashtags using regular expressions. In a function defined with: re.sub("([^0-9A- Za-z\t]) | | (\w+:\/\/\S+) "," " on tweet status. The function re.sub is used to replace the character selection specified using regular expressions, to find all strings such as URLs and hashtags replaced with - "". The results of the preprocessing data process can be seen in Figure 3. Figure 3. Preprocessing Data Results In addition, in the data preprocessing process, the process of changing all the letters in the tweet data into lowercase letters is also carried out with the set(lower_case) function. The results of the process of changing lowercase letters can be seen in Figure 4. Figure 4. Results of the Lowercase Change Process IT Jou Res and Dev, Vol.7, No.1, August 2022 : 133 - 138 Twitter Sentiment Analysis and Its Effect on Society on the Fall of Cryptocurrency, Hafiza 138 After making the process of changing lowercase letters on the Twitter data, then the final process at the stage of the data preprocessing process is to do a retweet filter. The retweet filter removes retweets that contain the same content (duplicates). The results of the retweet filter can be seen in Figure 5. Figure 5. Retweet Filter Results After doing the data preprocessing process, the next step is the classification and visualization results. For sentiment analysis in this study, Textblob is used to identify public opinion on the fall of crypto from tweet data. The polarity value in sentiment analysis is between 1 to -1. The polarity value leading to a value of 1 indicates a positive opinion, the polarity value leading to a value of -1 indicates a negative opinion and a polarity value ranging to 0 indicates a neutral opinion. The results of the classification of sentiment analysis can be seen in Figure 6. Figure 6. Sentiment Analysis Results In Figure 4 above, it can be seen that the results of the sentiment analysis of the polarity value with the #cryptocrash variable. The highest polarity value is found in neutral status of 57.9%, positive polarity of 35.7% and negative polarity of 6.4%. To show some samples from the tweet data set from sentiment analysis with the #cryptocrash variable with positive, negative, and neutral categories and their polarity values, see table 1. Table 1. Tweet Polarity Category Polarity Tweet Sentiment -0.133 oax last few hours of gains get in get out green take 50 minimum 1 3 days or hold for take 100 maxim Negative -0.0571 give up trying to convince others that you are right as it is both exhausting and counterproductive memecoin cryp Negative IT Jou Res and Dev, Vol.7, No.1, August 2022 : 135 - 139 Twitter Sentiment Analysis and Its Effect on Society on the Fall of Cryptocurrency, Hafiza 139 0.0 i need some luck for this airdrop nftgiveaway Netral 0.0 nieuwe vacature cryptocrash callcentermedewerker inbound Netral 0.1666 no hype no lies just free global 100 send to you directly cryptocurency cryptocurrecy crypto Positive 0.4499 flare is just around the corner going straight to 1st place let s be patient good things take time trending fla Positive 4. CONCLUSION Based on the results and discussion generated in this study, it can be concluded that the data used was obtained using the Tweepy library on Python by taking tweet data using the #cryptocrash variable from the last 30 days of this study. From the data collected, there is a sentiment analysis result of 57% yielding a positive value, a value of 35.7% producing a positive value, and 6.4% producing a neutral value. In this study, the results of twitter sentiment analysis using python are very limited by taking tweet data in English, so that in the future it is expected to be developed again using other programming languages. REFERENCES [1] Ammous, S. (2018). Can cryptocurrencies fulfil the functions of money? The Quarterly Review of Economics and Finance, 70, 38-51. [2] Andrianto, Y., & Diputra, Y. (2017). The Effect of Cryptocurrency on Investment Portfolio. Journal of Finance and Accounting, 5(6), 229-238. [3] Buntoro, G. A., Adji, T. B., & Purnamasari, A. E. (2014). Sentiment Analysis Twitter dengan Kombinasi Lexicon Based dan Double Propagation. CITEE 2014 , 39-43. [4] Bhiantara, I. B. P. (2018). Teknologi Blockchain Cryptocurrency Di Era Revolusi Digital. Seminar Nasional Pendidikan Teknik Informatika (SENAPATI), 9(September), 173–177.Retrieved from http://eproceeding.undiksha.ac.id/index.php/senapati/article/view/1204 [5] Hameed, S., & Farooq, S. (2016). The Art of Crypto Currencies. International [6] A Harwick, C. (2016). Cryptocurrency_and_the_problem.PDF. Independent Reveiw, 20(4), 569–588. [7] Journal of Advanced Computer Science and Applications, 7(12), 426–435. https://doi.org/10.14569/ijacsa.2016.071255 [8] Lee, D. K., Guo, L., & Wang, Y. (2018). Cryptocurrency: A new investment opportunity? Journal Of Alternative Investments, 20(3), 16-40. [9] Noorsanti, R. C., Yulianton, H., & Hadiono, K. (2018). Blockchain - Teknologi Mata Uang Kripto (Cryptocurrency). 306-311. [10] Nurhuda, F., & Sihwi, S. W. (2014). Analisis Sentimen Masyarakat terhadap Calon Presiden Indonesia 2014 berdasarkan Opini dari Twitter Menggunakan Metode Naive Bayes Classifier, 2(2). [11] M Prasetya, Adam, dkk. 2021, “Sentiment Analisis Terhadap Cryptocurrency Berdasarkan Comment Dan Reply Pada Platform Twitter”, ”Journal of Information Systems and Informatics”, Vol. 3, No. 2, June 2021 [12] Thakur, K. K., & Banik. (2018). Cryptocurrency: Its Risks And Gains And The Way Ahead. Journal of Economics and Finance, 9(2), 38-42. [13] Nurfidah, D., & Noni S. (2021). Analisis Sentimen Twitter Kebiasaan New Normal, Seminar Nasional Riset dan Inovasi Teknologi (SEMNAS RISTEK), 14(Januari). [14] Fauziyyah, A. K. (2020). Analisis Sentimen Pandemi Covid19 Pada Streaming Twitter Dengan Text Mining Python. Jurnal Ilmiah SINUS, 18(2), 31. https://doi.org/10.30646/sinus.v18i2.491 [15] Gormantara, A. (2020). Analisis Sentimen Terhadap New Normal Era di Indonesia pada Twitter Analisis Sentimen Terhadap New Normal Era di Indonesia pada Twitter Menggunakan Metode Support Vector Machine. July, 0–5. https://doi.org/10.30646/sinus.v18i2.491