19 - Crop Recommender System Using Machine Learning Approach
19 - Crop Recommender System Using Machine Learning Approach
MASTER OF TECHNOLOGY
IN
COMPUTER SCIENCE &ENGINEERING
Submitted by
JALA SINDHUJA
14BJ1D5802
Under the esteemed guidance of
Mr. RAVEENDRA REDDY ENUMULA (P.hD)
Assistant Professor
CERTIFICATE
This is to certify that the project report entitled “Connecting Social Media To E- Commerce:
Cold-Start Product Recommendation using Microblogging Information” is the bonafied
record of project work carried out by JALA SINDHUJA, a student of this college, during the
academic year 2014 - 2016, in partial fulfillment of the requirements for the award of the degree
of Master of Technology in Computer Science &Engineering from St.Marys Group Of
Institutions Guntur of Jawaharlal Nehru Technological University, Kakinada.
We, hereby declare that the project report entitled “Connecting Social Media To E-Commerce:
Cold-Start Product Recommendation using Microblogging Information” is an original work
done at St.Mary„s Group of Institutions Guntur, Chebrolu, Guntur and submitted in fulfillment
of the requirements for the award of Master of Technology in Computer Science &
Engineering, to St.Mary„s Group of Institutions Guntur, Chebrolu, Guntur.
JALA SINDHUJA
(14BJ1D5802)
ACKNOWLEDGEMENT
We consider it as a privilege to thank all those people who helped us a lot for successful
completion of the project “Connecting Social Media To E-Commerce: Cold-Start Product
Recommendation using Microblogging Information” A special gratitude we extend to our guide
Mr. E. Raveendra Reddy, Asst. Professor whose contribution in stimulating suggestions and
encouragement ,helped us to coordinate our project especially in writing this report, whose valuable
suggestions, guidance and comprehensive assistance helped us a lot in presenting the project
“Connecting Social Media To E-Commerce: Cold-Start Product Recommendation using
Microblogging Information”.
We would also like to acknowledge with much appreciation the crucial role of our Co-Ordinator
Mr. E.Raveendra Reddy, Asst.Professor for helping us a lot in completing our project. We just
wanted to say thank you for being such a wonderful educator as well as a person.
We express our heartfelt thanks to Mr. Subhani Shaik, Head of the Department, CSE, for his
spontaneous expression of knowledge, which helped us in bringing up this project through the
academic year.
JALA SINDHUJA
(14BJ1D5802)
ABSTRACT
In Indian economy and employment agriculture plays major role. The most common
problem faced by the Indian farmers is they do not opt crop based on the necessity of
soil, as a result they face serious setback in productivity. This problem can be
addressed through precision agriculture. This method takes three parameters into
consideration, viz: soil characteristics, soil types and crop yield data collection based on
these parameters suggesting the farmer suitable crop to be cultivated. Precision
agriculture helps in reduction of non-suitable crop which indeed increases productivity,
apart from the following advantages like efficacy in input as well as output and better
decision making for farming. Crop yield prediction incorporates forecasting the yield of
the crop from past historical data which includes factors such as temperature, relative
humidity, ph., rainfall and area (Hectares). This method gives solutions like proposing a
recommendation system through an ensemble model with majority voting techniques
using Random Forest and K Nearest Neighbor as learner to recommend suitable crop
based on soil parameters with high specific accuracy and efficiency.
(i)
LIST OF TABLES
1 ALGORITHM 31
COMPARISION
(ii)
LIST OF FIGURES
Classification vs
3.1 10
Regression
4.2 KNN 14
(iii)
5.10 Algorithm Comparison 31
(iv)
TABLE OF CONTENTS
CHAPTER NO. TITLE PAGE NO.
ABSTRACT i
LIST OF ABBREVIATIONS ii
LIST OF TABLES iii
LIST OF FIGURES iv
1 INTRODUCTION 1
1.1 OUTLINE 1
1.5 OBJECTIVE 4
2 LITERATURE SURVEY 5
3 METHODOLOGY 8
3.1 INTRODUCTION TO MACHINE LEARNING 8
3.3.1 CLASSIFICATION 10
3.3.2 REGRESSION 11
4 ALGORITHMS 13
4.1 RANDOM FOREST 13
4.3 DATASETS 14
4.4 PACKAGES 15
4.6.1 OVERVIEW 20
5.2 ANALYSIS 33
REFERENCES 38
APPENDIX 41
A. SAMPLE CODE 41
B. SCREEN SHOTS 46
1.1 OUTLINE
Agriculture is the one amongst the substantial area of interest to society since a large
portion of food is produced by them. Currently, many countries still experience hunger
because of the shortfall or absence of food with a growing population. Expanding food
production is a compelling process to annihilate famine. Developing food security and
declining hunger by 2030 are beneficial critical objectives for the United Nations. Hence
crop protection; land assessment and crop yield prediction are of more considerable
significance to global food production.
This project uses Python 3.6 for the programming in a scientific development
environment called the PyCharm. Various data manipulation, machine learning and
visualization packages are used to create and analyze the dataset using a traditional
machine learning model. A Data Visualization tool called Tableau is used to interpret the
results provided by the model after analysis to represent and act as a proof for the
intended result.
Problem # 1. Instability:
Agriculture in India is largely depending on monsoon. As a result, production of food-
grains fluctuates year after year. A year of abundant output of cereals is often followed
by a year of acute shortage. This, in its turn, leads to price income and employment
fluctuations. However, for the thirteen years, in successive (1987-88 to 1999-00) a
normal monsoon has been observed.
• Our proposed system is an application which predicts name of the crop as well
as calculate its corresponding yield.
• Name of the crop is determined by several features like temperature, humidity,
wind-speed, rainfall etc. and yield is determined by the area and production.
• In this project KNN and Random Forest is used for prediction. It will attain the
crop prediction with best accurate values.
1.5 OBJECTIVE
In Indian economy and employment agriculture plays major role. The most common
problem faced by the Indian farmers is they do not opt crop based on the necessity of
soil, as a result they face serious setback in productivity.
This problem can be addressed through precision agriculture. This method takes three
parameters into consideration, viz: soil characteristics, soil types and crop yield data
collection based on these parameters suggesting the farmer suitable crop to be
cultivated.
LITERATURE SURVEY
Sujata Kullur clarified that past yield data doesn't anticipate gathering and reaping. It
likewise gives ranchers the data they need to handle climate data about crops that can
be reaped, and to deal with the substance of the harvest at the perfect opportunity.
The conduct of the mentors of Judah Khan, the numerous choice trees, was obvious,
and the division or issuance turned into a penance as indicated by the quantity of
divisions.
Amrita Vishwa Vidyapeetham clarifies the likely advantages of IoT casualties to the
climate at a decent cost, and clarifies the expected effects of its utilization and use.
They utilized a Hadoop sound card. Data, research, and related data don't assist with
recognizing bugs and bugs.
Pavan Patil discloses to us that "Testament Tree and KNN" utilized the power
calculation. This strategy assists with guaranteeing that the plants in a specific region
are typically full grown.
5
Yash Sanghvi states the usage of agricultural information with data processing and
visual data processing techniques are delineate. Data processing in agriculture is
employed for analyzing the varied organic phenomenon and abiotic factors.
Nirupama Mallick clarified that it assumes a significant part in data handling in the rural
area. They need to decide specific computational abilities, for example, K normal, SVM,
ANN. Collect is anticipated predominantly founded on the climate, with a genuine score
of 95%, C4.5.
Rakesh Kumar discusses the factors deciding the crop choice like production rate,
value and government policies are mentioned. The projected methodology could
improve web yield rate of crops.
Use of ecological variables, emphasis examination (RA), direct relapse calculation (LR),
and collected item reviles.
Satish Babu states the wants and designing required for developing a computer code
model for exactitude agriculture is mentioned. This approach can end up in the farmer
and crop-level support advisories through devices like mobile phones and tablets.
Abhay V. Raorane explains how to boost harvest productivity by applying several data
mining tactics. The processes they used for order, like as ANN, SVM, and K implies,
among others.
Anshal Savla explains during this paper, varied algorithms are used associated with
classification techniques of information mining. A comparative analysis is finished to
indicate that classification algorithmic rule is best fitted to predicting the yield with
relevance classification techniques.
Aakunuri Manjula states the need for crop yield prediction and it facilitate in a very
nation‘s strategic political opinions in exactitude agriculture.
6
Yash Sanghvi states the usage of agricultural information with data processing and
visual data processing techniques are delineate. Raw information/data/information
collected from the statistics analysis has helped in crucial the information and by
victimization self-organizing and multi-dimensional maps to scale back data.
7
CHAPTER 3
METHODOLOGY
Machine learning is a method used in the field of data analytics to create complex
models and algorithms that lend themselves to prediction; in commercial use, this is
known as predictive analytics.
8
Through learning from historical relationships and trends in the data, these analytical
models enable researchers, data scientists, engineers, and analysts to "produce
reliable, repeatable decisions and results" and uncover "hidden insights."
There are basically two widely-used types of training that can be done to create a
model:
i. Supervised Learning
ii. Un-supervised Learning
The machine learning task of learning a function that maps an input to an output based
on example input-output pairs is known as supervised learning. It derives a function
from labelled training data, which consists of a set of training examples. Each example
in supervised learning is a pair consisting of an input object (typically a vector) and a
desired output value (also called the supervisory signal). A supervised learning
algorithm examines the training data and generates an inferred function that can be
used to map new examples. In an ideal scenario, the algorithm will be able to correctly
determine the class labels for unseen instances. This necessitates that the learning
algorithm generalize from the training data to previously unseen situations in a
"reasonable" manner.
The machine learning task of inferring a function that describes the structure of
"unlabeled" data is known as unsupervised machine learning (i.e., data that has not
been classified or categorized). Because the examples provided to the learning
algorithm are unlabeled, there is no simple way to assess the accuracy of the structure
produced by
9
the algorithm—a feature that distinguishes unsupervised learning from supervised
learning and reinforcement learning.
3.3.2 REGREESSION
The type used in this model is CLASSIFICATION and so, more focus will be given on it.
3.4 SYSTEM ARCHITECTURE
Crop yield is extremely useful information for farmers. Understanding the yield can help
you save money by lowering your losses. Crop yields were previously predicted by
experienced farmers. The proposed system works in a similar manner. It uses previous
data to forecast future yields. Crop productivity is most affected by weather and
fertilizers. The accuracy of this prediction is determined by the accuracy of the
information provided.
11
As a result, the proposed method predicts yield and reduces loss. The expected system
assumes the role of an experienced farmer. It is, however, more precise and takes into
account a number of additional parameters. There are several factors to consider,
including soil condition, weather forecast, pH, humidity, and yield.
CHAPTER 4
ALGORITHMS
4.1 RANDOM FOREST
Random Forest is a classifier that uses the average of a number of decision trees from
a given dataset to improve the predictive accuracy of the data set. Instead of relying on
a single decision tree, the random forest takes the predictions from each tree and
predicts the final output based on the majority vote of predictions.
Fig 4.1 Random Forest
13
4.2 K NEAREST NEIGHBOUR
4.3 DATASETS
The dataset comprising the soil specific attributes which are collected from Kaggle. In
addition, similar online sources of general crop data were also used. The crops
considered in our model include rice, maize, chickpea, kidney beans, pigeon peas, moth
beans, mungbean, black gram, lentil, pomegranate, banana, mango, grapes,
watermelon, muskmelon, apple, orange, papaya, coconut, cotton, jute, coffee gives an
analysis of the dataset. The number of instances of each crop available in the training
dataset is depicted. The attributes considered where Nitrogen(N), Potassium(K),
Phosphorus(P), Temperature, Humidity, Ph and Rainfall.
14
The above stated parameters of soil play a major role in the crop's ability to extract
water and nutrients from the soil. For crop growth to their fullest potential, the soil must
provide a satisfactory environment for it. Soil is the anchor of the roots. Nitrogen is
largely responsible for the growth of leaves on the plant. Phosphorus is largely
responsible for root growth and flower and fruit development. Potassium is a nutrient
that helps the overall functions of the plant perform correctly. Temperature is a key
factor in plant growth and development. Along with the levels of light, carbon dioxide, air
humidity, water and nutrients, temperature influences plant growth and ultimately crop
yields. Humidity directly influences the water relations of plant and indirectly affects leaf
growth, photosynthesis, pollination, occurrence of diseases and finally economic yield.
The level of acidity or alkalinity (Ph) is a master variable which affects the availability of
soil nutrients. The activity of microorganisms presents in the soil and also the level of
exchangeable aluminum can be affected by PH. rainfall can also determine how fast a
crop will grow from seed, including when it will be ready for harvesting. A good balance
of rain and proper irrigation can lead to faster-growing plants, which can cut down on
germination time and the length between seeding and harvest. Hence for the following
reasons the above stated parameters are considered for choosing a crop.
4.4 PACKAGES
Pandas
Scikit-learn
Scikit-plot
Matplotlib‘s pyplot
Seaborn
15
4.4.1 DATA MANIPULATION PACKAGES:
Pandas
o Pandas is a Python package that provides fast, flexible, and expressive data
structures that make it simple and intuitive to work with structured (tabular,
multidimensional, potentially heterogeneous) and time series data. It intends to
be the fundamental high-level building block for performing practical, real-world
data analysis in Python. Furthermore, it aspires to be the most powerful and
adaptable open-source data analysis and manipulation tool available in any
language. It is already well on its way to accomplishing this goal.
o Pandas' two primary data structures, Series (1-dimensional) and Data Frame (2-
dimensional), handle the vast majority of common use cases in finance,
statistics, social science, and many fields of engineering. Data Frame gives R
users access to all of R's data. Frame offers and much more. Pandas is built on
top of NumPy and is designed to work well in a scientific computing environment
alongside many other third-party libraries.
NumPy
o NumPy is a Python library that adds support for large, multidimensional arrays
and matrices, as well as a large collection of high-level mathematical functions
for working with these arrays. NumPy is open-source software with numerous
contributors.
Scikit-learn
17
o It was built on NumPy, SciPy, and Matplotlib.
Scikit-plot
Matplotlib’s pyplot
o Shells, the Jupyter notebook, web application servers, and four graphical user
interface toolkits are all available.
18
o It provides an object-oriented API for integrating plots into applications that use
general-purpose GUI toolkits such as Tkinter, wxPython, Qt, or GTK+.
o Pylab is a namespace that combines pyplot and NumPy. This is convenient for
interactive work, but it is recommended that the namespaces be kept separate
for programming.
HARDWARE
System: Pentium i3 Processor.
Hard Disk: 500 GB.
Monitor: 15‘‘ LED
Input Devices: Keyboard, Mouse
Ram: 2 GB
SOFTWARE
Operating system: Windows 7.
Coding Language: python
Tool: PyCharm, visual studio code
Libraries: OpenCV
19
4.6 BACKGROUND STUDY
4.6.1 OVERVIEW
Precision agriculture allows for the precise application of inputs such as seed,
water, pesticides, and fertilizers to crops at the optimal time to maximize
productivity, quality, and yields.
Farmers can better understand their fields by deploying sensors for data
collection and mapping fields, allowing them to conserve resources and reduce
negative environmental effects.
The majority of farmers use traditional farming patterns to determine which crops
to cultivate in a field. Farmers, on the other hand, do not believe crop yield is
affected by soil characteristics and climatic conditions.
As a result, our Precision Agriculture solution can propose a crop
recommendation system that assists farmers in determining the best crop to sow
in their field based on weather, moisture, and season.
One of the most important topics in precision agriculture is yield prediction, which is
critical for yield mapping, yield estimation, matching crop supply with demand, and crop
management to increase productivity.
20
All of this adds up to provide a comprehensive picture of the best times for
crop production. There are also what-if scenarios and alternative action
plans in place to deal with any unforeseen issues.
21
AgTech companies must focus on solutions that help predict yield based
on factors such as climate.
22
CHAPTER 5
5.1 RESULTS
The result of the classification model prepared using Python may be divided into three
parts in itself:
I. Pre-model Data Visualization
II. Model Information Visualization
III. Post-model Data Visualization
Visualization:
Plots are essentially one-way circuits. It is also a method for determining the
appropriation of each trademark in a size. The Density Plot is a simple histogram detail.
Thickness addresses an unsteady measurement of dissemination. It only recognizes
passages as a numerical list.
A density plot is used to track the distribution of at least one factor. The main thing to do
when recovering new information is to independently check the dissemination of the
factors. It provides a wealth of information.
23
Fig 5.1: Density Diagram
The above figure shows a comparison between density and the seven parameters i.e.,
Nitrogen(N), Potassium(K), Phosphorus(P), Temperature, Humidity, Ph and rainfall.
In this part of the chapter, the visualizations with respect to the model will
be discussed.
24
Confusion Matrix:
25
Fig 5.3: Confusion Matrix for KNN
The graph above shows the correct and incorrect classifications. It misclassified 22
times out of the 22 instances of training data used. This is clearly due to the bias that
was previously mentioned. There have been no other misclassifications, demonstrating
the model's integrity and reliability.
Correlation:
Correlation between attributes allows us to determine how strongly or weakly they are
related to one another. The positive relationship between the variables is represented
by the numeric value 1. The darker the colour of the numeric values 0, the more
negative the relationship between the variables.
26
Fig 5.4: Correlation Diagram
A correlation plot matrix can be formed for a collection of variables with each other
variables will be plotted against each other. Here have seven columns where normally
distributed with random values and column names are: Nitrogen(N), Potassium(K),
Phosphorus(P), Temperature, Humidity, Ph and rainfall.
27
Fig 5.5: Correlation Matrix Plot Diagram
The above figure provides data about the attributes Phosphorus(P), Potassium(K),
temperature and humidity may have an exponential distribution. The attribute
Nitrogen(N) is easy to notice the distribution is skewed very much to left and the
attribute rainfall is easy to notice the distribution is skewed very much to right. The
attribute ph. has a Gaussian or nearly Gaussian distribution.
28
Classification Report:
o Accuracy:
o Precision:
Precision is defined as the fraction of positive examples that are actually positive among
all positive examples predicted by us. It can also be defined as the number of true
positives divided by the total number of true positives plus false positives. False
positives occur when the model incorrectly labels something as positive when it is
actually negative,
29
or in our case, when the model incorrectly labels someone as a terrorist when they are
not.
o Recall:
In statistics, the metric our intuition tells us we should maximise is known as recall, or a
model's ability to find all relevant cases within a dataset. The number of true positives
divided by the number of true positives plus the number of false negatives is the precise
definition of recall. True positives are data points classified as positive by the model that
are actually positive (meaning they are correct), whereas false negatives are data points
classified as negative by the model that are actually positive (meaning they are correct)
(incorrect).
o F1-score:
It is traditionally defined as the harmonic mean of precision and recall. It's also known
as the F Score or the F Measure. In other words, the F1 score conveys the balance
between precision and recall. It is thought to be a better measure than Precision and
Recall
30
separately because the trade-off between the two is difficult to achieve.
The above figure represents all the necessary factors taken to determine whether a
model is good or bad. They are technically known as Model Evaluation Metrics.
31
5.1.3 POST-MODEL DATA VISUALIZATION
The attributes Nitrogen(N) and temperature may have an exponential distribution. The
attribute Phosphorus(P), Potassium(K) and rainfall is easy to notice the distribution is
skewed very much to left. The attribute humidity is easy to notice the distribution is
skewed very much to right. The attribute ph. has a Gaussian or nearly Gaussian
distribution
5.2 ANALYSIS
For farmers, crop yield is extremely useful information. Knowing the yield can help you
save money by reducing your losses. In the past, experienced farmers predicted crop
yields. In a similar way, the proposed system operates. It takes the prior data and
33
applies it to forecast future yields. The weather and fertilizers have the greatest impact
on crop productivity. The accuracy of the information provided determines the accuracy
of this prediction. As a result, the suggested approach anticipates yield and reduces
loss. The expected system takes on the role of a seasoned farmer. However, it is more
precise and takes into account a variety of additional parameters. Soil condition,
weather forecast, pH, humidity and yield are all factors to consider.
The above figure shows to discover, we will utilize seven unique fixings: nitrogen (N),
phosphorus (P), potassium (K), heat, temperature, pH, and precipitation. Presently you
want to get a decent gather to get a decent reap.
6.1 CONCLUSION
This research work can be enhancing to the high level by building a recommender
system of agriculture production and distribution for farmer. India may be a country
wherever agriculture is extremely vital. The prosperity of the farmers ends up in the
prosperity of the state. Thus, our work would assist farmers in sowing the acceptable
seed supported soil necessities so as to extend productivity and exploit such a way. As
a result, farmers will plant the acceptable crop, increasing their yield and therefore the
nation's overall productivity. Our future work can concentrate on associate degree
improved knowledge set with an oversized variety of attributes, in addition as yield
prediction.
37
REFERENCES
[1] Aruvansh Nigam, Saksham Garg, Archit Agrawal ―Crop Yield Prediction using ML
Algorithms ―, 2019 Fifth International Conference on Image Information Processing
(ICIIP)
[2] LeoBrieman, ―Random Forests‖, 2019 IEEE Transactions on Instrumentation and
Measurement
[3] Priya, P., Muthaiah, U., Balamurugan, M.‖ Predicting Yield of the Crop Using
Machine Learning Algorithm‖,2020 International Journal of Engineering Sciences &
Research Technology (IJESRT)
[4] Mishra, S., Mishra, D., Santra, G. H.,―Applications of machine learning techniques in
agricultural crop production‖,2020 Indian Journal of Science and Technology
[5] Dr.Y Jeevan Kumar,‖Supervised Learning Approach for Crop Production‖, 2020 5th
International Conference on Communication and Electronics Systems (ICCES)
[6] RameshMedar,Vijay S, Shweta, ―Crop Yield Prediction using Machine Learning
Techniques‖, 2018 International Journal of Engineering Sciences & Research
Technology (IJESRT)
[7] Ranjini B Guruprasad, Kumar Saurav, Sukanya Randhawa,‖Machine Learning
Methodologies for Paddy Yield Estimation in India: A CASE STUDY‖, IGARSS 2019 -
2019 IEEE International Geoscience and Remote Sensing Symposium
[8] https://en.wikipedia.org/wiki/Crop_yield
[9] https://en.wikipedia.org/wiki/Random_forest
[10] https://en.wikipedia.org/wiki/Knearest_neighbors_algorithm
[11] N. Suresh, Nvk Ramesh, Syed Inthiyaz, P. Poorna Priya, KurraNagasowmika,Kota
V. N. Harish Kumar, Mashkoor Shaik, B. Naresh Kumar Reddy,―CropYieldPrediction
Using Random Forest Algorithm‖,2021 7th International Conference on Advanced
Computing and Communication Systems (ICACCS)
[12] Mamunur Rashid, Bifta Sama Bari, YusriYusup, Mohamad Anuar, NuzhaKhan, ―A
Comprehensive Review of Crop Yield Prediction Using Machine Learning Approaches
with Special Emphasis on Palm Oil Yield Prediction‖,2021 IEEE Journal
38
[13] DhivyaElavarasan, P. M. Durairaj Vincent, ―Crop Yield Prediction Using Deep
Reinforcement Learning Model for Sustainable Agrarian Applications‖,2020 IEEE
Journal
[14] Roberto Luciani, Giovanni Laneve, MunzerJahjah, “Agriculture Monitoring, an
Automatic Procedure for Crop Mapping and Yield Estimation: The Great Rift
Valley of Kenya Case‖,2019 IEEE Journal of Selected Topics in Applied Earth
Observations and Remote Sensing
[15] Nida Rasheed, Shoab Ahmed Khan, Ali Hassan, Saria Safdar, ―A Decision Support
Framework for National Crop Production Planning‖,2021 IEEE Jounal
[16] Li He, Craig A, Zhi-Jie Wang, Wei Feng, Tian-Cai Guo, ―Reduced Prediction
Saturation and View Effects for Estimating the Leaf Area Index of Winter Wheat‖,2019
IEEE Transactions on Geoscience and Remote Sensing
[17] Alex F. Haufler, John H. Booske, Susan C. Hagness, ―Microwave Sensing for
Estimating Cranberry Crop Yield: A Pilot Study Using Simualted Canopies and Field
Measurement Testbeds‖,2022 IEEE Journal
[18] Laura Martínez-Ferrer, Maria Piles, Gustau Camps-Valls, ―Crop Yield Estimation
and Interpretability with Gaussian Processes‖,2021 IEEE Geoscience and Remote
Sensing Letters
[19] Abhinav S, Arpit Jain, Prateek Gupta, Vinay C, ―Machine Learning Applications for
Precision Agriculture: A Comprehensive Review‖,2021 IEEE Geoscience and Remote
Sensing Letters
[20] Emily Myers, John Kerekes, Craig Daughtry, Andrew Russ, ―Effects of Satellite
Revisit Rate and Time-Series Smoothing Method on Throughout-Season Maize Yield
Correlation Accuracy‖,2021 IEEE Journal Of Selected Topics In Applied Earth
Observations And Remote Sensing
[21] Anup K. Prasad a, Lim Chai b, Ramesh P. Singh a,b,*, Menas Kafatos b. (2005).
Crop yield estimation model for Iow a using remote sensing and surface parameters.
Elsevier. 0 (0), p26-33. Sciencedirect Jorunal
39
[22] Mutlu Ozdogan. (2010). The spatial distribution of crop types from MODIS data:
Temporal unmixing using Independent Component Analysis. Elsevier. 0 (0), p 1190-
1204. Sciencedirect Journal
[23] P.Vossen. (1993). Forecasting of National Crop Production:the Methodologies
Developed in theJoint research Centrein Supportto the commisionof European
Countries. EARSEL. 2 (2), P 158-166. Springerlink Journal
[24] D Rameshl , B Vishnu Vardhan2. (2013). Data Mining Techniques and Applications
to Agricultural Yield Data. IJARCCE. 2 (9), p3477-3480. International Journal of
Engineering Research Technology (IJERT)
[25] Paul C. Doraiswamya , Bakhyt Akhmedovb , Larry Beardc , Alan Sterna and
Richard Muellerc. (2006). OPERATIONAL PREDICTION OF CROP YIELDS USING
MODIS DATA AND PRODUCTS. ISPRS. 0 (0), p45-49. Scribd Conference
40
APPENDIX
A. CODE
from PyQt5 import QtCore, QtGui, QtWidgets
import seaborn as sns
import matplotlib.pyplot as plt
class Ui_MainWindow(object):
def setupUi(self, MainWindow) :
MainWindow.setObjectName("MainWindow")
MainWindow.resize(839, 678)
font = QtGui.QFont()
font.setUnderline(False)
MainWindow.setFont(font)
MainWindow.setContextMenuPolicy(QtCore.Qt.DefaultContextMenu)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.label = QtWidgets.QLabel(self.centralwidget)
self.label.setGeometry(QtCore.QRect(150, 0, 671, 121))
font = QtGui.QFont()
font.setBold(True)
font.setUnderline(False)
self.label.setFont(font)
self.label.setAutoFillBackground(True)
self.label.setStyleSheet("border-color: rgb(0, 0, 0);")
self.label.setText("")
self.label.setPixmap(QtGui.QPixmap("../images/mergeimg.jpg"))
self.label.setScaledContents(True)
self.label.setWordWrap(False)
self.label.setObjectName("label")
self.frame = QtWidgets.QFrame(self.centralwidget)
self.frame.setGeometry(QtCore.QRect(0, 0, 151, 641))
self.frame.setStyleSheet("background-color: rgb(0, 1, 86);\n"
"")
self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
self.frame.setObjectName("frame")
self.label_2 = QtWidgets.QLabel(self.frame)
self.label_2.setGeometry(QtCore.QRect(40, 10, 71, 61))
self.label_2.setStyleSheet("")
self.label_2.setText("")
self.label_2.setPixmap(QtGui.QPixmap("../images/logo2.png"))
self.label_2.setScaledContents(True)
self.label_2.setObjectName("label_2")
self.label_3 = QtWidgets.QLabel(self.frame)
self.label_3.setGeometry(QtCore.QRect(40, 70, 81, 21))
self.label_3.setStyleSheet("color: rgb(255, 255, 255);\n"
"font: 700 10pt \"Segoe UI\";")
self.label_3.setObjectName("label_3")
self.layoutWidget = QtWidgets.QWidget(self.centralwidget)
self.layoutWidget.setGeometry(QtCore.QRect(10, 180, 131,
220)) self.layoutWidget.setObjectName("layoutWidget")
41
self.verticalLayout = QtWidgets.QVBoxLayout(self.layoutWidget)
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
self.verticalLayout.setObjectName("verticalLayout")
self.pushButton = QtWidgets.QPushButton(self.layoutWidget)
self.pushButton.setMinimumSize(QtCore.QSize(35, 50))
font = QtGui.QFont()
font.setBold(True)
font.setUnderline(False)
self.pushButton.setFont(font)
self.pushButton.setAutoFillBackground(False)
self.pushButton.setStyleSheet("background-color: rgb(0, 0, 0);\n"
"color: rgb(255, 255, 255);")
self.pushButton.setObjectName("pushButton")
self.verticalLayout.addWidget(self.pushButton)
self.pushButton_3 = QtWidgets.QPushButton(self.layoutWidget)
self.pushButton_3.setMinimumSize(QtCore.QSize(35, 50))
font = QtGui.QFont()
font.setBold(True)
font.setUnderline(False)
self.pushButton_3.setFont(font)
self.pushButton_3.setAutoFillBackground(False)
self.pushButton_3.setStyleSheet("background-color: rgb(0, 0, 0);\n"
"color: rgb(255, 255, 255);")
self.pushButton_3.setObjectName("pushButton_3")
self.verticalLayout.addWidget(self.pushButton_3)
self.pushButton_2 = QtWidgets.QPushButton(self.layoutWidget)
self.pushButton_2.setMinimumSize(QtCore.QSize(35, 50))
font = QtGui.QFont()
font.setBold(True)
font.setUnderline(False)
self.pushButton_2.setFont(font)
self.pushButton_2.setAutoFillBackground(False)
self.pushButton_2.setStyleSheet("background-color: rgb(0, 0, 0);\n"
"color: rgb(255, 255, 255);")
self.pushButton_2.setObjectName("pushButton_2")
self.verticalLayout.addWidget(self.pushButton_2)
self.pushButton_4 = QtWidgets.QPushButton(self.layoutWidget)
self.pushButton_4.setMinimumSize(QtCore.QSize(35, 50))
font = QtGui.QFont()
font.setBold(True)
font.setUnderline(False)
self.pushButton_4.setFont(font)
self.pushButton_4.setAutoFillBackground(False)
self.pushButton_4.setStyleSheet("background-color: rgb(0, 0, 0);\
n"
"color: rgb(255, 255, 255);")
self.pushButton_4.setObjectName("pushButton_4")
self.verticalLayout.addWidget(self.pushButton_4)
self.frame_2 = QtWidgets.QFrame(self.centralwidget)
self.frame_2.setGeometry(QtCore.QRect(150, 120, 671, 521))
self.frame_2.setStyleSheet("background-color: rgb(0, 93, 93);\n"
42
self.frame_2.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised)
self.frame_2.setObjectName("frame_2")
self.templabel = QtWidgets.QLabel(self.frame_2)
self.templabel.setGeometry(QtCore.QRect(210, 10, 251, 51))
self.templabel.setStyleSheet("color: rgb(255, 255, 255);\n"
"font: 700 10pt \"Segoe UI\";")
self.templabel.setObjectName("templabel")
self.frame_3 = QtWidgets.QFrame(self.frame_2)
self.frame_3.setGeometry(QtCore.QRect(10, 70, 651, 51))
self.frame_3.setStyleSheet("background-color: rgb(255, 255, 255);")
self.frame_3.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.frame_3.setFrameShadow(QtWidgets.QFrame.Raised)
self.frame_3.setObjectName("frame_3")
self.label_5 = QtWidgets.QLabel(self.frame_3)
self.label_5.setGeometry(QtCore.QRect(20, 10, 61, 21))
self.label_5.setObjectName("label_5")
self.statecombobox = QtWidgets.QComboBox(self.frame_3)
self.statecombobox.setGeometry(QtCore.QRect(90, 10, 131, 21))
self.statecombobox.setObjectName("statecombobox")
#------------- Here I have put the skeleton of the state
for i in range (len(state_list)):
self.statecombobox.addItem("")
self.showdata = QtWidgets.QPushButton(self.frame_3)
self.showdata.setGeometry(QtCore.QRect(480, 10, 151, 31))
self.showdata.setStyleSheet("background-color: rgb(0, 130, 0);\n"
"color: rgb(255, 255, 255);")
self.showdata.setObjectName("showdata")
self.districtcombobox = QtWidgets.QComboBox(self.frame_3)
self.districtcombobox.setGeometry(QtCore.QRect(320, 10, 131, 22))
self.districtcombobox.setObjectName("districtcombobox")
for i in range (len(district_list)):
self.districtcombobox.addItem("")
# --------------Here you have put the district's skeleton
self.label_6 = QtWidgets.QLabel(self.frame_3)
self.label_6.setGeometry(QtCore.QRect(240, 10, 71, 21))
self.label_6.setObjectName("label_6")
self.label_4 = QtWidgets.QLabel(self.frame_2)
self.label_4.setGeometry(QtCore.QRect(20, 160, 231,
171)) self.label_4.setObjectName("label_4")
self.piechartcrop = QtWidgets.QLabel(self.frame_2)
self.piechartcrop.setGeometry(QtCore.QRect(10, 190, 301,
231)) self.piechartcrop.setText("")
self.piechartcrop.setScaledContents(True)
self.piechartcrop.setWordWrap(False)
self.piechartcrop.setObjectName("piechartcrop")
self.piechartcategory = QtWidgets.QLabel(self.frame_2)
43
self.piechartcategory.setGeometry(QtCore.QRect(350, 190, 301, 231))
font = QtGui.QFont()
font.setPointSize(12)
font.setBold(False)
self.piechartcategory.setFont(font)
self.piechartcategory.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.piechartcategory.setAutoFillBackground(False)
self.piechartcategory.setText("")
self.piechartcategory.setScaledContents(True)
self.piechartcategory.setObjectName("piechartcategory")
self.frame_4 = QtWidgets.QFrame(self.frame_2)
self.frame_4.setGeometry(QtCore.QRect(10, 430, 651, 51))
self.frame_4.setStyleSheet("background-color: rgb(255, 255, 255);")
self.frame_4.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.frame_4.setFrameShadow(QtWidgets.QFrame.Raised)
self.frame_4.setObjectName("frame_4")
self.label_9 = QtWidgets.QLabel(self.frame_4)
self.label_9.setGeometry(QtCore.QRect(30, 20, 91, 16))
self.label_9.setObjectName("label_9")
self.label_10 = QtWidgets.QLabel(self.frame_4)
self.label_10.setGeometry(QtCore.QRect(250, 20, 71, 16))
self.label_10.setObjectName("label_10")
self.label_11 = QtWidgets.QLabel(self.frame_4)
self.label_11.setGeometry(QtCore.QRect(450, 20, 71, 16))
self.label_11.setObjectName("label_11")
self.suggestedcrop = QtWidgets.QLabel(self.frame_4)
self.suggestedcrop.setGeometry(QtCore.QRect(130, 20, 111, 16))
self.suggestedcrop.setObjectName("suggestedcrop")
self.alternate1 = QtWidgets.QLabel(self.frame_4)
self.alternate1.setGeometry(QtCore.QRect(330, 20, 111, 16))
self.alternate1.setObjectName("alternate1")
self.alternate2 = QtWidgets.QLabel(self.frame_4)
self.alternate2.setGeometry(QtCore.QRect(530, 20, 111, 16))
self.alternate2.setAutoFillBackground(False)
self.alternate2.setObjectName("alternate2")
self.cropwiselabel = QtWidgets.QLabel(self.frame_2)
self.cropwiselabel.setGeometry(QtCore.QRect(50, 150, 231, 21))
self.cropwiselabel.setStyleSheet("color: rgb(255, 255, 255);")
self.cropwiselabel.setObjectName("cropwiselabel")
self.categorywiselabel = QtWidgets.QLabel(self.frame_2)
self.categorywiselabel.setGeometry(QtCore.QRect(360, 150, 301, 21))
self.categorywiselabel.setStyleSheet("color: rgb(255, 255, 255);")
self.categorywiselabel.setObjectName("categorywiselabel")
self.frame.raise_()
self.label.raise_()
self.layoutWidget.raise_()
self.frame_2.raise_()
MainWindow.setCentralWidget(self.centralwidget)
self.statusbar =
QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
44
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
45
B. SCREENSHOTS
46
47
48
49
C.PUBLICATION WITH PLAGIARISM REPORT
50
51