A Sentiment Analysis Study of Banning Single-Use Plastic Bags Based on X Users’ Attitude
1Research Center For Sustainable Production System and Life Cycle Assessment, National Research and Innovation Agency (BRIN), Indonesia
*Author to whom correspondence should be addressed:
E-mail: soen.steven.example@university.edu (SS)
E-mail: soen.steven.example@university.edu (SS)
Received: August 07, 2024 | Revised: May 02, 2025 | Accepted: June 20, 2025 | Published: June 2025
Abstract
Single-use plastics have become an urgent global environmental concern. The Indonesian government has attempted to introduce a policy that bans the use of single-use plastics as an initial step toward overcoming this issue. However, policy implementation often faces challenges from stakeholders. Therefore, this study aims to analyze public sentiment expressed on the X platform (formerly known as “Twitter”) regarding the policy of banning single-use plastic bags in Indonesia. The methods used in this study include data collection, pre-processing (cleaning and transforming), labeling, modeling, and analysis using RapidMiner software. Tweet data were then analyzed using three machine learning methods, i.e. Naïve Bayes, K-Nearest Neighbors (KNN), and Decision Tree. Data were divided into training and test sets with a ratio of 60:40, 70:30, and 80:20. As many as 1038 refined tweets data from 2019-2023 with related keywords were obtained. Based on the performance evaluation, the Naïve Bayes algorithm can improve its performance as the amount of training data increases, without overfitting. This algorithm achieves the highest accuracy of 89.73% at an 80:20 ratio. Furthermore, the classification results of the majority (70.6%) of the tweets showed positive support for the policy, 19.6% were negative, and 9.8% were neutral. In other words, the results of this sentiment classification can be used to monitor public responses and formulate environmentally friendly policies that are effective and supported by the majority.
Keywords
Naïve Bayes ; Sentiment ; Machine learning ; Algorithm ; Single-use plastic
Available Repositories
Share Article
Article Metrics
--
Views
--
Downloads
--
Citations
Export Citation
Full Text
References
- 1) A.Dey, C.V. Dhumal, P. Sengupta, A. Kumar, N.K. Pramanik, and T. Alam, "Challenges and possible solutions to mitigate the problems of single-use plastics used for packaging food items: a review," J. Food Sci. Technol., 58 (9) 3251-3269 (2021) doi:10.1007/s13197-020-04885-6
- 2) C.Liu, T. Thang Nguyen, and Y. Ishimura, "Current situation and key challenges on the use of single-use plastic in hanoi," Waste Manag., 121 422-431 (2021) doi:10.1016/j.wasman.2020.12.033
- 3) L.R.Lima, R.F. Gutierrez, and S.A. Cruz, "Challenges in the context of single-use plastics and bioplastics in brazil: a legislative review," Waste Manag. Res. J. a Sustain. Circ. Econ., 40 (7) 998-1006 (2022) doi:10.1177/0734242X211055548
- 4) Syafrudin,Mochamad Arief Budihardjo, Nany Yuliastuti, and Bimastyaji Surya Ramadan, "Assessment of greenhouse gases emission from integrated solid waste management in semarang city, central java, indonesia," Evergreen, 8 (1) 23-35 (2021) doi:10.5109/4372257
- 5) I.Febijanto, S. Steven, N. Nadirah, H. Bahua, A. Shoiful, D.P. Dewanti, I.P.A. Kristyawan, K.A. Haris, M. Yuliani, M. Hanif, M.H. Robbani, N.R. Yusuf, Prihartanto, P. Alfatri, R.A. Pratama, W. Purwanta, Wiharja, R. Nugroho, and S.K. Ramadhan, "Municipal solid waste (msw) reduction through incineration for electricity purposes and its environmental performance: a case study in bantargebang, west java, indonesia," Evergreen, 11 (1) 32-45 (2024) doi:10.5109/7172186
- 6) A.Zhumadilova, and S. Zhigitova, "Features of modern areas of solid waste disposal," Evergreen, 10 (2) 640-648 (2023) doi:10.5109/6792809
- 7) S.Steven, N.T.U. Culsum, I.C. Sophiana, I. Febijanto, E. Syamsudin, N. Ghazali, N. Nadirah, E.S.A. Soekotjo, and I.M. Hidayatullah, "Potential of corn cob sustainable valorization to fuel-grade bioethanol: a simulation study using superpro designer®," Evergreen, 10 (4) 2287-2298 (2023) doi:10.5109/7160904
- 8) L.Di Paolo, S. Abbate, E. Celani, D. Di Battista, and G. Candeloro, "Carbon footprint of single-use plastic items and their substitution," Sustainability, 14 (24) 16563 (2022) doi:10.3390/su142416563
- 9) M.Shen, W. Huang, M. Chen, B. Song, G. Zeng, and Y. Zhang, "(Micro)plastic crisis: un-ignorable contribution to global greenhouse gas emissions and climate change," J. Clean. Prod., 254 120138 (2020) doi:10.1016/j.jclepro.2020.120138
- 10) A.Berisha, and L. Osmanaj, "Kosovo scenario for mitigation of greenhouse gas emissions from municipal waste management," Evergreen, 8 (3) 509-516 (2021) doi:10.5109/4491636
- 11) D.A.Trirahayu, A.Z. Abidin, R.P. Putra, A.S. Hidayat, E. Safitri, and M.I. Perdana, "Process simulation and design considerations for biodiesel production from rubber seed oil," Fuels, 3 (4) 563-579 (2022) doi:10.3390/fuels3040034
- 12) D.A.Trirahayu, A.Z. Abidin, R.P. Putra, F.D. Putri, A.S. Hidayat, and M.I. Perdana, "Process assessment of integrated hydrogen production from by-products of cottonseed oil-based biodiesel as a circular economy approach," Hydrogen, 4 (2) 272-286 (2023) doi:10.3390/hydrogen4020019
- 13) E.Cowan, A.M. Booth, A. Misund, K. Klun, A. Rotter, and R. Tiller, "Single-use plastic bans: exploring stakeholder perspectives on best practices for reducing plastic pollution," Environments, 8 (8) 81 (2021) doi:10.3390/environments8080081
- 14) Shabbiruddin,N. Kanwar, V.K. Jadoun, J. N. S., A. Afthanorhan, N. Fatema, H. Malik, and M.A. Hossaini, "Industry—challenge to pro-environmental manufacturing of goods replacing single-use plastic by indian industry: a study toward failing ban on single-use plastic access," IEEE Access, 11 77336-77346 (2023) doi:10.1109/ACCESS.2023.3296097
- 15) S.Ali, W. Ahmed, Y.A. Solangi, I.S. Chaudhry, and N. Zarei, "Strategic analysis of single-use plastic ban policy for environmental sustainability: the case of pakistan," Clean Technol. Environ. Policy, 24 (3) 843-849 (2022) doi:10.1007/s10098-020-02011-w
- 16) M.Pearson, E. Khare, and O. Tantawi, "Addressing the single-use plastic proliferation problem," MIT Sci. Policy Rev., 3 85-93 (2022) doi:10.38105/spr.ro3uhoc2lz
- 17) H.Kamaruddin, Maskun, F. Patittingi, H. Assidiq, S.N. Bachril, and N.H. Al Mukarramah, "Legal aspect of plastic waste management in indonesia and malaysia: addressing marine plastic debris," Sustainability, 14 (12) 6985 (2022) doi:10.3390/su14126985
- 18) Y.Wang, and R. Karasik, "Plastic Pollution Policy Country Profile: Indonesia," Duke University, 2022
- 19) A.R.Bizhanova, A.S. Koshkinbayeva, G.A. Zhunisova, G.Z. Osmanova, D. Belkhozhayeva, and D.S. Baisymakova, "Regulatory issues of depollution in kazakhstan," Evergreen, 9 (4) 903-908 (2022) doi:10.5109/6622877
- 20) C.A.G.Gutierrez, A. Whittaker, K.M. Patenio, J. Gehman, L.M. Lefsrud, D. Barbosa, and E. Stroulia, "Analyzing and visualizing Twitter conversations," in: Proc. 31st Annu. Int. Conf. Comput. Sci. Softw. Eng., IBM Corp., USA, 2021: pp. 4-13
- 21) M.Birjali, M. Kasri, and A. Beni-Hssane, "A comprehensive survey on sentiment analysis: approaches, challenges and trends," Knowledge-Based Syst., 226 107134 (2021) doi:10.1016/j.knosys.2021.107134
- 22) A.Mitra, "Sentiment analysis using machine learning approaches (lexicon based on movie review dataset)," J. Ubiquitous Comput. Commun. Technol., 2 (3) 145-152 (2020) doi:10.36548/jucct.2020.3.004
- 23) P.Monika, C. Kulkarni, N. Harish Kumar, S. Shruthi, and V. Vani, "Machine learning approaches for sentiment analysis," Int. J. Health Sci. (Qassim)., 1286-1300 (2022) doi:10.53730/ijhs.v6nS4.6119
- 24) J.M.Helm, A.M. Swiergosz, H.S. Haeberle, J.M. Karnuta, J.L. Schaffer, V.E. Krebs, A.I. Spitzer, and P.N. Ramkumar, "Machine learning and artificial intelligence: definitions, applications, and future directions," Curr. Rev. Musculoskelet. Med., 13 (1) 69-76 (2020) doi:10.1007/s12178-020-09600-8
- 25) D.Hsu, "Overview of Machine Learning," 2022
- 26) S.Uddin, and H. Lu, "Confirming the statistically significant superiority of tree-based machine learning algorithms over their counterparts for tabular data," PLoS ONE, 19 (4) e0301541 (2024) doi:10.1371/journal.pone.0301541
- 27) R.Nayak, S. Dinesh, and S.Thirunavukkarasu, "A Novel Method Improvement of Rapid Miner for the Data Mining Applications," 2019
- 28) M.Bjaoui, H. Sakly, M. Said, N. Kraiem, and M.S. Bouhlel, "Depth insight for data scientist with RapidMiner « an innovative tool for AI and big data towards medical applications»," in: Proc. 2nd Int. Conf. Digit. Tools Uses Congr., ACM, New York, NY, USA, 2020: pp. 1-6 doi:10.1145/3423603.3424059
- 29) G.D.Israel, "Determining Sample Size," University of Florida, 2003
- 30) W.G.Cochran, "The Estimation of Sample Size," in: Sampl. Tech. Third Ed., John Wiley & Sons, Inc., New York, NY, USA, 1977: pp. 86-102
- 31) H.T.Y.Achsan, H. Suhartanto, W.C. Wibowo, D.A. Dewi, and K. Ismed, "Automatic extraction of indonesian stopwords," Int. J. Adv. Comput. Sci. Appl., 14 (2) 166-171 (2023) doi:10.14569/IJACSA.2023.0140221
- 32) A.Jalilifard, V.F. Caridá, A.F. Mansano, R.S. Cristo, and F.P.C. da Fonseca, "Advances in Computing and Network Communications," Springer Singapore, Singapore, 2021 doi:10.1007/978-981-33-6977-1
- 33) Z.Zhang, Z. Wu, and Z. Shi, "An improved algorithm of TFIDF combined with Naive Bayes," in: 7th Int. Conf. Multimed. Image Process., ACM, New York, NY, USA, 2022: pp. 167-171 doi:10.1145/3517077.3517104
- 34) U.Naseem, I. Razzak, and P.W. Eklund, "A survey of pre-processing techniques to improve short-text quality: a case study on hate speech detection on twitter," Multimed. Tools Appl., 80 (28-29) 35239-35266 (2021) doi:10.1007/s11042-020-10082-6
- 35) C.Villavicencio, J.J. Macrohon, X.A. Inbaraj, J.-H. Jeng, and J.-G. Hsieh, "Twitter sentiment analysis towards covid-19 vaccines in the philippines using naïve bayes," Information, 12 (5) 204 (2021) doi:10.3390/info12050204
- 36) S.Sazzed, and S. Jayarathna, "SSentiA: a self-supervised sentiment analyzer for classification from unlabeled data," Mach. Learn. with Appl., 4 100026 (2021) doi:10.1016/j.mlwa.2021.100026
- 37) I.Wickramasinghe, and H. Kalutarage, "Naive bayes: applications, variations and vulnerabilities: a review of literature with code snippets for implementation," Soft Comput., 25 (3) 2277-2293 (2021) doi:10.1007/s00500-020-05297-6
- 38) W.W.Cholil, F. Panjaitan, F. Ferdiansyah, A. Arista, R. Astriratma, and T. Rahayu, "Comparison of Machine Learning Methods in Sentiment Analysis PeduliLindungi Applications," in: 2022 Int. Conf. Informatics, Multimedia, Cyber Inf. Syst., IEEE, 2022: pp. 276-280 doi:10.1109/ICIMCIS56303.2022.10017669
- 39) E.Y.Boateng, J. Otoo, and D.A. Abaye, "Basic tenets of classification algorithms k-nearest-neighbor, support vector machine, random forest and neural network: a review," J. Data Anal. Inf. Process., 08 (04) 341-357 (2020) doi:10.4236/jdaip.2020.84020
- 40) A.Jovic, K. Brkic, and N. Bogunovic, "An overview of free software tools for general data mining," in: 2014 37th Int. Conv. Inf. Commun. Technol. Electron. Microelectron., IEEE, 2014: pp. 1112-1117 doi:10.1109/MIPRO.2014.6859735
- 41) J.Han, M. Kamber, and J. Pei, "Data Mining: Concepts and Techniques, 3rd edition," Elsevier, 2012 doi:10.1016/C2009-0-61819-5
- 42) BPSIndonesia, "Statistical Yearbook of Indonesia," 2023
- 43) Kepios,"Digital 2024: indonesia," Meltwater Inc., (2024). https://datareportal.com/reports/digital-2024-indonesia
- 44) B.Auxier, and M. Anderson, "Social media use in 2021," Pew Res. Cent., (2021). https://www.pewresearch.org/internet/2021/04/07/social-media-use-in-2021/
- 45) B.Auxier, and M. Anderson, "Social media and news fact sheet," Pew Res. Cent., (2023). https://www.pewresearch.org/journalism/fact-sheet/social-media-and-news-fact-sheet/
- 46) S.Chen, G.I. Webb, L. Liu, and X. Ma, "A novel selective naïve bayes algorithm," Knowledge-Based Syst., 192 105361 (2020) doi:10.1016/j.knosys.2019.105361
- 47) S.Uddin, I. Haque, H. Lu, M.A. Moni, and E. Gide, "Comparative performance analysis of k-nearest neighbour (knn) algorithm and its different variants for disease prediction," Sci. Rep., 12 (1) 6256 (2022) doi:10.1038/s41598-022-10358-x
- 48) B.Charbuty, and A. Abdulazeez, "Classification based on decision tree algorithm for machine learning," J. Appl. Sci. Technol. Trends, 2 (01) 20-28 (2021) doi:10.38094/jastt20165
- 49) M.Ismail, N. Hassan, and S. Saleh Bafjaish, "Journal of soft computing and data mining comparative analysis of naive bayesian techniques in health-related for classification task," J. Soft Comput. Data Min., 1 (2) 1-10 (2020) doi:10.30880/jscdm.2020.01.02.001
- 50) K.Maswadi, N.A. Ghani, S. Hamid, and M.B. Rasheed, "Human activity classification using decision tree and naïve bayes classifiers," Multimed. Tools Appl., 80 (14) 21709-21726 (2021) doi:10.1007/s11042-020-10447-x
- 51) A.J.Wilson, B.S. Lakeland, T.J. Wilson, and T. Naylor, "A naive bayes classifier for identifying class ii ysos," Mon. Not. R. Astron. Soc., 521 (1) 354-388 (2023) doi:10.1093/mnras/stad301
- 52) S.Dwiki, "Development of environmental policy in indonesia regarding mining industry in comparison with the united states and australia : the lesson that can be learned," Evergreen, 5 (2) 50-57 (2018) doi:10.5109/1936217
Other Papers in This Issue
- Natural Frequency and Damping Properties of Composite Sandwich Materials Manufactured using Vacuum-Assisted Resin Infusion, Vacuum Bagging, and Hand Lay-Up
A. Nugroho et al. (2025) - Assessment of Noise Levels in Working with Welding and CNC Milling Machines in Mechanical Workshops of an Academic Institute
A. Kumar, S. Deswal (2025) - Model Predictive and Direct Voltage Control for Standalone DFIG System
P. verma, K. jaladi (2025) - Natural Ventilation Technique: A Bibliometric Analysis of Research Trends
N. Abdul Rahim, P. Szabó, Z. Kovács (2025) - Sorghum Juice from the 'Super 2' Variety: A Promising Carbon Source for Oleaginous Yeast in Biodiesel Production
M. Wattimena et al. (2025) - Development of Optimized Maintenance Scheduling Model for Coal-Fired Power Plant Boiler
N. Fuzi et al. (2025) - Application of CVR in Advanced Distribution Management System using Firefly Optimization
C. Prajapati, S. Chanana (2025) - The Influence of Human Factors and Measurements on the Formation of Cybersickness while using Virtual Reality: Systematic Literature Review
T. Wijayanto, C. Hasibuan, B. Hartono (2025) - Multi-band Series-Fed Millimeter Wave Array Antenna with LP and CP Characteristics for 5G Applications
P. B. G. et al. (2025) - Comparative Performance Analysis of a PCM-based Solar Dryer under Natural Air Circulation Conditions
R. Jessam et al. (2025) - Investigation of the Thermal and Surface Properties of Glass-Carbon Hybrid Fiber Epoxy Composite
M. Hasin et al. (2025) - Residual Energy and Quality of Service Parameters based Optimization of Congestion-Aware Machine Learning Algorithms
S. HASSIJA, S. Sikka, M. Vijarania (2025) - Forging the Future: Exploring Aluminium AA-6061 Composites through Stir Casting for Advanced Applications and Future Innovations
V. sharma et al. (2025) - Shaping Atmanirbhar Bharat (Self-Reliant India) through Atmanirbhar Nari (Self-Reliant Women): A Roadmap for Empowering Women-Led MSMEs through ICT, Financial Access, and Skill Development
P. Rathi et al. (2025) - Novel Decentralized Solar-DC Systems for Community Energy Self-Sufficiency: A Validated Case Study
R. Oza, K. Mehta, A. Bavarva (2025) - Synthesis of Biodegradable Tissue Paper Comprised of Cellulose Isolated from Rice Straw Waste and Chitosan: Characterizations and The Effect of Chitosan Concentrations
E. KUSRINI et al. (2025) - SMES Supported AGC Performance Evaluation of Multi Machine Multi Area Power Systems
K. Pandey et al. (2025) - Automated Mangrove Detection Method using Combined Machine Learning and Mangrove Index over Indonesia
R. Brahmantara et al. (2025) - A Modal Analysis-Based Cloud-Shaped Flexible Two-Element CPW-Fed Antenna for 5G Wireless Applications
D. John et al. (2025) - Opportunity of Smart Aquaculture and Eco-Farming Integration in POME Bioremediation and Phycoremediation System for Environmental Sustainability
T. Handayani et al. (2025) - Characteristics of Nitrogen and Sulfur Double Doping in Mahogany Wood-Based Porous Carbon for Potential Carbon Capture Application
A. Aprilia et al. (2025) - Machinability Studies on Aluminium-Silicon Carbide-Graphite Hybrid Composites: A Focus on Drilling with HSS Tool
B. Nithyananda et al. (2025) - Simple Hydrothermal Method for One-Dimensional Synthesis of Al-Doped ZnO for an Organic Dye-Based DSSC Application
H. pujiarti et al. (2025) - The Impact of Covid-19 on Small and Medium Enterprises in Bangladesh
H. Uddin, M. Usman (2025) - Evaluating Green Marketing Strategies: Consumer Perceptions and Sustainability in Brand Development
S. Mushtaq, B. Shameem, V. Rana (2025) - A Review on Recent Development and Future Perspective of Nanofluid Utilization in Automotives
S. Gupta, S. Kumari (2025) - Investigating the Impact of Chromium and Titanium in Mechanical and Corrosion Properties of Iron Alloy Coating Materials Deposited via HVOF
R. Sharma et al. (2025) - Automated Steel Surface Defect Detection using Optimized Cascaded CaffeNet Region Network
S. Kesavan et al. (2025) - Optimization of 3D Printing Process Parameters for Improving the Mechanical Behavior of Honeycomb-Core Sandwich Panels
W. Sari, N. Marin (2025) - Phasor Measurement Unit based Fault Detection using Tellegen's Theorem in Geographically Zoned Power Systems
S. Kumar et al. (2025) - Exploring the Behavioral and Psychological Impacts of Smartphone Addiction on Online Gamers: A Quantitative Study
R. Brando et al. (2025) - Gain Enhancement of Star-Shaped Antenna using FSS as Reflector for C-Band Vehicular Communication Systems
C. Sereddy, U. Yalavarthi, T. Boddapati (2025) - Optimizing Frequency Stability in Interconnected Systems with Renewable Energy and EV Integration
N. Kumar et al. (2025) - Measuring Lubricant Concentration in the Mixture with Refrigerant: A Comprehensive Review
I. Sameen et al. (2025) - Industrial Cluster with System Dynamic Approach to Improve Competitiveness: Study on the Micro- and Small-scale Ethanol Industry in Sukoharjo, Indonesia
J. Iskandar et al. (2025) - Extraction of Valuable Elements from Industrial Waste in the Kyrgyz Republic Based on the Process of Electrophysical Ionization
T. Ibraimov et al. (2025) - Transformation of Production Systems in Azerbaijan through Green Economy Principles
A. Alakbarov et al. (2025) - Optimizing Process Parameters in Plastic Injection Molding using the Taguchi Method: A Focus on Minimizing Defects and Improving Product Quality
R. Kumar, K. Bairwa (2025) - Desalination of Groundwater to Preserve Animal Health using a Natural Mineral Sorbent from Western Kazakhstan
S. Satayeva et al. (2025) - Design, Manufacturing, and Experimentation of an Innovative Efficient Energy Harvesting Suspension System
N. Nguyen, D. Do, D. Le (2025) - Modification of Weighted Aggregated Sum Product Assessment Method to Improve Objective Weighting Accuracy in Multi-Criteria Decision Making
M. Mesran et al. (2025) - A New Approach to Weight Allocation in Multi-Objective Optimization on the Basis of Ratio Analysis (MOORA) for Fair Decision Making
D. Desyanti et al. (2025) - Eco-Friendly Pavement Solutions: Geopolymer Concrete with Recycled Aggregates and Geobead Fillers
M. Irnawan, Y. Zaika, A. Munawir (2025) - A Review of Hybrid Nanofluids: Emerging Trends and their Role in Enhancing Parabolic Trough Concentrators Performance
V. Rathore, S. Gupta (2025) - Improved EfficientNetB4 Attention Model for Multi-Disease Detection In Healthcare
D. Kumar, U. Garg, A. Kumar (2025) - Multi-Objective Optimization Approach for Optimizing the Performance of Double-Stage and Lapple Cyclone Separator
A. Aswin et al. (2025) - Sustainable Development and Environmental Journalism: Implementing Societal Progress in Kazakhstan
A. Alimzhanova et al. (2025) - Effect of SiC and B₄C Reinforcements on the Structural and Mechanical Properties of Aluminum Composites Fabricated by Spark Plasma Sintering
S. T et al. (2025) - Mathematical Modeling of Fluidized Bed Drying System: Review and State of the Art
H. Chen et al. (2025) - Extending Legitimacy Theory for Sustainable Business Performance through the Lens of Green Innovation and Financial Synergy
P. Nguyen, B. Khoa (2025) - Thermo-Hydraulic Performance Analysis of a Microchannel Flat-Tube Heat Exchanger with Finned Enhancements
T. Dang, H. Nguyen, K. Thu (2025) - Numerical Simulation of a Multi-Rotor Diffuser Augmented Wind Turbine System by Flux Reconstruction Method
T. Liang, C. Hu, S. Watanabe (2025)









Creative Commons Attribution 4.0 International
