Planting time determination for food crops using decision tree

Before the world experienced climate change, people can predict rainy and dry seasons easily. It is because the period is fixed throughout the year. The industrial revolution has caused global warming and affect climate change resulting in climate anomalies may decrease or increase in air temperature extreme, rainfall and seasons are shifting from the usual pattern and not erratic as well as rising sea levels and the occurrence of rob in some areas including in Indonesia. As consequence, the planting period is become difficukt to predict. Climatic factors, especially temperature, humidity, and rainfall strongly influences the process of determining the planting period for food crops. The domino effect of this mistake stimulates pest explosions, increased production costs as well the difficulty of providing food in the market. One of the technologies to assist farmers in determining the planting period is based on climate predictions from BMKG and data on food crops from the Dinas Pertanian. The process of extraction of climate data from BMKG can be applied with webservice technology. The process of determining the planting period and selection of the appropriate plant species is the application of data mining using the method of decision tree. The data in the process in this study is weather and harvest data in 2014 to 2016. The results of this study is an application that can facilitate farmers in determining the right planting or type of seeds.


Introduction
Farmers use the Java planting calendar or prey order for farming guidance. The determination of the type of food crop follows the prey calendar. It is not precise anymore since the current climate that tends to be unpredictable. Therefore, there is a need for a solution to increase farmers' productivity by minimizing errors in the selection of plant species.
Data Service provided by BMKG contains climate data on certain areas including temperature, rainfall, humidity. The data can be publicly accessed and updated regularly by BMKG. The Agricultural Service collects annual crop data for food crops. The yield data will then be combined with climate data obtained from BMKG to be stored in the application data warehouse.
The data collected in the data warehouse then performed the process of data mining using the decision method. After the data mining process will beknown what type of plant is suitable to be planted in a certain period. In order not to widen the problem there needs to be a systematic discussion of the problem, so the limitation on this research is to help for the farmers to determine the appropriate cropping pattern with the weather. The location of research in this research is in Sleman Regency Yogyakarta Indonesia.

Literature Review
Preliminary studies conducted by climate-related and weather reporters have been reported by Mass Clifford (Mass., 2012). In this study it was submitted that Nowcasting combines descriptions of the current state and short-term estimates of how the atmosphere will evolve over the next several hours. Problems resolved in this study include: addressing weather mesoscale information, quick fixes in numerical modelling and assimilation data. The results are presented in the form of graphic and data information.
Furthermore in 2015 conducted weather prediction research using Deep Hybrid method by Groffer and Horvitz (Grover & Horvitz, 2015). Predictions are made with the Deep Hybrid approach that incorporates discriminatory models and trained neural networks. Test results from this study indicate that the new methodology yields better data based on the NOAA benchmark, as well as showing improvement over the benchmark.
A study that combines weather prediction in the determination of the period planting done in 2012 by [8]. This study examined the effect change of date of Rice planting in dry season simulated with using Decision Support Software of Agrotechnology Transfer System (DSSAT 4.5).
Setting cropping pattern that is guided by hereditary habits on dry land, currently at risk of failure due to climate change. This research performed by [9].

Method
a. Data collection At this stage will be data collection service API (Application Programmable Interface) about climate and weather from BMKG in order to receive data in real time. In addition, the necessary data from the Agriculture Service related to the suitability of the type of plants with weather conditions as well as historical data of the harvest. After the data collected then performed data selection and continued with data transformation process. b. Web service Design Based on the data service that has been collected and extraction process, then designed the process of data synchronization of API service into the server system to be developed. c. Implementation of Data Service Integration BMKG and Datamining: Learning At this stage will be implemented data integration with datamining method, namely Decision Tree. Web-developed system to communicate with data service and accessed further in the mobile native application development stage.

System Analysis
Climatological search procedures in accordance with climatology to be planted in a certain period can be seen in Figure 1. Based on the results of data synchronization BMKG and observation of data from the Department of Agriculture has been done, the data is stored in the database. The application flow of the use case consists of:  Climate Data Synchronization Climate data used for mining process obtained from public data BMKG through address http://data.bmkg.go.id. From the public data is then performed the process of synchronization into the application using the method -simple_load_xml. The picture synchronization process is as Figure 2. After xml data obtained from BMKG then done process of data filtering. Filtering data aims to filter what data will be used in the next process. After the filtering process is completed proceed by storing data in the database.

 Data collection
The data collection process is done after obtaining climate data from the synchronization process and the average data every four months of food crops in Sleman, Yogyakarta.
 Making Decision Tree At this stage crop and climate data are combined to create a data integration table. Data integration that has been made into materials to do the mining process using decision tree method. The structure of the integration data table are: ID as primary key, Temperature, Humidity, Rainfall, rice, corn, beans, soybean, cassava. From the data integration then made a decision tree that will be applied into the application. Examples of decision trees that have been made can be seen in Figure 3.
After the decision tree is created the next step is to implement the rule into the application.

Implementation
Users of this application are Farmers and Agriculture Service. Department of Agriculture in charge of input basic data which then processed by the system. Processed results are then displayed to be absorbed Farmers who access this application. Interface design created among others: 1) Weather Sync The synchronization process begins by pulling the last XML data from the BMKG data service ( Figure  4). After withdrawal then filtered as needed. The last step of the sync process is to save the results into the database.

2) Option Choice for prediction
To be able to predict farming patterns, farmers are faced with two choices. First prediction of planting based on the type of seeds that will predict the future is the appropriate planting period. The second is the prediction of planting based on the planting period that the result is the type of seed. Figure 5 contains sample predictions for January. January is included in the category of quarter 1. The exact crops for January are predicted to be rice.

Testing
After the implementation of the application proceed with the testing process. The testing process is done in 2 stages of system test and acceptance.
1. System Test In testing system test done by developer using BlackBox test method. From blackbox testing to the created application, the whole function can be operated well. The conclusion of the blackbox test on the application is said to be successful.

Acceptance Test
Acceptance Testing on application is performed by the end user, that is Agriculture Department and farmer. This test aims to measure the usefulness of the application made. The test results are shown in Figure 6 and Table 1.  Applications are able to provide alternative solutions to planting period according to the type of seed 10 3 Applications are able to provide seed type solutions according to the planting period 7 3

4
The app has feedback or feedback feeds 10 Total 15 25 Description: SA: Strongly Agree D: Disagree A: Agree SD: Strongly Disagree

Conclusions
After analysing, designing, implementing and testing stages, it can be concluded that the built application can assist the farmers in determining the planting period according to the type of seed, or determine the type of seeds in certain planting period according to the climate. For future development, the error in determining the type of plant can be minimized to avoid the risk of crop failure. This app is easy to use Applications are able to provide alternative solutions to planting period according to the type of seed