Dive into Agro API | Part 3 - Historical NDVI

Dive into Agro API  | Part 3 -   Historical NDVI

Posted on 21 Oct 2019

Historical NDVI API for your polygons

Historical NDVI API is a part of an overall functionality of Agro API, a digital tool created for the needs of agricultural users.

Agro API range provides API for natural integration of satellite images into agricultural applications and machine learning. This is an API for weather data (current weather, forecasts, historical data), satellite imagery (True Color, False Color, NDVI and EVI) and accumulated parameters (temperature и precipitation),  soil data (сurrent и history) и  Ultraviolet index  (current, forecast и historical UVI).

Historical NDVI provides previously observed (historical) NDVI values for your chosen polygon. In particular, we can provide regular updates with an archive containing several years of accumulated data . NDVI data is calculated based on imagery from Landsat 8 and Sentinel 2.
In order to receive historical data, we invite you to use a simple and convenient API that we offer.  

What is NDVI? Why do I need NDVI history?

NDVI (normalized difference vegetation index) is the most popular indicator that allows to estimate how vegetation develops with time. It is calculated by combining two spectral channels: near-infrared and red.

Values of NDVI index change throughout the season and they are also different at different stages of vegetation development: during the growth, bloom and maturation. The values represent current condition of vegetation that is influenced by such factors as soil, weather, technologies that were applied to it and so on. Changes in NDVI that are observed in the vegetation throughout different stages of its development allow us to estimate exactly how correct is the growth process that is happening. Based on its values, one can estimate whether application of fertilizers is needed or approximate potential future yields.

In context of yield prediction, it might also be useful to compare NDVI values of the same field with its values from the previous seasons. To do this, we have accumulated a deep archive with several years worth of history inside.

How to receive Historical NDVI for your polygon

Step 1. Where do I start?

In order to receive historical data, you are going to need your unique personal API key and your polygon ID.

If you would like to learn how to create, remove or manage your polygons, please follow this link.

Step 2. How do I receive data? GET request and its parameters.

In order to receive data, you need to make a GET request that looks like this:

API call:

http://api.agromonitoring.com/agro/1.0/ndvi/history?start={start date}&end={end date}&polyid={ID of polygon}&appid={API key}

Necessary parameters

   appid - Your “API Key” from your profile on our website;

   polyid - Your polygon ID;

   start - Beginning of time interval in your request; UTC time in Unix time format ;

   end - End of time interval in your request; UTC time in Unix time format;

Apart from obligatory parameters, you can also include some non-obligatory ones:

   type - Source of satellite data - Landsat-8 (l8), Sentinel-2 (s2)

Cloud covered area as a percentage of total polygon size:
   clouds_max %- Maximal cloud covered area as a percentage of total polygon size;
   clouds_min % - Мinimal cloud covered area as a percentage of total polygon size;

Area with available data as a percentage of a total polygon size:
   coverage_max %- Maximal area with available data as a percentage of a total polygon size;
   coverage_min %- Minimal area with available data as a percentage of a total polygon size;

After you enter the preferred values of clouds_max, clouds_min  и coverage_max, coverage_min , you can filter out potentially uninformative and insufficient data.

Step 3. API response. What will you receive as a result of GET request. Description of main parameters.

After you have made an API call, you will receive a statistical set of parameters for your polygon for a specified time interval. It also accounts for values of non-obligatory parameters that were you might have provided earlier. For examples of API calls, please see here

Parameters of API response:

  • dt  Acquisition date (unix time, UTC)
  • source   Satellite name (Landsat 8, Sentinel 2)
  • zoom   Number of zoom level
  • dc   Approximate useful area (What percentage of the polygon is filled with the available satellite images)
  • cl   Approximate percentage of clouds
  • data  Data for the current polygon
    • std   The standard deviation of the index
    • p25   The first quartile value of the index
    • num   The number of pixels in the current polygon
    • min   The minimum value of the index
    • max   The maximum value of the index
    • median   The median value of the index
    • p75   The third quartile value of the index
    • mean   The average value of the index

Examples of Historical NDVI representation. Visualisation of data. Dashboard.

In order for users to have some visual examples of what is currently offered via Agro API, we have developed Agro Dashboard.
Here, developers can assess the quality and quantity of the data that we provide (including historical NDVI), speed of processing and availability of our services.
Farmers and agricultural users can receive data for assessments of their own fields. This can be done straight from the Dashboard without any programming required.

You can receive historical NDVI data and assess the quality of the service right now.

To do this, please register and define the boundaries of your fields (create a polygon) in the Dashboard. After that, you will see useful statistics and visual time diagram of NDVI values for your fields and your preferred periods.
For more detailed instructions on how to create an account or a polygon, how to work with polygons or how receive NDVI data for your polygon, please see the documentation.
If you are registered and have already created your polygons, simply log in to the Dashboard and access necessary data from there.

Additionally, the following data can be requested for your polygon: Weather data: current weather, daily forecast for 7 days, hourly forecast for 4 days, weather history, accumulated parameters like temperature and moisture, historical data of temperature and moisture as well as soil data ( temperature on the surface and on the depth of 10 m and moisture)

We will be happy to answer all your questions, please contact us at info@openweathermap.org

See also:
Dive into Agro API | Part 1 - Personal Account
Dive into Agro API | Part 2 - Polygons