# Field Trial Analytics

Agronomists employ Trial Analytics to assess the performance of various crop varieties, cultivation techniques, and input applications, including the results of Variable Rate Applications in Precision Agriculture. By collecting, analyzing, and interpreting data generated from Field Trials, researchers gain insights into the interactions between genetics, environment, and management practices. This knowledge informs the development of crop management strategies that optimize yield potential while minimizing input usage. Furthermore, Trial Analytics not only enables the evaluation of the effectiveness of Precision Farming practices but also helps in identifying resilient crop varieties that can thrive under diverse and challenging conditions, thereby contributing to food security.

{% hint style="info" %}
GeoPard also supports split-plot trials for two-factor designs, such as the same rates across different hybrids. Evaluate both the main effects and the rate × hybrid interaction on the same georeferenced trial layer.
{% endhint %}

## Data Preparation

For effective trial analytics, a few essential datasets are required:

1. **Yield Dataset**:\
   This dataset captures the yield data.\
   We can import this from the [JohnDeere Operation Center](/geopard-tutorials/product-tour-web-app/import-precision-agriculture-data/import-from-myjohndeere.md) or manually upload it as [shapefile](/geopard-tutorials/product-tour-web-app/import-precision-agriculture-data/yield-data-import.md) or as [machinery proprietary format](/geopard-tutorials/product-tour-web-app/import-precision-agriculture-data/machinery-proprietary-formats.md).
2. **Application Dataset**:\
   This is crucial for understanding the actual executed Application on the Field. At a minimum, it contains attributes like TargetRate, AppliedRate, and some machinery-related metrics.\
   As with the Yield Dataset, we have options to import it from the [JohnDeere Operation Center](/geopard-tutorials/product-tour-web-app/import-precision-agriculture-data/import-from-myjohndeere.md) or manually upload it as [shapefile](/geopard-tutorials/product-tour-web-app/import-precision-agriculture-data/as-applied-as-planted-data-import.md) or as [machinery proprietary format](/geopard-tutorials/product-tour-web-app/import-precision-agriculture-data/machinery-proprietary-formats.md).
3. **Zones/Plots with Trials/Experiments**:\
   These show the planned Application rates for our Trials, giving insight into the experimental design.\
   If such a data layer is available, we upload it as [shapefile](/geopard-tutorials/product-tour-web-app/import-precision-agriculture-data/as-applied-as-planted-data-import.md) into the AsApplied/AsPlanted or Yield control. This ensures compatibility when building EquationMaps, streamlining your trial analytics experience.\
   This can be a one-factor layout or a split-plot layout with a second treatment dimension, such as hybrid or variety.\
   If such a data layer isn't available, the TargetRate attribute from the Application Dataset can serve as a substitute for Trial evaluations.
4. **Historical Field Potential Zones:**\
   These zones are generated by GeoPard (details are [HERE](/geopard-tutorials/product-tour-web-app/zones-maps-and-analytics/multi-year-zones.md)). They are useful for analyzing Trials with consistent historical productivity. This is particularly beneficial when Trials are distributed across regions with varied historical productivity.

Once we've gathered these datasets, the next step is starting the Trial evaluation process.

## Data Overview

There are the following data for the 2023 agricultural season of winter wheat:

* Yield Dataset highlighting Wet Mass distribution *(Fig.1)*

<figure><img src="/files/hLUyn7goNGUyInBsK2AA" alt=""><figcaption><p>Fig.1 Original YieldDataset</p></figcaption></figure>

* Nitrogen (N34) VRA plan (150 kg/ha) with 2 Trial Plots (120kg/ha and 180 kg/ha)*(Fig.2)*

<figure><img src="/files/1B0eshJpNS0JLT7JBoZe" alt=""><figcaption><p>Fig.2 Nitrogen (N34) VRA plan with Trial Plots</p></figcaption></figure>

* Application Dataset showcasing applied statistics *(Fig.3)*

<figure><img src="/files/2bfyrCPlJWmuwmgfIA6m" alt=""><figcaption><p>Fig.3 Application Dataset</p></figcaption></figure>

* Historical Field Productivity (*Fig.4*)

<figure><img src="/files/7JtzmWeTpkw36UzceSku" alt=""><figcaption><p>Fig.4 Historical Field Productivity</p></figcaption></figure>

{% hint style="warning" %}
The YieldDataset hasn't been calibrated: multiple harvesters were operating there, there are turnaround and missing data traces, and noise is evident. It's recommended to apply the Yield Calibrate and Clean operations on top for optimal results.\
A step-by-step tutorial can be found at [LINK](/geopard-tutorials/agronomy/yield-calibration-and-cleaning.md).
{% endhint %}

The YieldDataset, after calibration and cleaning, is displayed in *Fig.5*, along with the updated statistics. This dataset will be utilized in subsequent steps.

<figure><img src="/files/Yf4YKrPKwsNTJ9xal5H3" alt=""><figcaption><p>Fig.5 Calibrated and Cleaned YieldDataset</p></figcaption></figure>

## Concept

Here the objective of Trial Analytics is to ascertain the most effective Nitrogen (N34) rate for the field. There are the pinpointed areas with Nitrogen rates of 120kg/ha, 150kg/ha, and 180kg/ha. This data is derived from the ApplicationDataset on one hand and the calibrated YieldDataset on the other.

We're focusing our analysis on three distinct zones:

* 120kg/ha (designated as the trial zone)
* 150kg/ha (considered the main zone)
* 180kg/ha (another trial zone)

Our approach will include the following evaluations:

1. **Plan-based:** using the Planned Variable Rate Application (VRA) linked to the Calibrated Yield.
2. **Applied-based:** Comparing the Actual Applied Datasets against the Calibrated Yield.
3. **Applied-based and Historical Productivity:** Comparing the Actual Applied Datasets against the Calibrated Yield overlapped with Historical Field Potential Zones.

This methodical approach will allow for a comprehensive evaluation of Nitrogen's impact on Yield, based on both Planned and actual Applied application data.

## Plan-based

The influence of ~~applied~~ planned Nitrogen (N34) on Yield distribution is visually captured in the subsequent screenshots *(Fig.6, Fig.7, Fig.8)*. Here's a concise breakdown of the findings:

* <mark style="color:blue;">The main zone, with a Nitrogen rate of 150 kg/ha, spans 45.8 ha and averages a yield of 4.99 t/ha</mark> (*Fig.6*).
* <mark style="color:blue;">The first trial zone, utilizing a 180 kg/ha Nitrogen application, covers 1.76 ha, yielding an average of 6.5 t/ha</mark> (*Fig.7*).
* <mark style="color:blue;">The second trial zone, with 120 kg/ha of Nitrogen, encompasses 1.86 ha and produces an average yield of 6.39 t/ha</mark> (*Fig.8*).

The results prompt a significant query: <mark style="color:orange;">Why does the lower application rate seem to be more efficient than the higher one?</mark> To gain deeper insights, the next phase involves[ evaluating the Trials using the actual Applied data](/geopard-tutorials/agronomy/field-trial-analytics.md#applied-based-evaluation).

<figure><img src="/files/Ae8M7mzsAhURE9fUot1p" alt=""><figcaption><p>Fig.6 Main Zone with N34 150kg/ha</p></figcaption></figure>

<figure><img src="/files/J2qSfxf7CK1PrD2czdZr" alt=""><figcaption><p>Fig.7 Trial Zone with N34 180kg/ha</p></figcaption></figure>

<figure><img src="/files/P9kJOeYKhSnPKC89l92x" alt=""><figcaption><p>Fig.8 Trial Zone with N34 120kg/ha</p></figcaption></figure>

Further down, you'll find an in-depth discussion of the formulas and configurations employed during the evaluation.

{% hint style="info" %}
To delve deeper into the Equation approach and its execution, please consult our tutorials for both the [User Interface](/geopard-tutorials/product-tour-web-app/equation-based-analytics.md) and [API](/geopard-tutorials/api-docs/diagrams-with-basic-flows/5.-execute-equations.md).
{% endhint %}

Here are the Equations to run to reproduce the calculations.

1. Main with 150 kg/ha:\
   `Yield_Main = np.where(Zone==1, Yield_WetMass, np.nan)`
2. Trial with 120 kg/ha:\
   `Yield_Zone = np.where(Zone==3, Yield_WetMass, np.nan)`
3. Trial with 180 kg/ha:\
   `Yield_Zone = np.where(Zone==2, Yield_WetMass, np.nan)`

It is important to activate *Numpy* *(Fig.9)* and turn off *Interpolation* *(Fig.10)*.

<figure><img src="/files/PmploSSnUv8ooOj0RaZl" alt=""><figcaption><p>Fig.9 Activate "Numpy"</p></figcaption></figure>

<figure><img src="/files/x55GOCsA7REmdFN4lyR0" alt=""><figcaption><p>Fig.10 Turn off using of "Interpolated" data</p></figcaption></figure>

## Applied-based

A notable observation is that the actual Applied Rate during the Trial doesn't consistently align with the Planned (Target) Rate. Specifically, a distribution ranges from 120 kg/ha to as high as 189 kg/ha *(Fig.11)*. Given this variability, it became crucial to set a benchmark for error tolerance. Thus, a ±5% accuracy was determined to be an acceptable threshold to deem the trial suitable for evaluation.

Presented in the subsequent screenshots (*Fig.12, Fig.13, Fig.14)* is the statistical distribution of the Yield, focusing on the Nitrogen (N34) actually Applied numbers. Here are the summarized statistics, keeping in mind the ±5% accuracy acceptance:

* <mark style="color:blue;">The main zone at 150 kg/ha had an applied area of 43.5 ha, yielding an average of 4.9 t/ha</mark> (*Fig.12*).
* <mark style="color:blue;">The first trial zone at 180 kg/ha covered an area of 1.47 ha and produced an average yield of 6.5 t/ha</mark> (*Fig.13*).
* <mark style="color:blue;">The second trial zone set at 120 kg/ha spanned an area of 1.44 ha, with an average yield of 6.3 t/ha</mark> (*Fig.14*).

<figure><img src="/files/2XFyg5pC1iFsi1qlL9Ft" alt=""><figcaption><p>Fig.11 Actual Applied Rates in Trials</p></figcaption></figure>

<figure><img src="/files/Cb0deEtA2TBUaIILSYFU" alt=""><figcaption><p>Fig.12 Main Zone with N34 150kg/ha ±5%</p></figcaption></figure>

<figure><img src="/files/3qS0Dc9qL3mV6eELjGtA" alt=""><figcaption><p>Fig.13 Trial Zone with N34 180kg/ha ±5%</p></figcaption></figure>

<figure><img src="/files/Lw8IkkHwvCPQS62e2MrM" alt=""><figcaption><p>Fig.14 Trial Zone with N34 120kg/ha ±5%</p></figcaption></figure>

For a deeper understanding of the methodology and the specifics of these results, the used Equations are below:

1. Trial actual Applied Nitrogen:\
   `Applied_Trial = np.where((Zone == 3) | (Zone == 2), Applied_Value, np.nan)`
2. Main with 150 kg/ha incorporating 5% acceptance:\
   `Yield_Main = np.where((Zone == 1) & (Applied_Value >= 142.5) & (Applied_Value <= 157.5), Yield_WetMass, np.nan)`
3. Trial with 120 kg/ha incorporating 5% acceptance:\
   `Yield_Trial = np.where((Zone == 3) & (Applied_Value >= 114.0) & (Applied_Value <= 126.0), Yield_WetMass, np.nan)`
4. Trial with 180 kg/ha incorporating 5% acceptance:\
   `Yield_Trial = np.where((Zone == 2) & (Applied_Value >= 171.0) & (Applied_Value <= 189.0), Yield_WetMass, np.nan)`

## **Applied-based and Historical Productivity**

The Yield figures from the Trials consistently surpass the average Yield across the entire Field. A key factor driving this disparity appears to be the historically high productivity zone where the Trials took place, as visualized in *Fig.15* and *Fig.16*. For a more nuanced evaluation of the Trials, it's crucial to factor in the productivity zones when analyzing results.

<figure><img src="/files/0ks52Sxwcs1ydP3HHrZT" alt=""><figcaption><p>Fig.15 Historical Field Potential Zones</p></figcaption></figure>

<figure><img src="/files/aHMTjc7gPc7BHMtSw2Yk" alt=""><figcaption><p>Fig.16 Historical Field Potential Zones as YieldDataset</p></figcaption></figure>

Presented in the subsequent screenshots (*Fig.17, Fig.18, Fig.19)* is the statistical distribution of the Yield, focusing on the Nitrogen (N34) actually Applied numbers overlapped with Historical Productivity Zones (created in GeoPard). Here are the summarized statistics, keeping in mind the ±5% accuracy acceptance for Applied numbers:

* <mark style="color:blue;">The main zone at 150 kg/ha had an applied area of 2.65 ha, yielding an average of 6.34 t/ha</mark> (*Fig.17*).
* <mark style="color:blue;">The first trial zone at 180 kg/ha covered an area of 1.08 ha and produced an average yield of 6.41 t/ha</mark> (*Fig.18*).
* <mark style="color:blue;">The second trial zone set at 120 kg/ha spanned an area of 1.78 ha, with an average yield of 6.33 t/ha</mark> (*Fig.19*).

<figure><img src="/files/n4RW8y5HX8KYHCvy30uE" alt=""><figcaption><p>Fig.17 Main Zone with N34 150kg/ha overlapped with Historical Productivity</p></figcaption></figure>

<figure><img src="/files/BU4uEf2rioBPrGeZn1XP" alt=""><figcaption><p>Fig.18 Trial Zone with N34 180kg/ha ±5% overlapped with Historical Productivity</p></figcaption></figure>

<figure><img src="/files/KUJyrvwVrGOqWmEG2ZPV" alt=""><figcaption><p>Fig.19 Trial Zone with N34 120kg/ha ±5% overlapped with Historical Productivity</p></figcaption></figure>

For a deeper understanding of the methodology and the specifics of these results, the used Equations are below:

1. Main with 150 kg/ha incorporating 5% acceptance overlapped with Historical Productivity:\
   `Yield_Main = np.where((Application_Zone == 1) & (Productivity_SubZone == 51) & (Applied_Value >= 142.5) & (Applied_Value <= 157.5), Yield_WetMass, np.nan)`
2. Trial with 120 kg/ha incorporating 5% acceptance overlapped with Historical Productivity:\
   `Yield_Trial = np.where((Application_Zone == 3) & (Productivity_SubZone == 51) & (Applied_Value >= 114.0) & (Applied_Value <= 126.0), Yield_WetMass, np.nan)`
3. Trial with 180 kg/ha incorporating 5% acceptance overlapped with Historical Productivity:\
   `Yield_Trial = np.where((Application_Zone == 2) & (Productivity_SubZone == 51) & (Applied_Value >= 171.0) & (Applied_Value <= 189.0), Yield_WetMass, np.nan)`

where

* the part `Productivity_SubZone == 51` reflects the high Productivity Zones with the applied experiments,
* the parts `(Applied_Value >= 142.5) & (Applied_Value <= 157.5)` , `(Applied_Value >= 114.0) & (Applied_Value <= 126.0)`, `(Applied_Value >= 171.0) & (Applied_Value <= 189.0)` incorporate ±5% accuracy from the rates `150`, `120`, `180` kg/ha.

## Summary

The Yield results from the Trials closely align with the average Yield observed across the high Historical Productivity Zone of the Field. In other words, the experimental application of N34 product at rates of <mark style="color:blue;">120 kg/ha - 150 kg/ha - 180 kg/ha</mark>, resulted in average Yields of <mark style="color:blue;">6.33 t/ha - 6.34 t/ha - 6.41 t/ha</mark> respectively, does not have a significant impact on the harvested Yield within the high Productivity Zone.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.geopard.tech/geopard-tutorials/agronomy/field-trial-analytics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
