Professional Documents
Culture Documents
EB1/32973/17
SMARTFARMKE
MR. OTULA
i
CHAPTER 6: EXISTING SYSTEM INVESTIGATION AND ANALYSIS..............................20
6.0 Introduction..........................................................................................................................20
6.1 Environment Specification..................................................................................................20
CHAPTER 7: CURRENT SYSTEM INVESTIGATION AND DATA COLLECTION.............21
CHAPTER 8: THE INTENDED SYSTEM..................................................................................22
8.1 System Analysis...................................................................................................................22
8.2 Requirements Definition......................................................................................................22
8.2.1 Functional Requirements..............................................................................................23
8.2.2 Non-Functional Requirements......................................................................................23
CHAPTER 9: DIFFERENT ASPECTS OF THE DESIGN..........................................................24
9.0 INTRODUCTION...............................................................................................................24
9.1 PROCESS AND DATA FLOW DIAGRAMS....................................................................24
9.2 UML DIAGRAMS..............................................................................................................25
9.2.1 USE CASE DIAGRAM...............................................................................................25
9.2.2 GET PREDICTED CROP TO PLANT SEQUENCE DIAGRAM..............................26
9.3 MODEL TRAINING...........................................................................................................26
9.3.1 DATASET COLLECTION..........................................................................................26
9.3.2 DATA TRANSFORMATION.....................................................................................27
9.3.3 MODEL BUILDING....................................................................................................27
9.3.4 MODEL DEPLOYMENT............................................................................................27
9.4 DATASET FILE HEADERS..............................................................................................27
REFERENCES..............................................................................................................................28
ii
LIST OF FIGURES
Figure 1: Waterfall model………………………………………………………………….11
Table 1: Project Budget ……………………………………………………………………….17
Table 2: Gannt Time Chart…………………………………………………………………….18
Table 3 Project Schedule …………………………………………………………………….19
Figure 2 Use case Diagram……………………………………………………………………25
Figure 3 Get Predicted Sequence Diagram……………………………………………………26
Table 4 Data file headers……………………………………………………………………….27
iii
ACRONYMS
UML – Unified Modelling Language
CSV – Comma Separated Values
API - Application Programming Interface
SDLC- Software Development Life Cycle
ICT- Information Communication and Technology
IoT- Internet of Things
NARS- National Agriculture Research Systems
NASEP- National Agriculture Sector Extension Policy
iv
CHAPTER 1: INTRODUCTION
1.0 Introduction
Since the evolution of agriculture in Mesopotamia, agriculture has been essential in
human history. It is indispensable because it provides resources like food, medicine, energy. The
industrial revolution has contributed to unprecedented population growth, especially in
developed countries, due to increased food supply. This phenomenon triggered new agricultural
practices that led to the emergence of capitalist farmers to exceed their peaks to sustain their
countries' rise of industrial preeminence. Most developed countries have emphasized the
agricultural industry's roles and adopted new and emerging technologies to maximize their farm
products. They have deployed heavy machinery, farming robots, and engineered productive
seeds supplied to farmers, gradually increasing agricultural productivity.
On the contrary, developing and third world countries are still facing challenges in
providing enough products to their rising population because we are still using the mundane old
farming practices. Kenya is a third world country with an economy that is pivoted on agriculture;
75% of the 49.2 million is engaged in farming labor in different parts of the country. As the
mainstay of the Kenyan economy, agriculture contributes up to 60% of the total foreign
exchange earnings. Major agricultural products in Kenya include tea, coffee, horticulture, corn,
wheat, sugarcane, dairy products, beef, pork, poultry, and eggs. Since Farming is majorly based
on predictions that fade as time falls, most of our farmers lack proper knowledge, making
Farming and agricultural activities more erratic.
Advancements of other industries, especially Information Communication and
Technology (ICT), and the verge of a technological revolution called Machine learning and the
Internet of Things (IoT), the agricultural industry is accelerating to develop by intensely
employing these technologies. In particular, this project (SmartFarm KE) is to create an android
application that will help farmers focus on the efficiency of the production process and maximize
production of all agricultural products to transform agricultural productivity to achieve food
security to reduce poverty by monitoring the environmental and ecological conditions, analyzing
the current weather data, then suggesting the best plantation time and type of crops for a given
region across the country. The idea is to digitize Farming and its practices to help farmers check
on crop requirements and predict their growth. The implementation depends on farmers'
awareness and can be quickly adopted due to the project's numerous advantages.
5
products for home consumption, therefore playing a pivotal role in reducing poverty. The Kenya
Vision 2030 recognizes the importance of transforming and modernizing the farming sector to
address the current challenges with different policies like National Agriculture Research Systems
(NARS) and the National Agriculture Sector Extension Policy (NASEP)
However, agricultural production has drastically reduced over the years due to a lack of
proper know-how on production factors; for instance, the climatic conditions of the region have
recently changed, resulting from changes in seasons, which has affected most farmers in the
country. Kenyan farmers, minimal scale, lack ease and direct access to the information
concerning environmental and ecological conditions suitable to various crops and animal species
(livestock), which makes them make poor decisions resulting in losses. Most farmers fail to
diversify production due to a lack of knowledge on what should be grown or reared apart from
what is on the stock after the latter fails to give returns. These perpetual losses have killed their
morale, making them quit Farming, resulting in lower production in the country, posing a risk on
food security. Therefore, there is a need to provide a suitable, accessible, and informative
solution to all farmers at different scales to help them make the most suitable decisions to
maximize agricultural products' production and transform agricultural productivity to achieve
food security to reduce poverty.
To eradicate this whole problem affecting farmers, we will develop an android application that
will help farmers across the country know what crops to grow in the given region and at what
time. SmartFarmKE focuses on analyzing crop diversification and crop trends based on available
datasets. Analyzing ecological conditions, environmental changes, and weather conditions with
the help of machine learning and Artificial intelligence will help farmers gain insight into the
strongest and weakest section of their farm fields, especially small scale to get profits from their
agricultural products, transform agricultural productivity to achieve food security to reduce
poverty.
6
3. Farmers lack the knowledge to predict patterns due to changing climate.
4. Ignorance, especially to small scale farmers of weather forecasting
5. Farmers do not know the appropriate crops to plant at a given time.
6. Food Security.
1.3.2 Objectives
The project's main objective is to develop an android application that analyzes ecological
and weather conditions, then suggests specific crops that can be grown in a given region over a
given time and help farmers choose suitable crops to increase productivity and yields not to incur
unnecessary losses.
Specific Objectives
1. To analyze and visualize all the data and present it with ease on a satellite map.
2. To analyze ecological conditions and then suggest most suitable crop and planting
season.
3. To show Weather analysis and prediction for early detection of the affected region.
4. To provide Field and finance data available in the same place showing the profits, yields,
and patterns with simple reports.
7
achieving Vision 2030. This smart, informative Farming has been incorporated with modern
farming concepts that look into increasing productivity, incomes, enhancing the resilience of
farmers' livelihoods, and removing greenhouse gas emissions. Since smart Farming with IoT is
expensive to install and heavily dependent on types of machinery like sensors, cables, and high
maintenance operations, SmartFarmKE will be a simple android app that analyzes ecological
conditions from available datasets, precision farming, predictive analytics, and raw data to
monitor climate conditions and predict future calamities. It is rooted in sustainable Farming and
rural development objectives, which would contribute to achieving the Sustainable Development
Goals (SDGs) of reducing hunger and improved environmental management.
8
CHAPTER 2: LITERATURE REVIEW
In most developing countries, agriculture is the backbone of the economy for sustainable
development. In the last 10- 15 years, technology has been developed and is being adopted and
interjoined with other fields to enhance production efficiency (Lwoga. E, 2010). Agriculture has
been given emphasis by researchers to apply technology in agriculture, and this is called Smart
farming (Wolfert et al., 2017). This is a concept that emphasizes farm management concepts
based on data acquired through various sources (historical, geographical and instrumental)
analyzed with technologies like IoT, robotics, drones, big data and analytics and machine
learning (Big-Data Analytics for Cloud, IoT and Cognitive Computing, 2013). The main goal of
smart farming is to provide the optimum conditions to maximize growth and the harvest capacity
through using computers and modern technology to control temperature, humidity, water sprays
and sunlight.
The climate smart agriculture was first launched in 2010 by FAO in a paper prepared by
Hague Conference on Agriculture, Food Security and Climate change. According to a report by
FAO, it has estimated that there will be a population of 8.5 billion human beings on the planet
and 9.6 billion inhabitants by 2050 (Alexandratos & Bruinsma, 2012). To feed this population,
food production must increase by 70% considering the challenges of climate change, rural-urban
migration, scarcity of fresh water and global warming. This challenge can be addressed by
improving the quality and quantity of agricultural products by adopting different smart farming
technologies to achieve the 4.0 Green Revolution. In most developed countries like the USA
80% and 24% of the farmers in the UK are already using Smart Farming Tools (SFT) ad have
added value to the farming ecosystem (Ayre et al., 2019). Smart farming techniques can be
applied to large scale in other developing countries whose economy strongly depends on
agricultural products.
Smart Farming is based on different technologies and tools that optimize the human labor
to increase the quality and quantity of agricultural products. The Internet of Things (IoT)
applications collect data through sensors, the data is analyzed through specialized software that
target specific farming demands on the IoT platforms and internet clouds. Connectivity is either
through cellular networks or cables that have a purpose of connecting and exchanging data with
all the systems that have been connected to the system. There are also standalone data analytics
solutions that are interconnected with data pipelines for downstream solutions. This helps
farmers to monitor field conditions at your comfort. IoT connects smart machines and sensors
that have been integrated to make farming processes that are data driven and data enabled (Ayaz
et al., 2019).
Also, Smart Farming has been enhanced through Precision Agriculture that uses Big
Data, Data mining and IoT techniques to improve the crop yield in agriculture through
9
measuring ecological factors. Precision Farming has been incorporated with IoT sensors,
machine to machine (M2M) GPS communication and analysis techniques like regression
techniques, CLARA, PAM, and DBSCAN. PF focuses on identifying critical factors from cluster
data and adopts each sensor to different cluster data (Khanna & Kaur, 2019). The system
includes Decision Support Systems (DSS) that optimizes returns on inputs while preserving
resources that are enabled by use of GPS, aerial images, GNSS, and drones that are provided by
Sentinel satellites that create maps of the Spatial Variability of many variables that can be
measured like crop yield, terrain features, matter content, nitrogen and moisture levels.
Other systems that emphasize the use of information and communication technology in
Smart Farming and go beyond primary production to the entire food production chain through
predictive insight in farming operations. Cost management and waste reduction is easily
controlled due to the ability to see anomalies on crop growth and livestock health. Climate
monitoring systems have been developed and installed in farming and weather stations.
Predictive analytics has helped farmers to know crop harvesting times, risks, diseases and
infections and act upon them (Hubbard et al., 1983).
10
CHAPTER 3: METHODOLOGY
3.1 Introduction
This chapter describes the different fact finding and software development methodologies
that are to be used in order to achieve the goals and objectives of the intended system such as
SDLC, data collection, data analysis, literature review, system design, implementation, testing,
deployment and maintenance.
Requirement Analysis
System Design
Implementation
Testing
Deployment
Maintenance
11
specification document. It should have a good requirement gathering, efficient
examination of requirement and a clear documentation.
2. System Design: System requirement specifications that have been collected are studied
and a system design is prepared. In this phase, all hardware and system requirements are
defined, and also the overall system architecture. In this process we define, develop and
design system that satisfies needs and requirements of the customer requirements.
3. Implementation: All inputs from the system design are taken and developed into small
unit programs, which are integrated in the next phase. Each unit is developed and tested
for functionality also known as Unit Testing. In this phase nothing is yet distributed to the
customer or organization.
4. Integration and Testing: All the units that have been developed are integrated into a
system after each unit has been tested. Then post integration testing is done to expose any
defects and failures in the interaction between these software modules.
5. Deployment of the System: Once the functional and non-functional testing is done; the
product is deployed in the customer environment or released into the market.
6. Maintenance: Once the system has been handed over to the client, issues may arise. To
fix the errors or issues, patches are released. Hence system maintenance is done to deliver
the changes to the customer environment.
12
iii. It is the simplest method of data collection. Everybody in this world observes many
things in their daily life.
b) Reviewing documentation
Documentation analysis is a form of qualitative research in which documents are
interpreted by the researcher to give voice and meaning around an assessment topic.
Reasons for using document review:
i. Document review will enable one to get access to information that would be
difficult to get in any other way, such as people who might not be willing to talk
during interview or information about past problems.
ii. It will help collect larger samples of data than might be collected from
questionnaires or interviews.
iii. It is a relatively low-cost method of data collection. This is because the
documents are easily accessible and already located on the internet.
c) Public datasets.
A public dataset is any dataset that is stored and made available to the general public.
These datasets are what data scientists use to develop algorithms and train models. These
public datasets can be found in repositories such as Kaggle. These datasets are provided
for free. For this project datasets about crops and weather will be used.
13
3.2.3.2 Uses of Content Analysis
1. It is used to identify the intentions, focus or communication trends of an individual, group
or institution.
2. Determines psychological or emotional state of persons or groups.
3. Reveals patterns in communication content.
4. Its analysis focuses on group interviews and open-ended questions to complement
quantitative data.
5. Pre-test and improve an intervention or survey prior to launch.
14
4. Implementation: This will be probably the most resource, cost, and time-consuming
phase of all. This is when the system is built, tested, and finally installed. It will also
include activities such as user training and system maintenance.
MySQL: MySQL is the world's most popular open-source database. This the database that data
from the app will be store to. MySQL is free, user friendly and secure.
15
White Box Testing
White Box Testing is a testing in which the software tester has knowledge of the inner
workings, structure and language of the software, or at least its purpose. It is used to test
areas that cannot be reached from a black box level.
Black Box Testing
Black Box Testing is testing the software without any knowledge of the inner workings,
structure or language of the module being tested. Black box tests, as most other kinds of
tests, must be written from a definitive source document, such as specification or
requirements document. It is a testing in which the software under test is treated as a
black box, you cannot “see” into it. The test provides inputs and responds to outputs
without considering inner part of the software.
16
17
CHAPTER 4: RESOURCES REQUIRED / BUDGET
18
CHAPTER 5: TIME PLAN
1 2 3 4 6 5 7 8 10 11 12 13 14 15 16 17 1 19 20 21
8
Planning
Requirement
Gathering
System Analysis
System Design
Submission
of project
documentation
Oral presentation
Coding
Testing
Integration
Presentation
19
5.2 Time Plan: Project Schedule
Task no Description Duration Start time End time Deliverable
20
CHAPTER 6: EXISTING SYSTEM INVESTIGATION AND ANALYSIS
6.0 Introduction
In this chapter, existing systems are studied in details. The chapter will also discuss about
system investigations findings that were carried out. Weaknesses of the existing system are
established and strengths of the proposed system are discussed.
Requirement Analysis
System Design
Implementation
Testing
Deployment
21 Maintenance
CHAPTER 7: CURRENT SYSTEM INVESTIGATION AND DATA COLLECTION
Weather forecasting for agriculture can be grouped into different rages depending on the
forecast range. This can be short range forecast (up to 48 hours), medium range forecast (3- 10
days) and long-range forecast (one week to entire season). Each range plays an important to
farmers in farm operations and planning of agricultural activities.
Farmers across the Kenya, still use traditional weather forecasting techniques to make
decisions on what to plant. Farmers plan their farming activities based on past weather patterns
and nature pattern. Farmers observe patterns such as the shift in the rhythm of the nightly frog-
croaking to tell when the rain is coming. Farmer have however found that those methods are
becoming unreliable. This prediction method has resulted in losses in crops planted and a
reduction in harvest quantity.
Due to climate change impacts those observations do not seem to be accurate anymore.
Farmers have not yet utilized information from the Kenya Meteorological Department. The
meteorological department is responsible for giving up-to-date weather information ("Kenya
Meteorological Department", n.d.). Only a two-third of farmers in the country use weather
information in from the Kenya Meteorological Department. Most farmers still do not use
information from the department. Farmers still trust customs over science.
The meteorological department tries to get weather forecasting information to farmers by
providing sending out agents to the locals (Barrett et al., 2020). The agents work is to hold
meetings with farmers while they share the forecasts and tips on how farmers can prepare their
farms for the coming weather. The department is not able to send out agents to every village in
the country thus not all locals get the information.
Farmers who able to get weather forecasting information have found it to be very
technical and too complicated. Information presented to the farmers as generalized information is
of little help to the farmer. Farmers are more interested in information that is covers their own
area so that they can plan accordingly (Aura et al., 2015).
22
CHAPTER 8: THE INTENDED SYSTEM
The intended system is a mobile application that provides suggestions on what a farmer can
plant. The application will recommend what crop to plant at a certain period using machine
learning. The system will be geared towards offering farmers with easily digestible information
about what crop to plant to increase yield expectations.
23
8.2.1 Functional Requirements
The mobile application will be used by farmers. Farmers will be able to:
- Provide time of the year to predict
- Provide pH scale
- Select the region to offer predictions
- Select the soil type
- Retrieve crop predictions
i. The user interface for the system should be user friendly and information should
be presented in the most accurate form possible.
ii. The application should scale appropriately to handle increase in traffic on
prediction API calls.
iii. Downtimes on the system should be resolved as fast as possible without any lose
to data on the system.
24
CHAPTER 9: DIFFERENT ASPECTS OF THE DESIGN
9.0 INTRODUCTION
System Design is the stage in software development cycle where diagram representation of the
concepts developed during the system analysis are developed. The diagrams help to visualize
how the functionalities of the final product. The diagrams are created using a standard known as
Universal Modelling Language (UML).
Beginning or ending of a
process
Data It indicates the user expected
input/output of a given
process
25
Actor It represents a system entity
SMARTFARMKE
gather dataset
and known response
prepare dataset
examine and
update till satisfied
26
9.2.2 GET PREDICTED CROP TO PLANT SEQUENCE DIAGRAM
trained_
farmer app model API
model
4. model result()
28
REFERENCES
Albig, W. (1952). BERELSON, BERNARD. Content Analysis in Communication Research. Pp.
220. Glencoe, Ill.: The Free Press, 1952. $3.50. The ANNALS of the American Academy
of Political and Social Science, 283(1), 197-198.
Alexandratos, N., & Bruinsma, J. (2012). World agriculture towards 2030/2050: the 2012
revision.
Aura, S., Muthama, N., Karanja, F., Kahuha, S., Chanzu, B., & King’uyu, S. (2015). Making
Meteorological Services More Beneficial to Farmers. World Meteorological
Organization. Retrieved 09 March 2021.
Ayaz, M., Ammad-Uddin, M., Sharif, Z., Mansour, A., & Aggoune, E. H. M. (2019). Internet-of-
Things (IoT)-based smart agriculture: Toward making the fields talk. IEEE Access, 7,
129551-129583.
Ayre, M., Mc Collum, V., Waters, W., Samson, P., Curro, A., Nettle, R., ... & Reichelt, N.
(2019). Supporting and practising digital innovation with advisers in smart
farming. NJAS-Wageningen Journal of Life Sciences, 90, 100302.
Balaji, S., & Murugaiyan, M. S. (2012). Waterfall vs. V-Model vs. Agile: A comparative study
on SDLC. International Journal of Information Technology and Business Management,
2(1), 26-30
Barrett, S., Ndegwa, W., & Maggio, G. (2020). The value of local climate and weather
information: an economic valuation of the decentralised meteorological provision in
Kenya. Climate and Development, 13(2), 173-188.
Brownlee, J. (2020). Why Use Ensemble Learning? Machine Learning Mastery. Retrieved 07
March 2021.
Chugh, A. (2019). ML | Label Encoding of datasets in Python - GeeksforGeeks. GeeksforGeeks.
Retrieved 07 March 2021.
Hubbard, K. G., Rosenberg, N. J., & Nielsen, D. C. (1983). Automated weather data network for
agriculture. Journal of Water Resources Planning and Management, 109(3), 213-222.
Kenya Meteorological Department. Meteo.go.ke. Retrieved 09 March 2021.
Khanna, A., & Kaur, S. (2019). Evolution of Internet of Things (IoT) and its significant impact
in the field of Precision Agriculture. Computers and electronics in agriculture, 157, 218-
231.
29
Lwoga, E. T., Ngulube, P., & Stilwell, C. (2010). Managing indigenous knowledge for
sustainable agricultural development in developing countries: Knowledge management
approaches in the social context. The International Information & Library Review, 42(3),
174-185.
Wolfert, S., Ge, L., Verdouw, C., & Bogaardt, M. J. (2017). Big data in smart farming–a
review. Agricultural systems, 153, 69-80.
30