Next Article in Journal
Effects of Sleep Deprivation on Functional Connectivity of Brain Regions after High-Intensity Exercise in Adolescents
Previous Article in Journal
Design and Innovative Integrated Engineering Approaches Based Investigation of Hybrid Renewable Energized Drone for Long Endurance Applications
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Using Social Media Analytics and Machine Learning Approaches to Analyze the Behavioral Response of Agriculture Stakeholders during the COVID-19 Pandemic

1
Department of Computer Science, Guru Nanak Dev University, Amritsar 143005, India
2
School of Computer and Information Sciences, University of Cumberlands, Lebanon, TN 37087, USA
3
Department of Computer Engineering and Technology, Guru Nanak Dev University, Amritsar 143005, India
*
Author to whom correspondence should be addressed.
Sustainability 2022, 14(23), 16174; https://doi.org/10.3390/su142316174
Submission received: 29 August 2022 / Revised: 10 November 2022 / Accepted: 11 November 2022 / Published: 3 December 2022

Abstract

:
COVID-19, over time, has spread around multiple countries and has affected a large number of humans. It has influenced diverse people’s lives, consisting of social, behavioral, physical, mental, and economic aspects. In this study, we aim to analyze one such social impact: the behavioral aspects of agriculture stakeholders during the pandemic period in the Indian region. For this purpose, we have gathered agriculture-related tweets from Twitter in three phases: (a) initial phase, (b) mid-phase, and (c) later phase, where these phases are related to the period of complete lockdown implemented in India in the year 2020. Afterward, we applied machine-learning-based qualitative-content-based methods to analyze the sentiments, emotions, and views of these people. The outcomes depicted the presence of highly negative emotions in the initial phase of the lockdown, which signifies fear of insecurity among the agriculture stakeholders. However, a decline in unhappiness was noted during the later phase of the lockdown. Furthermore, these outcomes will help policymakers to obtain insights into the behavioral responses of agricultural stakeholders. They can initiate primitive and preventive actions accordingly, to tackle such issues in the future.

1. Introduction

Coronaviruses (https://www.who.int/health-topics/coronavirus/coronavirus (accessed on 24 April 2020) (CoV) are a large family of viruses that cause illnesses ranging from the common cold to more severe diseases, such as Middle East respiratory syndrome (MERS-Cov) and severe acute respiratory syndrome (SARS-CoV). A novel coronavirus (nCoV) is a new strain that has not been previously identified in humans. The first case of the virus was reported in Wuhan City in China in December 2019 [1]. Within months, the virus was discovered in almost every country around the globe. The only way to limit the spread of the virus is to implement social distancing, as the primary means of this virus’s spread is from one person to another through the respiratory system (https://www.who.int/news-room/commentaries/detail/modes-of-transmission-of-virus-causing-covid-19-implications-for-ipc-precaution-recommendations (accessed on 24 April 2020)). To reduce the spread of the virus, the governments of almost every country announced lockdowns in their respective countries to stop people going out, keeping them isolated from others. The Indian government took this initiative in earlier stages as compared to other countries [2]. The lockdown in India (https://en.wikipedia.org/wiki/COVID-19_pandemic_lockdown_in_India (accessed on 24 April 2020)) started on 24 March 2020, when the first few cases of the virus were discovered in the country. From past pandemics, it was established that quarantines and panic have an impact on human activities and economic growth [3,4,5]. This effect also occurs in agricultural activities [6]. When there is an outbreak of infectious disease, there is also an increase in hunger and malnutrition [7,8]. An imbalance between production, consumption, supply, and demand occurs [9].
Agriculture is a vital part of the survival of humans as most of the food humans eat is related to this field [10]. Every part of society is, in some way, associated with the farming sector. Both human genders are empowered in agriculture [11]. The agricultural sector suffered during the lockdown period [12]. The situation worsened as the disease progressed, making movement restrictions more and more stringent, causing labor shortages for the harvest, and difficulties for farmers to bring their products to market [13]. The shortage of fertilizers, sprays, and machinery and the unavailability of agricultural experts made the situation harder for farmers and resulted in less production and delay in bringing crops to the market [14]. Furthermore, the delay in planning and preparation for tackling the COVID-19 pandemic caused a massive setback to India’s economy as well as enormous hardships for the working-class people of the country.
Our research is focused on exploring the social media aspects of the community and finding the answers to the following research questions:
i.
Analyzing the influence of COVID-19 on the agricultural sector and its stakeholders.
ii.
Is this impact similar in each region of the country?
iii.
Is the related community happy with the government’s decisions during the lockdown period?
For this purpose, we used social media as the source of the information required during our research. Social media plays an important role here as people use it to express their feelings. The expression of anguish, as well as pleasure, can act as a measure of acceptance or rejection of certain ordinances. Twitter is the most used and reliable source of information that we figured out in our work [15,16]. We collected tweets during the lockdown period daily, considering different Indian geolocations. After pre-processing the tweets, we applied sentiment analysis to figure out the emotions of the authors. Furthermore, from the obtained results, we speculated the overall emotion of the country during the three phases of the lockdown. Next, we narrowed our research region-wise and figured out which region suffered most from the consequences of COVID-19. The first part of the paper presents the introduction of the research topic. We introduce the aim of our research and a few basic terms that are used in this writing. The second part of the paper contains related work, where we discuss the work associated with the same field as our research work. The third part of the paper is about research materials and methods used for analysis purposes. It also contains the process of data collection, which further includes data pre-processing and a graphical representation method of frequent words using a word cloud. The sentiment analysis and the clustering of the data are explained in the proceeding sections. The fourth part of the paper contains the results and analysis of our findings. Furthermore, elaborative discussions for the obtained outcomes of this study are presented. The last section concludes the paper and specifies the future scope of the conducted work.

2. Related Work

COVID-19 has not been previously encountered in the history of humankind. Therefore, no prior information about the spread of the virus, its effects on humans, and its severity were recorded before its actual outbreak. In their recent study, Dev and Sengupta [17] analyzed the economical disturbance caused by the sudden impact of COVID-19. Furthermore, they scrutinized the policies announced by the central governments and RBI (Reserve Bank of India) to neutralize the economic shock. Rawal [18] evaluated the economical disturbance created by COVID-19, specifically in the rural economy and the agriculture sector. The author pointed out that the sudden shock of the lockdown in the country caused a serious blow to India’s economy as well as enormous hardships to the working-class citizens of the country. Siche [12] analyzed the impact of COVID-19 on the agriculture and food supply sectors. The lockdown situations caused by the virus created an imbalance between production, supply, and demand [19]. Such situations substantially affected the most vulnerable population which is completely dependent upon agricultural incomes.
The agricultural sector was not the only one that was impacted by COVID-19; other sectors were also affected. Pokhrel and Chhetri [20] in their research analyzed the impact of the pandemic on teaching and learning. The closure of schools, institutions, and other teaching institutes had impacted around 94% of the student population worldwide. Verma and Prakash [21] studied the effects of COVID-19 on the environment and society. Apart from the other major sectors who were negatively affected by the virus, the environment was one sector that yielded favorable outcomes from the lockdown. The travel restrictions imposed during the pandemic lockdowns benefited the environment regarding contaminated pollution and other hazardous factors.
Technology played a vital role during the pandemic phase, from diagnosing the positive cases of COVID-19, the impacts of COVID-19, analysis of recovery rates, and various statistical operations. Many machine learning approaches are used to study the prevailing situation. Dairi [22] provided a comparative analysis of machine learning approaches used for forecasting the transmission of COVID-19. Several deep learning techniques, hybrid convolutional neural networks–long short-term memory, CNN, and LSTM methods were analyzed during this research work. These techniques can be utilized in various applications concerning COVID-19 identification and diagnosis.
In this study, our focus is on analyzing the people’s responses posted in the form of tweets. We aim to measure the emotions of tweets, thus providing insightful information depicting the influence of COVID-19 on the Indian agriculture sector. Furthermore, we also perform topic modeling to group the tweets based on their context similarity.

3. Materials and Methods

The main objective of the paper was first to gather COVID-19-related tweets and then figure out the sentiments using the information obtained from the tweets. For this purpose, we used the following methodology as shown in Figure 1.
The whole methodology is centered around the sentiment analyzer. The job of the sentiment analyzer is explained in Algorithm 1.
Algorithm 1: Sentiment Analyzer
Start
1. Create a Twitter Developer Account and Application with a set of permissions.
2. Use Twitter API to collect tweets based on Indian geolocation.
3. Pre-process the tweets:
  (a) Removing symbols and numbers.
  (b) Removing punctuation and English stopwords.
  (c) Removing URLs and whitespaces.
  (d) Removing keywords used to search for tweets.
  (e) Removing multiple tweets from a single person.
4. Performing sentiment analysis.
  (a) Use Meaning Cloud extension for polarity analysis.
  (b) Use R libraries for emotion analysis.
5. Calculate the score and plot it onto a bar graph.
6. Perform K-means clustering to discover the clusters in the data.
End
The initial step of the algorithm is to create a Twitter Developer account which needs permission from the Twitter development team. It may also require the reason for the signup. Once the permissions are granted, the next step is to create a Twitter Application Interface that is used to fetch the tweets. Once the tweets are fetched, the next task is to pre-process them, so the results should be more refined and accurate. Afterward, the sentiment analysis method is applied to calculate the sentiment scores and figure out the emotions during the concerned periods. Additionally, we also use the LDA Topic Modeling technique to discover the prominent topics inside the data. The details of the above steps will be provided in the subsequent section.

3.1. Data Collection

The most trustable social media site, Twitter is used for data collection purposes, as Twitter users are believed to be more generous [23]. A Twitter API is used to collect tweets over a specific period [24]. The tweets were collected based on the hashtags (#) which act as keywords for tweet collection. All the hashtags, such as #agriculture, #farmers, #covid19, #AgriTech, #Indianfarmers, #COVID-19, and a few more similar hashtags that are based on agriculture and COVID-19-related topics, were used in the fetching process of the data from Twitter. The requests were generated through Twitter API using the R language as a base (R Core Team 2013). The R language used the Twitter library to interact with the Twitter API. The results obtained from the API request contain tweet ID, tweet text, creator ID, replyToID, statusSource, screenName, retweetCount, isRetweet, longitude, latitude, Date, and Time of the tweet [25]. Since we majorly focused on obtaining the search results from the Indian region, we set the geolocation of tweets to the Indian radius only [26]. We collected around 36,149 tweets from 24 March 2020 to 10 June 2020. The tweet collection process was divided into three phases: first was the initial phase of the lockdown in the country, the second phase was in the middle of the lockdown, and the third phase was when the government gave some relaxation during the lockdown. The main reason for this time division was to obtain a genuine analysis of the COVID-19 impact on agriculture and obtain the overall results. The number of tweets collected daily for different periods is given below in Table 1.

3.2. Data Pre-Processing

Data cleaning is a very important step to obtain accurate results [7,27]. We collected tweet data in the raw form, which included unwanted numbers, special symbols, hyperlinks, and tags that were of no use in the process of the sentiment analysis and needed to be removed to obtain the valuable text. The data pre-processing process included the following steps:
i.
Number removal: Only characters’ data had some significance in the sentiment analysis. The numbers did not represent any emotion of human behavior so the numerical data needed to be removed.
ii.
Removal of special symbols: special symbols such as (@ # ˆ * “/: ; > , < \ | ?) were removed in the data-cleaning process which may have led to inaccurate results.
iii.
Keyword removal: the keywords which were used to fetch the tweets needed to be removed as they certainly appeared in every tweet and may have distorted the accuracy of the results.
iv.
Punctuation removal: there was a need for the removal of punctuation as we were only focused on meaningful words that showed some emotions in the tweets.
v.
Hyperlink removal: the URL links also had to be removed from the tweet data as they did not show any kind of emotion and only led to the inaccuracy of the data.
vi.
Stopword removal: English stopwords are the most repetitive words in the text, their need is only to support the sentence and they do not show any type of sentiment hence they may also get removed in this processing of the data.
vii.
Removal of extra white spaces: Since we removed the unwanted data from the tweet, there were holes from where the data were deleted. These extra spaces would distort the meaning of the sentences; therefore, any extra white spaces in the text also had to be removed.
viii.
Removal of multiple tweets from a single person: If we included all the tweets of a single person, that may have led us to unbiased results; therefore, we kept only a single tweet from every unique person. From the list of 36,149 tweets, a total of 2310 such tweets were deleted and we were left with 33,839 unique tweets.
ix.
Removal of bot-generated tweets: There is a wide range of accounts existing on Twitter that are not handled by humans; rather, they are controlled using automated computer scripts normally known as bots (https://www.buzzfeednews.com/article/lamvo/twitter-bots-v-human (accessed on 6 November 2022)). The tweets generated by such accounts could influence the overall sentiments of the entire dataset, so it became necessary to identify and remove the tweets that appeared to be generated by the bots. There is no single method to identify such tweets but a group of steps may help in this process; it involves identifying the number of tweets generated by an account, all tweets following a fixed pattern, weird profile information, and reposting of the tweets.
One of the examples of before and after applying the above-mentioned steps of pre-processing is shown in Table 2.

3.3. WordCloud

Word clouds are the graphical method to represent the most frequent words that appear in a source text [28]. The most repetitive word in the document appears larger as compared to others in the illustration. This type of visualization can assist evaluators with exploratory textual analysis by identifying words that frequently appear in a set of interviews, documents, or other texts. Here, we used WordCloud to identify the most commonly occurring word in the tweets. The result of the WordCloud implementation is shown in Figure 2.

3.4. Sentiment Analysis

The sentiment analysis process was applied after the pre-processing of the data. Sentiment analysis is the process of extracting the meaning and the emotions out of a sentence [29]. This helps us to understand the sentiment of the person who writes the text, and what he thinks about a certain topic. In the first part of the sentiment analysis, we tried to figure out the positive and negative emotions of the text, and for that purpose, we used MeaningCloud (https://www.meaningcloud.com/products/exceladdin (accessed on 27 May 2020)) API by adding it as an extension in MS Excel. This API analyzes the text and figures out the sentimental feeling of the text with the help of the keywords used inside the text. The inputted text is scrutinized to evaluate if it expresses a positive/negative/neutral sentiment; for this purpose, the local polarity of the various lines and sentences in the document is figured out and the relationship between them is analyzed, which results in a global polarity index for the whole text (https://learn.meaningcloud.com/developer/sentiment-analysis/2.1/doc/what-is-sentiment-analysis (accessed on 27 May 2020)). The sentimental feeling results are divided into five categories: highly positive, positive, neutral, negative, and highly negative. This type of analysis is known as polarity sentiment analysis [16]. Another type of sentiment analysis is emotion sentiment analysis which figures out the emotion behind the tweet [30]. For emotion analysis, we used R libraries. These libraries have pre-trained models for emotion analysis. However, if needed, we could also train the default models with our dataset. In our research methodology, we categorized human emotions into 8 different types (anger, anticipation, disgust, fear, joy, sadness, surprise, and trust).

3.5. Topic Modeling

Topic modeling is a mechanism for recognizing and extracting suitable topics from text documents [31]. There are two widely used algorithms available for performing topic modeling: LDA (Latent Dirichlet Allocation) and LSA (Latent Semantic Analysis). We used the LDA algorithm in our research because of its ability to extract more meaningful and promising results [32]. Figure 3 shows the overall layout of the LDA model. Furthermore, Algorithm 2 provides the descriptive steps involved in the implementation of the LDA model.
The visualized format of the extracted outcomes of the LDA algorithm is represented later in the result section. It is important to identify a significant number of topics for the proper implementation of the LDA algorithm [33]. The broadness of the topic can be easily influenced by the value of X (number of topics); working on a large number of topics can cause difficulties in the interpretation of the topics.
Algorithm 2: Topic Modeling Algorithm
1. Start.
2. Assume ‘x’ topics in the document(s).
3. For each document;
Randomly assign each word to one of ‘x’ topics.
4. For each document;
For each word ‘w’
C a l c u l a t e   q ( y x   |   d i )   a n d   q ( w j   |   y x )
Such that;
q ( y x   |   d i ) =   n i x   + N i 1 + X and q ( w j   |   y x ) = m j . x + β j V   m j , x   + V β            
   /* Where n i x = total number of words in ith document in ‘xth’ topic.
        N i = Number of words in ith document.
        m j . x = corpus wide assignment of word w j to xth topic.
        x = number of topics considered.
        V = Vocabulary of the corpus.
        a n d   β = Hyper parameters.
d i is the current selected document among all the documents, yx is the selected topic from the current sentence. */
5. Update q ( w j   |   y x , d i ) such that;
q ( w j   |   y x , d i ) =     q ( w j   |   y x )   X   q ( y x   |   d i )    
6. For each word in the document ‘d’;
Find the topic ‘x’ such that;
   q ( w j   |   y x , d i )   i s   m a x i m u m
Reassign the word to the ‘xth’ topic
7. If iteration complete;
Go to the last step of the algorithm
Else
Go to step 4
8. Stop

4. Results and Analysis

We implemented the LDA algorithm to figure out the most dominant topics inside the dataset. In the pre-processing phase, we cleaned up the #tags and other redundant data to avoid them from appearing in the results of the most repetitive topic list. We used R Studio for the implementation of the LDA topic modeling; furthermore, we used the LDAvis library for the plotting of the resulting graph. The outcome of the LDAvis is represented in Figure 4, where we can see the most occurred topics and their ratio with respect to other topics. We observed that there were major 12 topic groups formed; each group contained several topics, and their corresponding frequency is represented with the bar graph on the right side of the picture.

4.1. Polarity Analysis

The results after the implementation of the polarity sentiment analysis are shown in Table 3 (first phase), Table 4 (second phase), and Table 5 (third phase). The count of the tweets in the tables below will be different from Table 1 as we deleted the multiple tweets from a single user.
The findings show that COVID-19 surely impacted the agricultural sector. The outcomes of the first analysis shown in Table 3 indicate that there were about 34.31% positive tweets and 55.68% of the tweets were negative. This specifies that the people related to the agricultural field seemed not to be so happy about the lockdown situation. In the second phase of the tweet collection, when people were starting to get used to the lockdown situation, around 44.78% positive and 50.63% negative tweets were recorded (see Table 4).
The difference between the positive and negative emotions of the tweets was reduced in this section of the lockdown. The reason for the change was that the government granted some special privileges to the farmers and their related sectors. The farmers were now granted permission to bring their crops to the market, and special arrangements were made for faster processing of the sales in the markets.
Table 5 shows the sentiment analysis results of the third phase of the tweet data collection. This was the time when the lockdown was almost over in the country and public dealing started in the offices and other sectors, and industries were granted permission to operate under certain conditions. In this period, around 63.33% positive and 30.54% negative tweets were registered. So, with such privileges where farmers could go to the market and purchase and sell the products, conditions seemed to be normal again. Still, the shortage of machinery, fertilizers, medicines, and labor remained a hurdle for the farmers.

4.2. Emotion Analysis

The results of the emotion analysis for each of the phases are represented in Figure 5, Figure 6 and Figure 7, respectively. We depict various emotions and variations in the emotions through the analysis phase. The R libraries were employed to figure out the emotions of the tweets. Every tweet represents one or more emotions; these emotions are identified by the keywords used inside the tweets. In the initial period, we figured out that sadness and anger were the key emotions, whereas in the second phase, the level of these two emotions was reduced as people started accepting the government’s decision on the lockdown. In the third phase of the lockdown, trust and joy were the two leading parameters. During that period, life seemed to start coming back to the normal track.

4.3. Region-Wise Analysis

Firstly, the tweet data were collected all over the Indian geolocation and the above-mentioned findings were obtained. We figured out that most of the people related to the agricultural field live in the northern region of the country [36]. The northern region is more suitable for farming purposes and around 63% of the food produced in the country comes from that region [37]. The northern region includes states such as Uttar Pradesh, Punjab, Haryana, and Rajasthan.
These states are the major contributor to the food industry because of their soil quality and water availability. Other food-producing regions, in order of their production capacities, are the western, southern, eastern, and northeast regions respectively. The central part of the nation is merged into the northern and western parts of the country. Since there is a difference in the quantity of food produced in each region, we also assumed that the Twitter data collected from these regions would also show some variations in the sentiment analysis.
In the second phase of the research, we categorized the tweets according to their respective regions and again applied sentiment analysis methods. Due to some security reasons, there were a few tweets whose geolocation was not available to us, so we did not include such tweets in any region. The result of the sentiment analysis was divided into three categories: positive (P+ and P), neutral, and negative (N and N−). We generated the formula marked with Equations (1)–(3), and based on the obtained results, we categorized the regions of the country into happy, sad, and neutral zones.
Sentiment Score = (Sum of Positive tweets − Sum of negative tweets) ± Neutral tweets
Sum of Positive tweets= 1 × ‘# of highly positive tweets’ + 0.5 × ‘# of positive tweets’
Sum of Negative tweets = 1 × ‘# of highly negative tweets’ + 0.5 × ‘# of negative tweets’
The mathematical Equation (1) was used to compute the sentiment score of the tweets. If the obtained results were positive and the result was far away from zero, then the mood was counted as happy, whereas if the difference was negative and the value was much smaller than zero, then the resultant mood was counted to be sad/unhappy. In conclusion, to declare an emotion to be overall happy/unhappy for a particular region, there should be a significant difference between the negative and positive emotions. In contrast, if the difference was either zero or nearer to zero (on both the positive and negative side), then the mood was counted to be neutral. We set a margin of 5% of the total number of tweets because there may have been some tweets that were written in some regional languages and were not processed by our sentiment analyzer, or a few tweets that could not be processed by the analyzer. So, we believe there must be at least a 5% difference between the sentiment score with the total number of tweets to be considered as happy or sad emotions. If the difference was less than the prescribed value, the resultant emotion was considered to be neutral. To illustrate the working of Equation (1), we took data from the northern region, dated 28 March 2020, as an example. The given dataset contained 22 highly positive, 147 positive, 45 neutral, 298 negative, and 78 highly negative tweets. The total tweets collected numbered 590 for only the northern region (See Table 6).
Using the method mentioned above in Equation (1), we were able to calculate the emotion of each region for each day and, afterward, combined the results to show the overall results during that time. The result of the sentiment analyzer for different time periods of the study is shown in Figure 8, Figure 9 and Figure 10, respectively.

5. Discussion

The outcomes depict that the pandemic caused by COVID-19 greatly impacted the socioeconomic life of the people related to agriculture [38,39]. The sectors dependent on agricultural income suffered the most during the lockdown period [40]. In the total evaluated phases of the lockdown, the north zone showed a great deal of unhappiness as compared to other zones. Only a small number of tweets were registered from the northeast part of the country. As per the results, the western region remained stable in this pandemic situation and the southern zone, with time, moved from the sad to the neutral state. The lockdown session created unhappiness in most of the states associated with farming.

5.1. What May Be the Possible Causes of Unhappiness?

The conducted study represents the variation among the emotions of the different regions. Certain factors were responsible for that, and a few of them are mentioned here.
(a)
The government took the overnight decision to lock down [41]. People, especially farmers, were not ready for that. The time of the lockdown was the same as when the wheat crop was ready for harvesting. Due to restricted movement, it became harder for farmers to harvest the crop.
(b)
The government and people of the country were not ready for such a pandemic situation. The lack of planning and implementations was the key factor that made people suffer [42].
(c)
The unavailability of the machinery and labor that were needed for the harvesting of the crop was also a reason for unhappiness among the farmers [43]. Due to stringent movements, the supply of fertilizers, pesticides, and other necessary items was also affected.
(d)
A disturbance in food demand and supply was experienced during that period [44]. The sale of cereals, pulses, milk products, and vegetables was reduced by almost half. Due to the spread of the virus, people feared buying products from the market, and also the lack of money forced them to live on limited things.
(e)
Every section of the economy suffered almost the same kind of unhappiness as the agricultural sector. COVID-19 became a worldwide tragedy that equally affected every section of development.

5.2. Valuable Lesson for Policymakers

Every pandemic left a lesson behind for the stakeholders associated with the affected areas of the disaster [45]. COVID-19 is one such worldwide tragedy that affected every country worldwide. It came all of sudden and no government was ready to tackle the consequences arising from this deadly virus. Along with every other sector, the agriculture sector was also affected by the forced lockdown in the country during the coronavirus period. Although the state and central government made valuable efforts to smoothen the consequences, all these seemed too insubstantial to overpower the situation [46]. COVID-19 reveals the lack of pre-disaster plans, and thus leaves a valuable lesson for different policymakers. From the present state, the policymakers gain an idea of how to tackle such circumstances if they ever happen in the near future.
In this paper, we emphasized the agriculture sector and its related domains; thus, every lesson discussed here is associated particularly with the agricultural field. Here are a few valuable points that might be considered while making pre-disaster management schemes for agriculture and its associated sectors.
(a)
Agriculture is among the most important sectors for human survival; it should not be stopped in any condition and it must be among the least disaster-affected zones. So, special arrangements should be planned for the continuity of farming in the condition of any type of catastrophe.
(b)
The spread of rumors such as vegetables, fruits, and chickens being the carriers of COVID-19 greatly affected the consumption of these products [47]. Such false and misleading information should be monitored carefully and people should be made aware of these kinds of news.
(c)
Farming was much affected by the traveling restrictions imposed due to the lockdown and the shortage of laborers [48]. By keeping these problems in view, special arrangements should be made for agriculture if such a lockdown situation arises in the near future. Farmers must have continued access to markets to fulfill their requirements.
(d)
Agricultural workers and farmers must be included in the government’s aid package and any social safety programs addressing the disaster [49].
(e)
Food production and the supply chain should not be stopped under any circumstances.
(f)
Special arrangements should be made to keep an eye on the market to control the overpricing and storage of products during the pandemic period.
(g)
The trend in the home delivery of products, essential goods, and materials required for agriculture should be promoted in normal circumstances as well [50].

6. Conclusions and Future Work

Agriculture and its allied activities act as the main source of livelihood for more than half of the population of rural India. With such a large amount of dependency on the people in this sector and with the sudden arrival of such a virus that stops everything, an atmosphere of fear was raised in the country. Similar outcomes are stated in our research work. The first phase of the lockdown created fear and unhappiness among the people of the country when the government was strict about the lockdown, and it is believed that there was inadequate preparedness. As soon as there was some relaxation in the lockdown and with the availability of farming assets, the situation started coming back on track. Our research work concludes that with the availability of the resources and the information, the sentimental state of the farmers moved back to the normal state. This study has a limitation in that for analysis purposes, we had to rely on the Twitter dataset, and we know that most of the farmers may not have social media accounts, so in that case, we had to rely on their representatives. Our future work will be based on studying the economic situation of the farmers before and after the arrival of the coronavirus. Moreover, we will focus on studying the impact of COVID-19 on some other sectors such as pig farming, poultry farms, fishing, and many others, as the food demand from these areas has gradually decreased.

Author Contributions

Conceptualization: A.S. and M.S. (Madanjit Singh); Methodology: M.S. (Munish Saini) and M.S. (Madanjit Singh); Software: A.S. and M.S. (Madanjit Singh); Validation: M.S. (Madanjit Singh) and P.S.; Formal Analysis: M.S. (Munish Saini) and P.S.; Investigation: A.S., M.S. (Madanjit Singh), and S.B.; Data Curation: M.S. (Munish Saini) and S.B.; Writing—original draft preparation: M.S. (Madanjit Singh) and A.S.; Writing: review and editing: M.S. (Munish Saini), S.B., and P.S.; Visualization: M.S. (Munish Saini) and S.B.; Supervision: M.S. (Munish Saini); Project Adminstration: M.S. (Munish Saini). All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Wang, H.; Wang, Z.B.; Dong, Y.; Chang, R.; Xu, C.; Yu, X.; Zhang, S.; Tsamlag, L.; Shang, M.; Huang, J.; et al. Phase-adjusted estimation of the number of Coronavirus Disease 2019 cases in Wuhan. China Cell Discov. 2020, 6, 10. [Google Scholar] [CrossRef] [Green Version]
  2. Bhalekar, V. Novel Corona Virus Pandemic-Impact on Indian Economy, E-Commerce, Education and Employment. 2020. Available online: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3580342 (accessed on 28 August 2022).
  3. Hanashima, M.; Tomobe, K. Urbanization, industrialization, and mortality in modern Japan: A Spatio-temporal perspective. Ann. GIS 2012, 18, 57–70. [Google Scholar] [CrossRef]
  4. Arndt, C.; Lewis, J.D. The HIV/AIDS pandemic in South Africa: Sectoral impacts and unemployment. J. Int. Dev. 2001, 13, 427–449. [Google Scholar] [CrossRef]
  5. Bermejo, A. HIV/AIDS in Africa: International responses to the pandemic. New Econ. 2004, 11, 164–169. [Google Scholar] [CrossRef]
  6. Clemente, G.; Garcia-Prats, A.; Lisón, P.; Rubio, C.; Vidal-Puig, S.; Ricarte, B.; Estruch-Guitart, V.; Fenollosa, L.; Manzano, J.; Rovira-Más, F.; et al. COVID-19 Impact: A Case Study at the School of Agricultural Engineering and Environment of the Universitat Politècnica de València. Sustainability 2022, 14, 10607. [Google Scholar] [CrossRef]
  7. Liu, Y.; Chen, Y.; Wu, S.; Peng, G.; Lv, B. Composite leading search index: A preprocessing method of internet search data for stock trends prediction. Ann. Oper. Res. 2015, 234, 77–94. [Google Scholar] [CrossRef]
  8. Oyekale, A.S. Poverty and Its Correlates among Kenyan Refugees during the COVID-19 Pandemic: A Random Effects Probit Regression Model. Sustainability 2022, 14, 10270. [Google Scholar] [CrossRef]
  9. Burgui, D. Coronavirus: How Action against Hunger Is Responding to the Pandemic. 2020. Available online: https://www.actionagainsthunger.org/story/coronavirus-how-action-against-hunger-responding-pandemic (accessed on 28 August 2022).
  10. Abdelhedi, I.T.; Zouari, S.Z. Agriculture and Food Security in North Africa: A Theoretical and Empirical Approach. J. Knowl. Econ. 2020, 11, 193–210. [Google Scholar] [CrossRef]
  11. Anik, A.R.; Rahman, S. Women’s Empowerment in Agriculture: Level, Inequality, Progress, and Impact on Productivity and Efficiency. J. Dev. Stud. 2020, 57, 930–948. [Google Scholar] [CrossRef]
  12. Siche, R. What is the impact of COVID-19 disease on agriculture? Sci. Agropecu. 2020, 11, 3–6. [Google Scholar] [CrossRef]
  13. Vatta, K.; Bhogal, S.; Green, A.S.; Sharma, H.; Petrie, C.A.; Dixit, S. COVID-19 Pandemic-Induced Disruptions and Implications for National Food Security and Farm Incomes: Farm-Level Evidence from Indian Punjab. Sustainability 2022, 14, 4452. [Google Scholar] [CrossRef]
  14. Rawal, V. COVID-19 Lockdown: Impact on Agriculture and Rural Economy. Soc. Sci. 2020, 48, 562–565. [Google Scholar]
  15. Agarwal, A.; Xie, B.; Vovsha, I.; Rambow, O.; Passonneau, R.J. Sentiment analysis of twitter data. In Proceedings of the Workshop on Languages in Social Media; Association for Computational Linguistics: Stroudsburg, PA, USA, 2011; pp. 30–38. [Google Scholar]
  16. Mohammad, S.M.; Turney, P.D. Emotions evoked by common words and phrases: Using Mechanical Turk to create an emotion lexicon. In Proceedings of the NAACL HLT 2010 Workshop on Computational Approaches to Analysis and Generation of Emotion in the Text, Los Angeles, CA, USA, 5 June 2010; pp. 26–34. [Google Scholar]
  17. Dev, S.; Sengupta, R. COVID-19: Impact on the Indian Economy; Indira Gandhi Institute of Development Research: Mumbai, India, 2020. [Google Scholar]
  18. Rawal, T.; Muris, J.W.; Mishra, V.K.; Arora, M.; Tandon, N.; van Schayck, O.C. Impact of the COVID-19 Pandemic Measures on the Number of Meals and the Types of Physical Activity of Adolescents: Cross-Sectional Study in Delhi, India. Recent Prog. Nutr. 2022, 2, 10. [Google Scholar] [CrossRef]
  19. Ponnusamy, K.; Padaria, R.N. Research in agricultural extension: Review of its contribution and challenges. Horticulture 2021, 305, 314–367. [Google Scholar] [CrossRef]
  20. Pokhrel, S.; Chhetri, R. A literature review on impact of COVID-19 pandemic on teaching and learning. High. Educ. Future 2021, 8, 133–141. [Google Scholar] [CrossRef]
  21. Verma, A.K.; Prakash, S. Impact of COVID-19 on environment and society. J. Glob. Biosci. 2022, 9, 7352–7363. [Google Scholar]
  22. Dairi, A.; Harrou, F.; Zeroual, A.; Hittawe, M.M.; Sun, Y. Comparative study of machine learning methods for COVID-19 transmission forecasting. J. Biomed. Inform. 2021, 118, 103791. [Google Scholar] [CrossRef]
  23. Yang, C.; Harkreader, R.; Zhang, J.; Shin, S.; Gu, G. Analyzing spammers’ social networks for fun and profit: A case study of cyber criminal ecosystem on twitter. In Proceedings of the 21st international conference on World Wide Web, Lyon, France, 16–20 April 2012; pp. 71–80. [Google Scholar]
  24. Gentry, J. TwitteR v1.1.9. Available online: https://www.rdocumentation.org/packages/twitteR/versions/1.1.9 (accessed on 18 June 2020).
  25. Mishra, N.; Singh, A. Use of twitter data for waste minimization in the beef supply chain. Ann. Oper. Res. 2016, 270, 337–359. [Google Scholar] [CrossRef] [Green Version]
  26. Singh, P.; Dwivedi, Y.K.; Kahlon, K.S.; Sawhney, R.S. Intelligent Monitoring and Controlling of Public Policies Using Social Media and Cloud Computing. In International Working Conference on Transfer and Diffusion of IT; Springer: Cham, Switzerland, 2018; pp. 143–154. [Google Scholar]
  27. Haddi, E.; Liu, X.; Shi, Y. The role of text pre-processing in sentiment analysis. Procedia Comput. Sci. 2013, 17, 26–32. [Google Scholar] [CrossRef] [Green Version]
  28. McNaught, C.; Lam, P. Using Wordle as a supplementary research tool. Qual. Rep. 2010, 15, 630. [Google Scholar] [CrossRef]
  29. Singh, P.; Sawhney, R.S.; Kahlon, K.S. Sentiment analysis of demonetization of 500 and 1000 rupee banknotes by the Indian government. ICT Express 2017, 4, 124–129. [Google Scholar] [CrossRef]
  30. Saif, H.; Fernandez, M.; He, Y.; Alani, H. Evaluation datasets for Twitter sentiment analysis: A survey and a new dataset, the STS-Gold. In Proceedings of the 1st Interantional Workshop on Emotion and Sentiment in Social and Expressive Media: Approaches and Perspectives from AI (ESSEM 2013), Turin, Italy, 3 December 2013. [Google Scholar]
  31. Setiawan, R.; Budiharto, W.; Kartowisastro, I.H.; Prabowo, H. Finding model through latent semantic approach to reveal the topic of discussion in discussion forum. Educ. Inf. Technol. 2020, 25, 31–50. [Google Scholar] [CrossRef]
  32. Blei, D.M.; Ng, A.Y.; Jordan, M.I. Latent Dirichlet Allocation. J. Mach. Learn. Res. 2003, 3, 993–1022. [Google Scholar]
  33. Arun, R.; Suresh, V.; Veni Madhavan, C.E.; Murthy, N. On finding the natural number of topics with latent dirichlet allocation: Some observations. In Pacific-Asia Conference on Knowledge Discovery and Data Mining; Springer: Berlin/Heidelberg, Germany, 2021; pp. 391–402. [Google Scholar]
  34. Chuang, J.; Manning, C.D.; Heer, J.M. Termite: Visualization techniques for assessing textual topic models. In Proceedings of the International Working Conference on Advanced Visual Interfaces, Capri, Italy, 21–25 May 2012; pp. 74–77. [Google Scholar]
  35. Sievert, C.; Shirley, K. LDAvis: A method for visualizing and interpreting topics. In Proceedings of the Workshop on Interactive Language Learning Visualization, and Interfaces, Baltimore, MD, USA, 24 June 2014; pp. 63–70. [Google Scholar]
  36. Thakur, J.S.; Rao, B.T.; Rajwanshi, A.; Parwana, H.K.; Kumar, R. Epidemiological study of high cancer among rural agricultural community of Punjab in Northern India. Int. J. Environ. Res. Public Health 2008, 5, 399–407. [Google Scholar] [CrossRef] [Green Version]
  37. Fazal, S. The need for preserving farmland: A case study from a predominantly agrarian economy (India). Landsc. Urban Plan. 2001, 55, 1–13. [Google Scholar] [CrossRef]
  38. Guan, D.; Wang, D.; Hallegatte, S.; Huo, J.; Li, S.; Bai, Y.; Lei, T.; Xue, Q.; Davis, S.J.; Coffman, D.M.; et al. Global Economic Footprint of the COVID-19 Pandemic; University College London: London, UK, 2020. [Google Scholar]
  39. Kumar, A.; Priya, B.; Srivastava, S.K. Response to the COVID-19: Understanding implications of government lockdown policies. J. Policy Model. 2021, 43, 76–94. [Google Scholar] [CrossRef]
  40. Poudel, P.B.; Poudel, M.R.; Gautam, A.; Phuyal, S.; Tiwari, C.K.; Bashyal, N.; Bashyal, S. COVID-19 and its Global Impact on Food and Agriculture. J. Biol. Today’s World 2020, 9, 221. [Google Scholar]
  41. Virk, J.S.; Ali, S.A.; Kaur, G. Recent update on COVID-19 in India: Is locking down the country enough? medRxiv 2020. [Google Scholar] [CrossRef]
  42. Kumar, S.; Choudhury, S. Migrant workers and human rights: A critical study on India’s COVID-19 lockdown policy. Soc. Sci. Humanit. Open 2021, 3, 100130. [Google Scholar] [CrossRef]
  43. Chattopadhyay, S.; De, U.K.; Saha, B.; Kumar, A.; Ramachandran, M.; Mohanan, P.C.; Singh, R.; Saha, A.; Carreras, M.; Mazigo, A.; et al. Special Issue-The COVID-19 Pandemic and India. J. Dev. Policy Rev. 2020, 1, 138. [Google Scholar]
  44. Sukhwani, V.; Deshkar, S.; Shaw, R. COVID-19 lockdown, food systems and urban–rural partnership: Case of Nagpur, India. Int. J. Environ. Res. Public Health 2020, 17, 5710. [Google Scholar] [CrossRef] [PubMed]
  45. Ha, K.M. A Lesson Learned from the Outbreak of COVID-19 in Korea. Indian J. Microbiol. 2020, 60, 396–397. [Google Scholar] [CrossRef] [PubMed]
  46. Kumar, S.; Viral, R.; Deep, V.; Sharma, P.; Kumar, M.; Mahmud, M.; Stephan, T. Forecasting major impacts of COVID-19 pandemic on country-driven sectors: Challenges, lessons, and future roadmap. Pers. Ubiquitous Comput. 2021, 1–24. [Google Scholar] [CrossRef] [PubMed]
  47. Tripathi, D.; Sindher, M.; Garg, T. The Aftermath of Pandemic COVID-19 on Food and Agri sector. Food Agric. Spectr. J. 2020, 1, 13–24. [Google Scholar]
  48. Kumar, P.; Singh, S.S.; Pandey, A.K.; Singh, R.K.; Srivastava, P.K.; Kumar, M.; Dubey, S.K.; Sah, U.; Nandan, R.; Singh, S.K.; et al. Multi-level impacts of the COVID-19 lockdown on agricultural systems in India: The case of Uttar Pradesh. Agric. Syst. 2021, 187, 103027. [Google Scholar] [CrossRef]
  49. Dev, S.M. Addressing COVID-19 impacts on agriculture, food security, and livelihoods in India. In IFPRI Book Chapters; IFPRI: Washington, DC, USA, 2020; pp. 33–35. [Google Scholar]
  50. Sheth, J. Impact of COVID-19 on consumer behavior: Will the old habits return or die? J. Bus. Res. 2020, 117, 280–283. [Google Scholar] [CrossRef]
Figure 1. Data analysis and methodology.
Figure 1. Data analysis and methodology.
Sustainability 14 16174 g001
Figure 2. WordCloud of frequent word.
Figure 2. WordCloud of frequent word.
Sustainability 14 16174 g002
Figure 3. Schematic of LDA Algorithm.
Figure 3. Schematic of LDA Algorithm.
Sustainability 14 16174 g003
Figure 4. Topic Modeling using LDAvis [34,35].
Figure 4. Topic Modeling using LDAvis [34,35].
Sustainability 14 16174 g004
Figure 5. Emotion analysis of the first phase.
Figure 5. Emotion analysis of the first phase.
Sustainability 14 16174 g005
Figure 6. Emotion analysis of the second phase.
Figure 6. Emotion analysis of the second phase.
Sustainability 14 16174 g006
Figure 7. Emotion analysis of the third phase.
Figure 7. Emotion analysis of the third phase.
Sustainability 14 16174 g007
Figure 8. The first phase of the lockdown (region-wise analysis).
Figure 8. The first phase of the lockdown (region-wise analysis).
Sustainability 14 16174 g008
Figure 9. The second phase of the lockdown (region-wise analysis).
Figure 9. The second phase of the lockdown (region-wise analysis).
Sustainability 14 16174 g009
Figure 10. The third phase of the lockdown (region-wise analysis).
Figure 10. The third phase of the lockdown (region-wise analysis).
Sustainability 14 16174 g010
Table 1. Daily tweet collection.
Table 1. Daily tweet collection.
Initial PhaseMid-PhaseLateral Phase
Date No. of TweetsDateNo. of TweetsDate No. of Tweets
24 March 202019014 April 2020171914 May 2020684
25 March 202045017 April 2020162615 May 2020715
26 March 202038921 April 2020185120 May 2020586
27 March 202096923 April 2020215223 May 20201562
28 March 2020178524 April 2020223224 May 20201411
29 March 2020248130 April 2020154327 May 20201225
30 March 202022884 May 202025612 June 20201774
31 March 202021455 May 2020248710 June 20201324
Total10,697Total16,171Total9281
Table 2. Example of data pre-processing.
Table 2. Example of data pre-processing.
Raw Tweet DataTweet Data After Pre-Processing
RT @#####: In such a big epidemic many #businesses were closed for a while or given a time limit but #farming is a business which has not been closed yet or no time limit has been given. #agriculture #farmer #nature #agriculturelife #covid19 … https://t.co/v6lhi7zjpQ (accessed on 27 March 2020) in such a big epidemic many businesses were closed for a while or given a time limit but farming is a business which has not been closed yet or no time limit has been given
Table 3. Sentiment Analysis Results of the First Phase.
Table 3. Sentiment Analysis Results of the First Phase.
DateFirst Phase (24 March 2020 to 31 March 2020)
Highly Positive (P+)Positive (P)NeutralNegative (N)Highly Negative (N−)Total
24 March 20202189302714181
25 March 2020651197110725387
26 March 202052986012339372
27 March 20201693248624391913
28 March 20201134191266942731625
29 March 20201915121969343852218
30 March 20201204582119173102016
31 March 202010451320110052762099
Total8352532981405014139811
Combined Total336798154639811
Combined %34.3210.0055.68100
Table 4. Sentiment Analysis Results of the Second phase.
Table 4. Sentiment Analysis Results of the Second phase.
DateSecond Phase (14 April 2020 to 5 May 2020)
Highly Positive (P+)Positive (P)NeutralNegative (N)Highly Negative (N−)Total
14 April 2020240410707121801612
17 April 20202823531426541551586
21 April 2020310512896142011726
23 April 20203775451158191992055
24 April 20202606611029081862117
30 April 2020185412566242111488
4 May 2020908940612041452339
5 May 202022010871197521672345
Total196448746996287144415,268
Combined Total6838699773115,268
Combined %44.794.5850.63100
Table 5. Sentiment Result of the Third Phase.
Table 5. Sentiment Result of the Third Phase.
DateThird Phase (14 May 2020 to 10 June 2020)
Highly Positive (P+)Positive (P)NeutralNegative (N)Highly Negative (N−)Total
14 May 2020623004211065579
15 May 2020532673529651702
20 May 2020881988113458559
23 May 2020154773633451241459
24 May 202026765226213961254
27 May 20207269855294821201
2 June 2020971085121367911761
10 June 2020129653113297531245
Total922462653620566208760
Combined Total554853626768760
Combined %63.336.1230.55100
Table 6. An Example of the Sentiment Score Calculator.
Table 6. An Example of the Sentiment Score Calculator.
Sentiment Score Calculator
Positive tweets = 1 × 22 + 0.5 × 147 = 95.5
Negative tweets= 1 × 78 + 0.5 × 298 = 227
Neutral tweets = 45
Sentiment Score = (95.5 − 227) + 45 = −86.5
5% of the total 590 tweets are 29.5, and after adding this to the −86.5, we reach a result of −57, which is less than zero. So, the sentiment results here show that the overall emotion for that day for the northern region is sad.
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Singh, M.; Singh, A.; Bharti, S.; Singh, P.; Saini, M. Using Social Media Analytics and Machine Learning Approaches to Analyze the Behavioral Response of Agriculture Stakeholders during the COVID-19 Pandemic. Sustainability 2022, 14, 16174. https://doi.org/10.3390/su142316174

AMA Style

Singh M, Singh A, Bharti S, Singh P, Saini M. Using Social Media Analytics and Machine Learning Approaches to Analyze the Behavioral Response of Agriculture Stakeholders during the COVID-19 Pandemic. Sustainability. 2022; 14(23):16174. https://doi.org/10.3390/su142316174

Chicago/Turabian Style

Singh, Madanjit, Amardeep Singh, Sarveshwar Bharti, Prithvipal Singh, and Munish Saini. 2022. "Using Social Media Analytics and Machine Learning Approaches to Analyze the Behavioral Response of Agriculture Stakeholders during the COVID-19 Pandemic" Sustainability 14, no. 23: 16174. https://doi.org/10.3390/su142316174

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop