Sentiment Analysis of Indonesian Government Policy in the Environmental Sector Using Machine Learning Method

Main Article Content

Amy Fontanella
Hidayatul Ihsan
Zhi-Hao Wang


The study aims to analyse government policies related to the issuance of PP no. 22/2021 based on sentiment analysis on social media, especially Twitter. Data collection is using three keywords such as coal waste, FABA waste and toxic waste through Twitter API. 236 tweets are obtained and labelled into positive and negative sentiments. The dataset is grouped into training and testing data. Training data consists of 50 tweets and testing data consists of 186 tweets. The cleansing process is carried out by tokenizing, transform cases, stop word filters and comparison of classification models. The results showed that the public opinions tended to be negative sentiments with the accuracy rate is 77.40%.  

Article Details

How to Cite
Fontanella, A., Hendrick, Ihsan, H., Wang, Z.-H., & Igra. (2021). Sentiment Analysis of Indonesian Government Policy in the Environmental Sector Using Machine Learning Method. Rafgo, 1(2), 1–5. Retrieved from


Elbagir, S., &Yang, J. (2019). Twitter sentiment analysis using natural language toolkit and Vader sentiment. Lecture Notes in Engineering and Computer Science, 2239, 12–16

F. R. Lucini et al. (2017). Text mining approach to predict hospital admissions using early medical records from the emergency department. Int. J. Med. Inf, 100(April), 1–8

Hasan, M. R., Maliha, M., &Arifuzzaman, M. (2019). Sentiment Analysis with NLP on Twitter Data. 5th International Conference on Computer, Communication, Chemical, Materials and Electronic Engineering, IC4ME2 2019, (December).

Prastyo, P. H., Sumi, A. S., Dian, A. W., &Permanasari, A. E. (2020). Tweets Responding to the Indonesian Government’s Handling of COVID-19: Sentiment Analysis Using SVM with Normalized Poly Kernel. Journal of Information Systems Engineering and Business Intelligence, 6(2), 112.

Saura, J. R., Herraez, B. R., &Reyes-Menendez, A. (2019). Comparing a traditional approach for financial brand communication analysis with a big data analytics technique. IEEE Access, 7, 37100–37108.

Shayaa, S., Jaafar, N. I., Bahri, S., Sulaiman, A., Seuk Wai, P., Wai Chung, Y., …Al-Garadi, M. A. (2018). Sentiment analysis of big data: Methods, applications, and open challenges. IEEE Access, 6, 37807–37827.