# Mapping Smallholder Yield Heterogeneity at Multiple Scales in Eastern Africa
## Materials and Methods
### Land Cover Classification  
To isolate maize-growing pixels from the rest, we generated a crop cover map for the area of interest. We trained a random forest classifier using Sentinel-2 features extracted from 400 crop  
\begin{table}
\begin{tabular}{c c c c} \hline
**Band** & **Use** & **Spectral Range** & **Pixel Size** \\ \hline \multicolumn{4}{c}{Skysat} \\ B & Blue & 450–515 nm & 2 m \\ G & Green & 515–595 nm & 2 m \\ R & Red & 605–695 nm & 2 m \\ N & Near Infrared (NIR) & 740–900 nm & 2 m \\ \hline \multicolumn{4}{c}{RapidEye} \\ b1 & Blue & 440–510 nm & 5 m \\ b2 & Green & 520–590 nm & 5 m \\ b3 & Red & 630–685 nm & 5 m \\ b4 & Red Edge (RE) & 690–730 nm & 5 m \\ b5 & NIR & 760–850 nm & 5 m \\ \hline \multicolumn{4}{c}{Sentinel-2} \\ B2 & Blue & 458–523 nm & 10 m \\ B3 & Green & 543–578 nm & 10 m \\ B4 & Red & 650–680 nm & 10 m \\ B5 & Red Edge (RE) & 698–713 nm & 20 m \\ B8 & NIR & 785–900 nm & 10 m \\ \hline \end{tabular}
\end{table}
Table 1: Spectral information of multiple sensors used in this study.  
\begin{table}
\begin{tabular}{c c c} \hline
**Vegetation Index** & **Formula** & **Reference** \\ \hline Normalized Difference Vegetation Index (NDVI) & (NIR \(-\) Red)/(NIR \(+\) Red) & [PERSON] et al., 1973 [11] \\ \hline Enhanced Vegetation Index (EVI) &
\begin{tabular}{c} 2.5 \(\times\) (NIR \(-\) Red)/ \\ (NIR \(+\) 6 \(\times\) Red \(+\) 7 \(\times\) Blue \(-\) 1) \\ \end{tabular} & [PERSON] et al., 1997 [12] \\ \hline Wide Dynamic Range Vegetation Index (WDRVI) & (0.2 \(\times\) NIR \(-\) Red)/(0.2 \(\times\) NIR \(+\) Red) & [PERSON], 2004 [13] \\ \hline Green Chlorophyll Vegetation Index (GCVI) & (NIR/Green \(-\) 1) & [PERSON] et al., 2003 [14] \\ \hline Red edge Chlorophyll Index (ReCI) & NIR/RE \(-\) 1 & [PERSON] et al., 2003 [14] \\ \hline MERIS Terrestrial Chlorophyll Index (MTCI) & (NIR \(-\) RE)/(RE \(-\) Red) & [PERSON], 2004 [15] \\ \hline \end{tabular}
\end{table}
Table 2: Vegetation indices (VIs) tested in this study. Bands used to calculate these VIs were defined in Table 1.  
field boundaries obtained within the B-K sub-region, which included information on crop types and 63 polygons encompassing non-crop classes. The non-crop polygons were defined by visually assessing high-resolution imagery from Google Earth and covered urban, shrub, forest, and swamp pixels. Each polygon was sampled randomly 20 times, resulting in a total sample size of 9260. Eighty percent of these pixels were used for training, with the remaining 20% reserved for testing.  
We computed the Sentinel-2 input features using an annual metrics-based compositing approach [16]. Metrics composites are generated by sorting all observations available for a given pixel and extracting the one corresponding to the desired percentile of their distribution. This process is done on a per-band basis, and it is repeated for a prescribed number of percentiles. In this project, we computed the 10 th, 25 th, 50 th, 75 th, and 100 th percentile of all reflective bands along with their corresponding day-of-year, and the Normalized Difference Vegetation Index (NDVI) and Green Chlorophyll Vegetation Index (GCVI). The metrics-based compositing technique has been already successfully used in several classification studies (e.g., [17]) and has the main advantage of characterizing the target's phenology implicitly without requiring any assumption on the seasonality. While this configuration was not accurate enough to resolve all different crop types included in the crop cuts, we obtained a test accuracy of 80% after combining the samples in three broader classes: (1) maize crops (MC), (2) other crops (OC), and (3) non-crop (NC). In this final configuration, the random forest classifier was set to use 300 trees, with a minimum leaf sample size of five. The classification map generated using the GEE for the 1 AF region is given in Figure 2.