# Monitoring Within-Field Variability of Corn Yield using Sentinel-2 and Machine Learning Techniques
## 2 Materials and Methods
### Satellite Imagery  
Sentinel-2 Level 2A (L2A) Bottom-Of-Atmosphere (BOA) reflectance product was acquired from the Copernicus Open Access Hub. Sentinel-2 L2A data provided 12 bands with channels ranging from 443 to 2190 nm and a spatial resolution (ground sampling distance--GSD) of 10 to 60 m [54]. All images were resampled to 10 m pixel size and clipped to the region of interest (the study field).  
To compare between the plant development stages, we used \"crop age\", defined by the number of days counted from the planting date. The crop ages at harvesting time were 168, 159, and 160 days from planting for 2016, 2017, and 2018, respectively. In our case, there were no available cloud-free Sentinel-2 images until a crop age of 60 days (April and May). Starting from June, cloud-free satellite images were more frequently available. In 2016, there were only six Sentinel-2 images available. This number increased to reach 14 images per season for 2017 and 2018. A total of 34 Sentinel-2 images between 2016 and 2018 were available during the corn growing season at different crop ages, as shown in Table 1.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multicolumn{2}{c}{**2016 Season**} & \multicolumn{2}{c}{**2017 Season**} & \multicolumn{2}{c}{**2018 Season**} \\ \hline \multicolumn{5}{c}{Planting Date: 30 March 2016} & \multicolumn{5}{c}{Planting Date: 22 March 2017} & \multicolumn{5}{c}{Planting Date: 11 April 2018} \\ \multicolumn{5}{c}{Harvesting Date: 14 September 2016} & \multicolumn{5}{c}{Harvesting Date: 25 August 2017} & \multicolumn{5}{c}{Harvesting Date: 18 September 2018} \\ \hline
**I** & **Date** & **Age (Stage)** & **I** & **Date** & **Age (Stage)** & **I** & **Date** & **Age (Stage)** \\ \hline
1 & 18 June 2016 & 80 (R3) & 1 & 31 May 2017 & 70 (R2) & 1 & 19 May 2018 & 38 (V10) \\
2 & 18 July 2016 & 110 (R4) & 2 & 03 June 2017 & 73 (R2) & 2 & 10 June 2018 & 60 (R1) \\
3 & 28 July 2016 & 120 (R5) & 3 & 13 June 2017 & 83 (R3) & 3 & 15 July 2018 & 95 (R3) \\
4 & 04 August 2016 & 127 (R6) & 4 & 20 June 2017 & 90 (R3) & 4 & 18 July 2018 & 98 (R4) \\
5 & 14 August 2016 & 137 (R6) & 5 & 23 June 2017 & 93 (R3) & 5 & 20 July 2018 & 100 (R4) \\
6 & 24 August 2016 & 147 (R6) & 6 & 03 July 2017 & 103 (R4) & 6 & 28 July 2018 & 108 (R4) \\  & & & 7 & 10 July 2017 & 110 (R4) & 7 & 04 August 2018 & 115 (R6) \\  & & & 8 & 13 July 2017 & 113 (R5) & 8 & 17 August 2018 & 128 (R6) \\  & & & 9 & 23 July 2017 & 123 (R6) & 9 & 19 August 2018 & 130 (R6) \\  & & & 10 & 30 July 2017 & 130 (R6) & 10 & 22 August 2018 & 133 (R6) \\  & & & 11 & 02 August 2017 & 133 (R6) & 11 & 24 August 2018 & 135 (R6) \\  & & & 12 & 04 August 2017 & 135 (R6) & 12 & 27 August 2018 & 138 (R6) \\  & & & 13 & 12 August 2017 & 143 (R6) & 13 & 29 August 2018 & 140 (R6) \\  & & & 14 & 22 August 2017 & 153 (R6) & 14 & 06 September 2018 & 148 (R6) \\ \hline \hline \end{tabular}
\end{table}
Table 1: Sentinel-2 images dates corresponding crop age in days and phenological stage at each growing season.  
Figure 2: Corn grain yield data for the 2016, 2017, and 2018 growing seasons.  
Clouds and other opaque aerosol in the atmosphere can partially occlude the transmission of energy at the wavelengths recorded by the Multispectral Instrument (MSI) on-board Sentinel-2. Level 2A products provide a raster map with cloud cover confidence ranging from 0 for high confidence of clear sky to 100 for high confidence of cloudy sky [54]. This information was used to isolate pixels with a cloud probability above zero. Out of 34 images, 14 had at least one pixel covered by clouds. Table 2 below gives an overview. The study crop field covered 2006 pixels at 10 m GSD. All pixels with cloud probability above zero were masked and thus not considered for further processing. Masking removed these pixels from further processing.