Analysis of JAMIS Farmgate prices

Article by Jermaine Samuels

15 minute read

Introduction

Jamaica is known for its diverse agricultural products which are found in many of our exquisite cuisines, natural herbs, spices and remedies. These products are typically produced by farmers nationwide and are available on a seasonal basis. Based on historical data provided by the Statistical institute dated 2007, approximately 326,000 hectares of land are dedicated to active farmlands, 62% of these lands consists of both pastures and crops. The allocation of land solely dedicated to crops is approximately 154,000 hectares which actually represents a decline of about some 23,000 hectares based on a prior agricultural census executed in 1996.

Despite the reported decline in active farmlands associated with crops, agriculture remains a priority for the Jamaican government as it accounts for 8.68% share of gross domestic product in 2020, where approximately 18% of the nation’s active population is employed in agriculture and 46% of the total population lives in rural areas where agricultural products are cultivated and therefore agriculture plays a pivotal role in Jamaica’s cultural development.

As an important commodity within the economy it is imperative to review and analyze the cost, distribution, and quality of agricultural products. As crops are cultivated mainly on a seasonal or regional basis there is significant value that can be derived if the proper channels are capitalized, to maximize general public consumption and to ultimately improve revenue distribution facilitated by agriculture. Agricultural products are typically available nationwide from basic corner stalls, brick and mortar businesses, supermarket etc. and as such many businesses stand to benefit from affordable and quality produce from farmers across the nation given that they have access to the necessary information that will aid in strategizing methods and timeframes to purchase.

JAMIS

The Jamaica Agricultural Marketing Information System (JAMIS) provides weekly unbiased reports that relates to various agricultural products across Jamaica. The information includes prices, availability and quality which provides useful insights as to how, where and when to purchase various products. There are 4 price point reports on the JAMIS website:

  • Farmgate Prices
  • Retail Prices
  • Wholesale Prices
  • Municipal Prices

The price point of interest that was analyzed was the Farmgate prices which as the website stipulates are agricultural prices collected on Wednesdays from farmers by the Marketing and Extension officers of the rural agricultural development authority (RADA). The prices are a representation of produce cost per Kilogram for the following Saturday of when the data was collected.

Data Collection

Jamis Farmgate API

The JAMIS website consisted of 4 report types where only the farmgate data was extracted and analyzed to assess farm prices of different agricultural products. FastAPI is an open source high performance web framework that facilitated converting Jamis website data into an analytics opportunity that can potentially create avenues for data monetization across the agricultural industry.

In order to extract data from the JAMIS website an API was built using the FastAPI software framework. The API allows downloading of individual pricing reports of produce between 2012 and 2021 as pdf files, after which the data is extracted as stored as a database file.

Data Description and Modeling

The information below outlines the data collected, data dictionary, and prediction model utilized.

Price Point Dataset: Farmgate
Date when prices were collected: Between Year 2012 and 2021
Products: 36 different agricultural products.
Product Category: 5 types of products (Fruit, Root Crops, Vegetables, Herbs and Spices, Legumes).

Table representing product categories and individual products

Data Dictionary

Price Date: The date the price was recorded
Parish: The parish in which the commodity (produce) is located
Commodity: The name of the agricultural product
Type: A description of the agricultural product
Category: The category that the agricultural product belongs to
Supply: An indication of the abundance of the product
Grade: An indication of the quality of the product
Price: An indication of the price of goods
Most frequent: An indication of the most frequent price of commodity (produce)

Data Modeling

To predict the price of different products over time the variable to consider and to build a prediction model against is the most frequent price variable. This attribute contains contiguous values and therefore a regression model is the most suitable approach to determine the relationship between all attribute columns from the dataset against the most frequent price column which is the target variable.

The modeling process was measured against 5 different regression models where the model with least mean square error or mean percentage error and the highest r2 score was selected. The r2 score is a measure of how well the proportion of variance of the product prices is explained by all the other columns / attributes within the dataset. The model selected was built from Random Forest Regressor which subsequently can be used to predict future product prices, and can be modified or rebuilt to incorporate data from other JAMIS agricultural product prices.

Loading component...

Loading component...

Loading component...

Fruits Cost:

The Diagram below represents a size comparison of the total average costs of fruits by Parish.

Loading component...

Loading component...

The stack bar graph below indicates the cost of top 5 least expensive fruits based on the respective month.

Loading component...

Loading component...

The stack bar graph below indicates the cost of top 5 most expensive fruits based on the respective month.

Loading component...

Loading component...

Table below displays average price for banana between years 2018 -2020.

Loading component...

Loading component...

The stack bar graph below indicates the cost of top 5 most expensive fruits based on the respective month.

Loading component...

Loading component...

General trend for product categories.

Loading component...

Loading component...

Loading component...

Loading component...

Table below displays average price for banana between years 2018 -2020.