Published on

Unified System for Agriculture Prediction using Al (USAPA)

1652 words9 min read–––

Check It Out 🔥

🌐 https://usapa.parthmaniar.tech/

  • Aggregate RMSE of 4.32% over 10,000 models created.

Rationale and Gap Analysis

India is a nation in which about 58% of our population relies solely on agriculture as a source of livelihood. It holds a crucial role in our country’s growth and development. Even after having a high direct impact on our economy, we tend to face multiple challenges in the field of agriculture. The uncertainty in weather directly impacts the agriculture industry in several ways, this can further lead to a deficiency in food grains owing to crop failure and hence lead to situations such as a sudden rise in crop prices. There are systems that have been developed on the lines of prediction of the weather and crop production, however, none of the systems provide a common, unified platform for the analysis and prediction of all the various parameters which contribute to the agriculture industry. One of the major drawbacks of the existing systems is that none of them have taken into consideration all the possible parameters which influence the optimization of crop yield in the agriculture industry. Weather conditions, area of land, available warehousing, etc, are a few of the many factors which heavily contribute towards the fluctuations in prices and availability of crops. Hence, taking into consideration all of those attributes is essential for the prediction of yield, weather, and pricing of crops. Furthermore, to ensure the reliability of the system, one must train the model on real, government-generated data sources. This was another factor missing in the existing systems since most of them build their models on dummy data. These models did provide good levels of accuracy but failed to put forward a more reliable system. Moreover, the analysis of all the historical data available would also aid the government in the allocation of money and budget planning. The pre-existing systems lack a unified approach of showing the impact caused on external factors such as the budget, crop rates, and available warehousing spaces.


  • To be able to predict the production and yield of crops based on parameters such as weather and soil moisture.
  • To be able to predict the weather which helps take actions beforehand to eliminate problems such as a sudden rise in the price of crops.
  • To be able to predict crop price and portray the visual trends in historical data collected.
  • To act on and execute plans for warehousing and storage of crops based on the data collected and predictions generated.
  • To provide data through prediction based on previously encountered conditions in order to help with the budget planning and agricultural money allocation by the government.

Research Design and Methods / Research Methodology

The reliability of USAPA depends solely on the authentic data sources used to train and build the models. All the parameters used for the prediction of crop yield, production, and prices are real data values from official government sources. The factors used for the prediction of weather are minimum temperature, maximum temperature, average temperature, cloud cover, precipitation, and reference crop evapotranspiration. Data compiled and collected over a period of hundred years is taken to give the most accurate prediction for the upcoming years. All of the data is collected from the official website of the India Meteorological Department (IMD). After reviewing several already existing models, the parameter of soil moisture is also added to the system. The data for soil moisture is extracted from the National Agricultural Drought Assessment and Monitoring System. The final prediction of yield is done by using these parameters along with previous years of production data. The production data is taken from the Ministry of Agriculture and Farmers Welfare. The parameters mentioned are taken for a total of 55 crop types spread across India. The warehousing and storage data of India has been added to help us to analyze whether we have sufficient storage based on the predicted yield and consumption data. Simple calculations such as consumption subtracted from production will enable us to see the criteria of pricing (this difference can help us see if the price will go up or down based on excess availability of crop production) along with checking if there is enough storage space for the difference.

  • The entire system is divided into four major modules which are given below:
  • Crop yield and production prediction
  • Weather prediction
  • Crop price prediction
  • Visualization of storage and warehousing

In order to determine the most optimal algorithm, 13 algorithms were rigorously tested. This is done to ensure that the most accurate one is picked for the system. ExtraTreesRegressor, RandomForestRegressor, AdaBoostRegressor, GradientBoostingRegressor, BaggingRegressor, KNeighborsRegressor, SVR, HuberRegressor are chosen to be the top ones for the predictions based on their RMSE percentage values. Furthermore, since every crop could portray a different trait depending on the state and district in which it is grown in, the system also ensures that the most optimal algorithm for a specific crop of a particular state is chosen based on the one giving the least RMSE value.


The portal of USAPA will show the map-wise representation of weather, yield, and production data alongside a summary of every visualization which will have the percentage increase and decrease based on the coordinates of that location. The historical crop production data for 343 districts based on parameters of production, yield, and cultivation area is represented graphically on the portal. The collected historical data will provide insight and analysis into the different trends present in the data alongside the production data. Every module’s dashboard provides the predicted as well as historical data visualizations for the parameters taken. The price prediction will aid the government in budget planning, policy framing, guiding agro-industries and farmers. The warehousing module will showcase all the major warehouses located district-wise along with their storage capacities. Since the system is built using 13 major algorithms, wherein there is a different model for each crop per district along with huge data files, the aspect of storage and scalability is essential. MongoDB and Amazon S3 are being used to store the data which also helps in ensuring the security and cost-effectiveness of the system. The system will be dockerized, giving a consistent and isolated environment with fast deployment and mobility. The user-friendly interface will allow every user to easily be able to understand the portal. Furthermore, the admin will have the option to generate the predictions for forthcoming years by selecting the state and year. The admin can also upload the missing or new data files which are not already used in the portal to see the predictions made accordingly. Overall, USAPA will bring forth a unified platform for all the major agriculture predictions and historical data visualizations together.

Predicted Production and Yield Dashboard

Predicted Weather Dashboard

Visualization of available storage and warehousing district wise

Crop Price prediction and historical trends visualization

Benefits to the Society

India is a country that relies heavily on the agriculture industry as a source of livelihood for more than half its population. It is a primary source of income for all the farmers and farming-related industries. The uncertainty in the weather conditions leads to a sudden rise in crop prices because of the unavailability of enough grains and crops for the population. USAPA aims to tackle this problem by predicting the weather as well as the yield of crops distributed throughout the country. This way the farmers will be prepared for the upcoming weather changes and could estimate the yield they would be producing. The price prediction will also be done in the system which will avoid a sudden hike in crop prices such as the ones seen every time an undetermined weather condition is encountered. This will not just benefit the farmers but also help the customers stay satisfied by getting crops in reasonable price ranges. Furthermore, USAPA will help the government in allocating its monetary resources by displaying the available warehousing and storage as well as the price and yield of crop expected. This end-to-end system will therefore work for the welfare of farmers, customers as well as the government and agriculture-related industries.

Future Scope

The system does not take into account the other external factors such as natural calamities and economical changes which can also have an impact on the agriculture sector. By inculcating these factors, it will have even more accurate results and predictions. The inclusion of IoT-based precision farming and smart irrigation-related predictions will help to take the system to the next level by working on the need-of-the-hour measures. Furthermore, collaborating with Agro Industries for customization in the USAPA portal and providing yield-based on dynamic parameters like land input by the user, water availability, etc. will increase the system’s strength and accountability.

SWOC Analysis / Limitations


  • An end-to-end system that applies Artificial Intelligence (AI) to predict season-wise Crop Yield for 55+ variety of crops for 343 districts with ~95.67% accuracy. *
  • Long-range weather prediction verified/ attested by top industry experts.
  • Largest single-window repository of Agri-warehouses and other data such as soil moisture, NDVI, historic yields, previous union budgets in the country.
  • Category-wise national consumption prediction for food grains up to 2030 using statistical modeling.
  • Retail & Wholesale price prediction based on production, storage, consumption/ demand forecasts.
  • Lifelong implementation with incremental learning.


  • Incorporation of Natural Calamities and crop damage due to it.
  • Accounting for inflation [CPI & WPI] while predicting wholesale & retail prices of crops.
  • Predictions capped till district level.


  • First-mover advantage.
  • Advancement in domestic IoT technology and de-regulation by Central & state governments in the Agri space.
  • Leverage India’s (ISRO’s) superiority in satellite tech. to deliver precise forecasts at a granular level.


  • Real-time changes in crop-yield & weather prediction.
  • Regular updates in KPIs such as NDVI, warehouses, weather, etc. by district, state & central gov. authorities.
  • Normalizing the data/ Optimizing the algorithms for differences between actual and predicted yield & weather in the future years.