Understanding public perceptions of sustainable agriculture: A social media-based sentiment analysis study
Abstract
In the contemporary context of escalating global concerns regarding food security and climate change resilience, understanding public sentiment toward sustainable agriculture is crucial for shaping effective extension policies and farming practices. This research explores the efficacy of sentiment analysis in mining social media data to gauge public attitudes toward sustainable farming initiatives. This study employs a mixed-method approach by utilizing the VADER (Valence Aware Dictionary and Sentiment Reasoner) model to analyze comments extracted from social media platforms (Facebook and YouTube). The research utilizes a five-stage integrated framework- crawling, preprocessing, word weighting, model building and classification to transform unstructured social media discourse into actionable sentiment scores. Our study reveal that public discourse is predominantly neutral but positively inclined, mirroring broader social media trends where positive sentiments are often dominated by themes of food security and climate change. Significant variations in platform-wise interaction pattern were observed. You tube demonstrated stronger emotional support and educational engagement with a 38.8% positive sentiment rate, whereas Facebook functioned primarily as a technical discussion forum for practical inquiries with 83.20% neutral sentiment. This study further shows broad public acceptance with limited negative sentiment, possibly due to economic uncertainty and policy distrust. By providing insights into human perceptions of eco- friendly technologies, this research contributes to the broader discourse on leveraging AI and Natural Language Processing to accelerate the adoption of sustainable agricultural practices.
Full Text
Tables and figures are in the full-text PDF.
Introduction
Agriculture has long remained the backbone of most developing economies, serving as a primary source of livelihood, employment and food security, particularly for rural populations (Pawlak and Kotodziejczak, 2020; Chiaka et al., 2022) [10,4] . Over the past half century, global food production more than tripled during the green revolution, demonstrating the transformative potential of agricultural innovation and technological advancement (Wang et al., 2022) [17] . Despite this remarkable progress, agriculture today faces multiple and interconnected challenges that threaten its capacity to meet present and future human needs. These challenges include climate change, biodiversity loss, land degradation through soil erosion, salinization and pollution, depletion of water resources, rising production costs, declining farm numbers, rural poverty and population decline (Velten et al., 2015) [16] . Such pressures have intensified the global need for more resilient and environmentally responsible agricultural systems. The concept of sustainable agriculture emerged prominently following the publication of the "Our Common Future" in 1987, which introduced the broader framework of sustainable development (Tait & Morris, 2000) [15] . Sustainable agriculture seeks to balance ecological integrity, economic viability and social welfare in agricultural production systems. It has emerged as a central pillar in global discussions on food security, environmental conservation, and climate resilience. International frameworks such as the Food and Agriculture Organization (FAO) sustainability principles and the United Nations Sustainable Development Goals (SDGs), particularly SDG 2 (Zero Hunger) and SDG 12 (Responsible Consumption and Production), emphasize the transition toward environmentally sound and socially equitable farming systems. According to Lewandowski et al. (1999) [7] , sustainable agriculture refers to the management and utilization of agriculture ecosystems in a way that maintain biodiversity, productivity, regeneration capacity and ecosystem vitality while ensuring their ability to function effectively over time. This approach emphasizes meeting current ecological, economic and social needs without compromising the capacity of future generations to meet their own requirement. Similarly, Sauvenier et al. (2005) [14] highlighted that sustainable agriculture encompasses environmental, economic and social functions that contribute positively to both present and future generations. Thus, sustainable agriculture is not solely concerned with www.extensionjournal.com environmental conservation but also with maintaining social equity, rural development and long-term economic sustainability at local, national and global levels. In recent years, rapid advances in sciences and technology have created new opportunities to address the growing challenges associated with sustainable agriculture. Digital transformation in agriculture has significantly improved productivity, profitability, resource-use efficiency and environmental conservation (Saiz-Rubio & Rovira-Más, 2020) [12] . Modern agricultural systems increasingly rely on interdisciplinary knowledge integrating information science, computer and software engineering, environmental science, remote sensing, crop and science, geographic information system (GIS) and global positioning systems (GPS) (Sarker et al., 2019) [13] . The integration of advanced technologies such as artificial intelligence (AI), Internet of Things (IoT), sensors, satellite imagery, big data analytics, machine learning (ML) and deep learning (DL) has revolutionized agricultural management practices and decision-making processes. These technologies enable precision farming, real-time monitoring, predicative analytics and efficient resource management. Moreover, the application of AI and ML-based systems is increasingly viewed as essential for addressing contemporary agricultural challenges arising from climate change, resource scarcity and rapid population growth. Alongside technological transformation, social media platforms have emerged as influential spaces for public discourse, opinion formation and knowledge exchange related to agriculture and sustainability. Public perceptions and attitudes shared through digital platforms can significantly influence awareness, adoption and support for sustainable agricultural practices. Social media generated data therefore provide valuable opportunities for understanding societal perspectives toward sustainability related issues in agriculture. In contrast to many earlier studies that primarily relied on surveys or secondary datasets, the present study explores public perceptions of sustainable agriculture using primary data extracted from social media comments and discussions. The study employs sentiment analysis techniques using Python-based libraries i.e., VADER and NLP (natural language processing) to classify public opinions into positive, negative and neutral sentiments regarding sustainable agriculture. By analyzing public sentiment toward sustainable agriculture, this research aims to provide a comprehensive understanding of societal attitudes including the perceived benefits, opportunities and positive impacts associated with sustainable agricultural practices as well as potential concerns, criticisms and barriers reflected through negative sentiments. Understanding these perceptions is important for policymakers, researchers, extension professionals and agricultural stakeholders seeking to strengthen sustainable agriculture ecosystems and improve public awareness and engagement. Furthermore, the findings are expected to support evidence-based decision-making and contribute to the development of more effective strategies for promoting sustainable agricultural practices in the digital era.
Review of Literature
The transition toward sustainable agriculture is no longer viewed solely through a technical or economic lens. It is increasingly recognized as a social process which is mediated by public perception. Recent studies indicates that digital discourse on platforms such as X, Facebook and YouTube significantly influences policy adoption and market demand (Maulida and Devi, 2023) [9] . This literature review synthesizes the current state of research by examining the thematic trends in public statement, the evolving methodologies used to capture them and the socioeconomic factors that influence community acceptance. Current research reveals a predominantly positive global outlook toward sustainability, yet identifies critical points of resistance. Maulida and Devi (2023) [9] in a study on mining of netizens opinion on sustainable agriculture found that 68.5% of tweets expressed positive sentiment, primarily associated with "food security" and "climate change". However, a significant 9.1% negative sentiment was also identified, rooted in concerns over "private farmland" and the economic burden placed on "farmers." This suggests that while environmental goals are broadly supported, specific socio-economic anxieties act as a barrier to universal acceptance. Similarly, Ma et al. (2025) [8] utilized RoBERTa-framework for public sentiment analysis on green consumption and found that 53.91% of sentiments were positive. He emphasized that regional disparities play a major role in how these initiatives are received. These findings highlight that public sentiment acts as a mediator for policy interpretation. Positive attitudes align with practices offering tangible risk mitigation, while negative attitudes arise when policies appear to clash with stewardship identities or economic survival. Anderson, Sarkar and Kelley (2024) [1] demonstrated the efficacy of lexicon-based models like VADER and advanced machine learning models like BERT in transforming unstructured social media data into structured sentiment scores with an accuracy of 92% in classifying public sentiment toward sustainability initiatives. The evolution of this field now also involves addressing complex linguistic challenges such as sarcasm, bias and privacy while exploring multi-model analysis. In this context, Poecze, Ebster and Strauss (2018) [11] highlighted that "richer" media formats, such as photos elicit significantly more engagement (likes and shares) than re-posted videos or external links, suggesting that the communication medium is as vital as the message itself. Practical applications of these techniques, such as Alzahrani and AlGhamdi (2025) study of agricultural festivals in Saudi Arabia, further illustrate how sentiment detection can guide sustainable rural planning and cultural heritage promotion. In conclusion, the literature establishes that a successful transition to sustainable farming requires aligning scientific advancements with the cultural and emotional resonance of the public as captured through high-tech detection across various digital platforms.
Data Collection
The present study adopted a social-media based data collection strategy to examine public perceptions towards sustainable agriculture. User-generated comments were collected from two major digital communication platforms, namely Facebook and YouTube, as these platforms serves as significant spaces for public interaction, agriculture awareness dissemination, and sustainability related discussions. www.extensionjournal.com
The data collection process was conducted over a onemonth period to capture recent and active discourse related to sustainable agriculture practices. A total of 1000 public comments were collected, comprising 500 comments from Facebook and 500 comments from YouTube. The comments were extracted from publicly accessible posts and videos related to sustainable agriculture. The selection of comments was based on the relevance to the research objective and the occurrence of sustainability-oriented keywords.
The study utilized a keyword-driven extraction framework supported by themes derived from the Sustainability Assessment Matrix (SAM). Major thematic categories identified were operationalized through Regular expression (RegEx) pattern-matching techniques during filtering and extraction process. The matrix included the keywords and phrase combinations associated with: sustainable agriculture, organic farming, natural farming, climate resilience, carbon management, soil conservation, biodiversity, eco-friendly technologies, water conservation, regenerative agriculture, environmental protection, green farming, food security, and sustainable resource utilization. The collected dataset included multi-lingual and mixed language comments consisting primarily of English, Hindi, Hinglish and selected regional language expressions. The extracted comments represented diverse forms of public interaction including informational inquiries, experiential narratives, technical discussions, policy related opinions, requests for agricultural guidance and emotional responses toward sustainable farming initiatives. The retrieved comments were stored in structured spreadsheets in csv file format for computational processing and textual analysis. The dataset was subsequently subjected to systematic preprocessing, feature extraction, thematic categorization and sentiment analysis procedures.
Materials and Methods
The study employed a mixed-method research framework integrating Natural Language Processing (NLP), lexiconbased sentiment analysis, thematic extraction, and statistical interpretation to examine public perception of sustainable agriculture through social media discourse. The quantitative analysis enabled techniques to measure the sentiment polarity and engagement trends, whereas the qualitative interpretation facilitated the identification of dominant themes, awareness patterns and public concerns related to sustainable agriculture practices. The methodological framework consisted of five major stages: data acquisition, preprocessing, feature extraction, sentiment analysis, thematic interpretation and statistical analysis. A descriptive research design was adopted to investigate sentiment patterns and thematic structures. The study aimed to identify emotional orientation, informational engagement, thematic emphasis and public interaction behavior within sustainability related discourse.
Stage 1: Preprocessing
Raw social media comments typically contain noise, informal language structures, emojis, hyperlinks, duplicated expressions, punctuation inconsistencies, and multilingual text patterns. Therefore, extensive preprocessing and normalization procedures were conducted before sentiment analysis. Table 1 includes the steps involved in the preprocessing stage. To improve text quality and readability b.
Lowercase Conversion
Converted all text into lowercase format.
To maintain lexical uniformity. c.
Tokenization Split comments into smaller word units or tokens.
To enable word-level analysis. d.
Stop word removal Removed common words such as "the", "is" and "and". To retain meaningful textual content.
e. Lemmatization and Word Normalization
Reduced words to their root forms.
To improve semantic consistency.
f. Emoji and Emoticon Interpretation Retained relevant emojis contributing to sentiment.
To capture emotional intensity.
g. Handling Multilingual and Hinglish Text
Normalized English, Hindi, Hinglish and Kannada comments.
To preserve semantic meaning during analysis h. RegEx-Based SAM Matrix filtering Applied SAM Matrix keywords.
To identify sustainability related themes.
i. Contextual Phrase and Pattern Recognition
Identified lexical variations and mixed language expressions.
To improve thematic a categorization accuracy. Frequency-Inverse Document Frequency (TF-IDF) weighting was applied to identify contextually significant terms while reducing the influence of commonly repeated lexical units. N-Gram modeling techniques, including bigram analysis were utilized to capture phrase level semantics and contextual relationships between words.
Step 3: Sentiment Analysis Procedure This analytical procedure generated polarity scores reflecting the emotional orientation of each comment. Each comment was evaluated across four sentiment dimensions: Positive, Negative, Neutral and Compound sentiment score. The compound sentiment score represented the normalized aggregate emotional intensity ranging between -1 and +1, where +1 indicated strong positive sentiment and -1 indicated strong negative sentiment and values near 0 represented neutral sentiment. Step 4: Thematic identification Thematic interpretation was conducted to identify dominant discussion patterns within sustainability related social media discourse. Recurring keywords, semantic clusters and contextual expressions were analyzed to determine major sustainability reflected in public conversations.
Step 5: Statistical Interpretation Descriptive statistical techniques were employed to interpret sentiment distribution across the dataset. Statistical measures including mean sentiment score, median, standard deviation and compound polarity trends were analyzed to evaluate the emotional orientation of public discourse.
The integrated computational and thematic analytical framework enabled the study to systematically evaluate public perceptions of sustainable agriculture and identify the communication dynamics influencing sustainability-related discourse across social media platforms.
Results and Discussion
Facebook sentiment analysis
The Facebook dataset demonstrated that the majority of comments belonged to the neutral sentiment category, indicating that users primarily utilized the platform for practical discussions, informal exchange and technical inquiries related to sustainable agriculture. Discussions on Facebook were comparatively less emotional and more solution-oriented in nature.
The statistical analysis of Facebook comments included a total of 500 comments related to sustainable agriculture. The dataset produced a mean compound sentiment score of 0.0292, indicating a slight positive inclination in the overall discourse. The median and mode values were both negligible, reflecting the strong dominance of neutral sentiment within Facebook discussion. Furthermore, the standard deviation of 0.1861 indicated comparatively lower variability in sentiment distribution, suggesting that most comments were centered around informational and inquirybased interactions. The findings demonstrate that Facebook users primarily utilized the platform for technical discussions, clarification-seeking behavior and practical implementation-related conversions regarding sustainable agriculture. Positive comments generally reflected appreciation for sustainability initiatives and awareness-building efforts. Expressions such as "Excellent initiative", "very informative" and "Good job" indicated public support for environmentally sustainable farming practices and educational agricultural communication.
Negative sentiment was limited and primarily associated with skepticism regarding government policies, financial feasibility, implementation costs and doubts surrounding the effectiveness of sustainable agricultural reforms. Concerns regarding affordability, subsidy accessibility and long-term economic viability contributed to the occurrence of negative sentiment within the Facebook discourse.
The predominance of neutral sentiment on Facebook suggests that the platform functions primarily as a discussion and advisory space where users seek practical solutions, technical knowledge and implementation-related support rather than emotional engagement. The text-based communication format of Facebook further contributes to analytical and inquiry-driven interaction patterns. Overall findings indicated that although neutral comments remained dominant, the proportion of positive comments was substantially higher than observed in Facebook. Neutral comments primarily included requests for farming guidance, questions related to implementation techniques, irrigation systems, crop productivity, and sustainable farming technologies. Many users utilized Youtube videos as educational resources to understand agricultural practices and sustainability concepts.
Positive comments demonstrated strong appreciation toward educational agricultural content and sustainability awareness initiatives. Expressions such as "Amazing work", "Very informative", "Thank you", and "Great initiative for farmers" reflected high audience satisfaction and emotional connection with the content. Negative sentiment on YouTube remained minimal and was largely associated with concerns regarding policy implementation, economic feasibility, misinformation, and practical challenges associated with sustainable farming adoption. However, the comparatively low proportion of negative comments suggests broad public acceptance of sustainable agricultural practices. The higher positive engagement observed on YouTube may be attributed to the platform's visual and interactive content format. Demonstration-based videos, field visuals, machinery usage demonstrations, and emotional involvement, thereby encouraging constructive participation and supportive engagement.
Overall Cross-Platform Sentiment analysis
The combined sentiment analysis of Facebook and Youtube comments indicates that public discourse regarding sustainable agriculture is predominantly neutral with a considerable positive inclination. The findings suggest that social media users actively engage with the content primarily for informational and educational purposes while simultaneously expressing supportive attitudes towards environmentally sustainable farming practices. The analysis of 1000 comments revealed that neutral sentiment constituted the largest proportion of discourse, accounting for 70% of the total comments, indicating dominant informational and discussion-oriented interactions. Positive sentiment represented 25.7% of the comments, reflecting supportive and appreciative engagement toward sustainable agriculture initiatives, whereas negative sentiments accounted for only 4.3%, indicating limited skepticism and comparatively low resistance towards sustainably oriented farming concepts. Neutral sentiment emerged as the dominant category across both platforms, and the overall public perception towards sustainable agriculture was observed to be favourable and educational in nature. The dominance of neutral sentiment suggests that many individuals are still in awareness-building and knowledgeacquisition stage regarding sustainable agriculture. Users frequently engaged in technical inquiries, implementationrelated discussions, and clarification-seeking behaviour www.extensionjournal.com regarding organic farming, eco-friendly technologies, irrigation practices and resource conservation methods. The substantial proportion of positive sentiment demonstrates increasing public recognition of the importance of environmentally sustainable farming systems. Positive engagement was primarily associated with appreciation for educational agricultural content, sustainability awareness initiatives, and farmer-oriented guidance. The comparatively low percentage of negative comments suggests that sustainable agriculture is generally viewed positively across digital communities. Most negative perceptions were associated with concerns regarding implementation costs, subsidy, accessibility, policy effectiveness and financial feasibility of sustainable farming practices. Overall, the findings indicate that social media platform function not only as communication channels but also as participatory learning environments where users actively exchange agricultural knowledge, farming experiences, technical guidance, and sustainability-related information.
Discussion
The findings of the study demonstrate that sustainable agriculture is generally perceived positively across social media platforms, with neutrality dominating due to the informational and exploratory nature of online discussion. The prevalence of neutral comments indicates that many users are still in the process of understanding sustainable agricultural concepts, technologies and implementation strategies. The substantial positive sentiment observed, particularly on Youtube, reflects increasingly public awareness regarding environmental sustainability, organic farming, climate resilience and eco-friendly agricultural practices. Educational agricultural content appears to play a critical role in encouraging constructive engagement and shaping favorable public attitudes towards sustainability-oriented farming systems. The stronger positive engagement on Youtube can largely be attributed to the platform's visual communication format. Videos demonstrating farming practices, irrigation systems, machinery usage and field-level implementation likely enhanced audience comprehension and emotional involvement. Creator interaction through replies, pinned comments and acknowledgement mechanism may have further strengthened positive community participation. On the other hand, Facebook discussions revealed that users were more focused on practical implementation concerns, technical clarification, policy-related inquiries and economic feasibility. This indicates that although awareness regarding sustainable agriculture exits, users continue to seek reliable information regarding execution, affordability, subsidy mechanisms and long-term benefits. The limited proportion of negative sentiment across both platforms suggests relatively low public resistance toward sustainable agriculture. However, concerns related to policy distrust, financial burden, implementation complexity and uncertainty regarding agricultural reforms contributed to the emergence of negative perceptions among a minority of users. The thematic findings further highlight that social media platforms function as influential agricultural communication ecosystems where farmers, agricultural experts, policymakers and sustainability advocates can effectively disseminate information, address misconceptions, promote eco-friendly farming techniques and encourage participatory learning communities. In conclusion, the findings confirm that digital communication platform possess substantial potential for strengthening sustainability awareness, improving agricultural outreach and accelerating public acceptance of environmentally sustainable farming practices.
Conclusion
Integrated computational analysis of 1000 comments reveals that public perception of sustainable agriculture is predominantly neutral (70%), with a significant positive inclination (25.7%) and minimal negative sentiment (4.3%). A clear platform distinction emerged as Facebook acts as a technical forum with an 83.20% neutral sentiment rate focused on practical inquiries, while Youtube fosters higher emotional and educational engagement with a 38.8% positive sentiment rate. While the high neutral volume suggests the public is still in a knowledge-acquisition phase, the low resistance indicates broad acceptance. Negative views are largely restricted to concerns regarding implementation costs and policy distrust rather than the farming practices themselves. Ultimately, these results demonstrate that leveraging AI-driven sentiment analysis can help tailor extension strategies using visual media for advocacy and text platforms for technical support to accelerate the transition systems.
References
- Anderson T, Sarkar S, Kelley R. Analyzing public sentiment on sustainability: a comprehensive review and application of sentiment analysis techniques. Natural Language Processing Journal. 2024;8:100097.
- Maulida S, Devi A. Mining netizen's opinion on sustainable agriculture: sentiment analysis of Twitter data. Business and Sustainability. 2023;2(1).
- Pawlak K, Kołodziejczak M. The role of agriculture in ensuring food security in developing countries: considerations in the context of sustainable food production. Sustainability. 2020;12(13):5488.
- Poecze F, Ebster C, Strauss C. Social media metrics and sentiment analysis to evaluate the effectiveness of social media posts. Procedia Computer Science. 2018;130:660-666.
- Saiz-Rubio V, Rovira-Más F. From smart farming towards Agriculture 5.0: a review on crop data management. Agronomy. 2020;10(2):207.
- Sarker MNI, Wu M, Hossin MA, Shouse RC. Promoting digital agriculture through big data for sustainable farm management. International Journal of Innovation and Applied Studies. 2019;25(4):1235-1240.
- Sauvenier X, Valekx J, Van Cauwenbergh N, Wauters E, Fruytier H, Hermy M, et al. Framework for assessing sustainability levels in Belgium agricultural systems - SAFE. Belgium: Belgium Science Policy; 2005.
- Tait J, Morris D. Sustainable development of agricultural systems: competing objectives and critical limits. Futures. 2000;32(3-4):247-260.
- Velten S, Leventon J, Jager N, Newig J. What is sustainable agriculture? A systematic review. Sustainability. 2015;7(6):7833-7865.
- Wang D, Saleh NB, Byro A, Zepp R, Sahle-Demessie E, Luxton TP, et al. Nano-enabled pesticides for sustainable agriculture and global food security. Nature Nanotechnology. 2022;17(4):347-360.
How this paper connects to the literature. Drag to explore, click any node to open that paper.
