Sentiment Analysis of Indonesian Nickel Downstreaming on X Using Naïve Bayes and K-Nearest Neighbors
Main Article Content
Abstract
Nickel downstreaming has become one of Indonesia’s most prominent industrial policies, positioned as a pathway to economic growth and global relevance in the electric vehicle supply chain. Despite its ambitions, the policy has triggered intense debate on social media, where concerns about ecological damage and foreign dominance intersect with narratives of national pride. This study employs sentiment analysis to examine public perceptions of the policy through 337 tweets collected from X (formerly Twitter). Two machine learning algorithms, Naïve Bayes and K-Nearest Neighbors, were applied to classify sentiment into positive, negative, and neutral categories, followed by evaluation using confusion matrices, accuracy, precision, recall, and F1-score. The results show that negative sentiment dominates across both models, with Naïve Bayes achieving higher accuracy and recall, while KNN displayed strengths in precision and F1-score. Wordcloud analysis further revealed that positive sentiment is associated with industrial progress and national identity, negative sentiment emphasizes environmental risks and foreign control, and neutral sentiment reflects factual reporting of events. These findings confirm that nickel downstreaming remains a contested policy, viewed as an economic opportunity by some and as a source of social and ecological concern by many others. This study demonstrates the value of integrating sentiment analysis with policy research, as social media provides real-time insights into how citizens perceive government initiatives. The evidence highlights the importance of addressing environmental sustainability and equitable resource management to build trust and legitimacy. Sentiment analysis therefore serves not only as a tool for understanding public opinion but also as a guide for shaping more inclusive governance.
Manuscript received: 5 Aug 2025 | Revised: 8 Oct 2025 | Accepted: 15 Oct 2025 | Published: 30 Nov 2025
Article Details

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
References
S.A. Nugroho and S. Widianto, “Exploring Electric Vehicle Adoption in Indonesia Using Zero-Shot Aspect-Based Sentiment Analysis,” Sustainable Operations and Computers, vol. 5, no. October 2023, pp. 191–205, 2024.
DOI https://doi.org/10.1016/j.susoc.2024.08.002
B. Lahadalia, C. Wijaya, T. Dartanto and A. Subroto, “Nickel Downstreaming in Indonesia: Reinventing Sustainable Industrial Policy and Developmental State in Building the EV Industry in ASEAN,” Journal of ASEAN Studies, vol. 12, no. 1, pp. 79–106, 2024.
DOI: https://doi.org/10.21512/jas.v12i1.11128
A. Putri and M. Saufica, “Implications of the Downstream Policy of Nickel Export Activities to the European Union on the Fluctuations in the Stock Price of the Mining Sector on the Indonesia Stock Exchange,” The Journal of Academic Science, vol. 1, no. 7, pp. 825–834, 2024.
DOI: https://doi.org/10.59613/kcznpx46
S.M. Farawansa and E.R. Gultom, “Diagnosis Of Nickel Industry Downstreaming Policy In Export Restriction Towards Increasing Economic Added Value In Indonesia,” Jurnal Legalitas, vol. 17, no. 1, pp. 1–16, 2024.
DOI: https://doi.org/10.33756/jelta.v17i1.19688
A.T. Putra and P.L. Samputra, “Analysis of nickel export restriction and downstream policy in Indonesia,” Indonesian Journal of Multidisciplinary Science, vol. 3, no. 3, pp. 180–187, 2023.
DOI: https://doi.org/10.55324/ijoms.v3i3.749
Marwanto, I.N.P.B. Rumiartha, M. Putri, I.W. Parsa and I.G. Yusa, “Business on Nickel Down Streaming with China and European Union Lawsuits at World Trade Organization,” Jurnal IUS Kajian Hukum dan Keadilan, vol. 12, no. 2, pp. 315–329, 2024.
DOI: https://doi.org/10.29303/ius.v12i2.1381
M. Rodríguez-Ibánez, A. Casánez-Ventura, F. Castejón-Mateos and P.M. Cuenca-Jiménez, “A review on sentiment analysis from social media platforms,” Expert Systems with Applications, vol. 223, no. March, 2023.
DOI: https://doi.org/10.1016/j.eswa.2023.119862
N. Leelawat et al., “Twitter data sentiment analysis of tourism in Thailand during the COVID-19 pandemic using machine learning,” Heliyon, vol. 8, no. 10, p. e10894, 2022.
DOI: https://doi.org/10.1016/j.heliyon.2022.e10894
R. Vindua and A.U. Zailani, “Analisis Sentimen Pemilu Indonesia Tahun 2024 Dari Media Sosial Twitter Menggunakan Python,” Jurnal Riset Komputer, vol. 10, no. 2, p. 479, 2023.
DOI: https://doi.org/10.30865/jurikom.v10i2.5945
H. Parveen and S. Pandey, “Sentiment analysis on Twitter Data-set using Naive Bayes algorithm,” 2016 2nd International Conference on Applied and Theoretical Computing and Communication Technology, pp. 416–419, 2016.
DOI: https://doi.org/10.1109/ICATCCT.2016.7912034
J.M.Y. Pattinussa, “Identifying the Urgency of Indonesia’s Nickel Industry Downstream: WTO Dispute and Global Momentum [Identifikasi Kepentingan Hilirisasi Industri Nikel Indonesia: Sengketa WTO dan Momentum Global],” Verity: Jurnal Ilmah Hubungan International (International Relations Journal), vol. 16, no. 31, pp. 10–20, 2024.
DOI: https://doi.org/10.19166/verity.v16i31.8691
R. Rahim, A. Saleh and R. Hidayat, “Cross-Validation and Validation Set Methods for Choosing K in KNN Algorithm for Healthcare Case Study,” Journal of Information and Visualization, vol. 3, no. 1, pp. 1–5, 2022.
DOI: https://doi.org/10.35877/454RI.jinav1557
A.A. Soofi and A. Awan, “Classification Techniques in Machine Learning: Applications and Issues,” Journal of Basic & Applied Sciences, vol. 13, pp. 459–465, 2017.
DOI: http://dx.doi.org/10.6000/1927-5129.2017.13.76
L. Dey, S. Chakraborty, A. Biswas, B. Bose and S. Tiwari, “Sentiment Analysis of Review Datasets Using Naïve Bayes‘ and K-NN Classifier,” International Journal of Information Engineering and Electronic Business, vol. 8, no. 4, pp. 54–62, 2016.
DOI: https://doi.org/10.5815/ijieeb.2016.04.07
S. Zhang, “Challenges in KNN Classification,” IEEE Transactions on Knowledge and Data Engineering, vol. 34, no. 10, pp. 4663–4675, 2022.
DOI: https://doi.org/10.1109/TKDE.2021.3049250
M. Wongkar and A. Angdresey, “Sentiment Analysis Using Naive Bayes Algorithm Of The Data Crawler: Twitter,” 2019 Fourth International Conference on Informatics and Computing (ICIC), no. July, 2019.
DOI: https://doi.org/10.1109/ICIC47613.2019.8985884
A.M. Ndapamuri, D. Manongga and A. Iriani, “Analisis Sentimen Ulasan Aplikasi Tripadvisor Dengan Metode Support Vector Machine, K-Nearest Neighbor, Dan Naive Bayes,” INOVTEK Polbeng - Seri Informatika, vol. 8, no. 1, p. 127, 2023.
DOI: https://doi.org/10.35314/isi.v8i1.3260
A.P.R. Sarwono, “Socioeconomic and Health Impacts of Nickel Downstreaming: Case of Indonesia Morowali Industrial Park,” Wageningen University & Research, p. 30, 2025.
URL: https://edepot.wur.nl/691688
A. Krouska, C. Troussas and M. Virvou, “The effect of preprocessing techniques on Twitter sentiment analysis,” 2016 7th International Conference on Information, Intelligence, Systems & Applications (IISA), pp. 1-5, 2016.
DOI: https://doi.org/10.1109/IISA.2016.7785373
S. Widiastutie, D. Maarif and A.A. Hafizha, “Sentimental Analysis of Twitter Data Using Machine Learning and Deep Learning: Nickel Ore Export Restrictions to Europe Under Jokowi’s Administration 2022,” Asia Pacific Journal of Information Systems Pacific, vol. 34, no. 2, pp. 400–420, 2024.
DOI: https://doi.org/10.14329/apjis.2024.34.2.400
A.A. Fauzi, A.V. Vitianingsih, S. Kacung and A.L. Maukar, “Sentiment Analysis On Tripadvisor Travel Agent Using Random Forest , Support Vector Machines , and Naïve Bayes Methods,” Teknika, vol. 14, no. March, pp. 150–156, 2025.
DOI: https://doi.org/10.34148/teknika.v14i1.1198
L. Xiang, “Application of an Improved TF-IDF Method in Literary Text Classification,” Advances in Multimedia, vol. 2022, 2022.
DOI: https://doi.org/10.1155/2022/9285324
A.R. Isnain, J. Supriyanto and M.P. Kharisma, “Implementation of K-Nearest Neighbor (K-NN) Algorithm For Public Sentiment Analysis of Online Learning,” Indonesian Journal of Computing and Cybernetics Systems, vol. 15, no. 2, p. 121, 2021.
DOI: https://doi.org/10.22146/ijccs.65176
Y. Song, J. Liang, J. Lu and X. Zhao, “An efficient instance selection algorithm for k nearest neighbor regression,” Neurocomputing, vol. 251, pp. 26–34, 2017.
DOI: https://doi.org/10.1016/j.neucom.2017.04.018
N. Braig, A. Benz, S. Voth, J. Breitenbach and R. Buettner, “Machine Learning Techniques for Sentiment Analysis of COVID-19-Related Twitter Data,” IEEE Access, vol. 11, no. February, pp. 14778–14803, 2023.
DOI: https://doi.org/10.1109/ACCESS.2023.3242234
R.E. Yap, S.C. Haw and S. Al-Juboori, “A Comprehensive Review on Machine Learning-Based Job Recommendation Systems,” International Journal on Robotics, Automation and Sciences, vol. 7, no. 2, pp. 36–55, 2025.
DOI https://doi.org/10.33093/ijoras.2025.7.2.5
S. Suryani, M.F. Fayyad, D.T. Savra, V. Kurniawan and B.H. Estanto, “Sentiment Analysis of Towards Electric Cars using Naive Bayes Classifier and Support Vector Machine Algorithm,” Public Research Journal of Engineering, Data Technology and Computer Science, vol. 1, no. 1, pp. 1–9, 2023.
DOI: https://doi.org/10.57152/predatecs.v1i1.814
M. Rezwanul, A. Ali and A. Rahman, “Sentiment Analysis on Twitter Data using KNN and SVM,” International Journal of Advanced Computer Science and Applications, vol. 8, no. 6, pp. 19–25, 2017.
DOI: https://doi.org/10.14569/ijacsa.2017.080603
B. Lahadalia, C. Wijaya, T. Dartanto and A. Subroto, “Into Sustainable and Equitable Nickel Downstreaming in Indonesia: What Policy Reforms are Needed?,” Migration Letters, vol. 21, no. 3, pp. 620–631, 2024.
URL:https://migrationletters.com/index.php/ml/article/view/6759/4496
S. Ahmad, N. Hashm and E. Hussain, “Sentiment Analysis on Social Media,” International Journal of Scientific Research and Engineering Trends, vol. 11, no. 2, pp. 1582–1589, 2023. URL:https://ijsret.com/wp-content/uploads/2025/03/IJSRET_V11_issue2_554.pdf