# GEOG 566

May 7, 2017

### Spatial autocorrelation in NDVI for agricultural fields vs the average biomass of that field

Filed under: Tutorial 1 @ 4:29 pm

Looking at the spatial autocorrelation of NDVI within a field and the average wet biomass of that field, is there a correlation? When the NDVI distribution is patchy, is the biomass lower? Or maybe higher? Or is there no relation at all.

1. Name of the tool or approach that you used…

To assess the patchiness of the NDVI I used a variogram. The variogram shows the characteristics of spatial autocorrelation. There are three parameters of interest that can be read from a variogram graph; a) the range, which gives an indication of the lag in the autocorrelation. b) the sill, which represents the variance of the variable at the range lag. And, c) the nugget. This should be zero, but due to errors in the data this can vary slightly. The variograms were used for two analysis. First, we visually compare multiple variograms from different fields categorized for biomass. And second, we analytically compare the variograms with scatterplots between i) range and biomass, ii) sill and biomass, and iii) range and sill with biomass color scheme. For the scatter plots the correlation coefficients are determined with Pearson’s R and a p-value.

1. Brief description of steps you followed to complete the analysis…

The variograms are created in R with the ‘usdm’ package.

Step1. Create a list of all the geotiff files in a folder

Step2. Create for every file a variogram.

var<- Variogram(raster,size=50)

Make sure to use a capital V in Variogram.

Step3. Plot the variograms with points and lines

Plot(var)                              # points

Plot(var,type=’l’)               # lines

Step4. Plot all the variograms on one graph

Par(new=TRUE)                 # this line makes sure all graphs are in the same figure

Step5. Include legend with field number and average biomass

Step6. For every variogram estimate the range and the sill and put it in an excel sheet.

Step7. Create scatterplots for i) range-biomass, ii) sill-biomass, and iii) range-sill color coded for biomass. Over here I switched to Matlab, because I’m more familiar with this. But R could do the trick as well.

Step8. Calculate Pearson’s correlation coefficient and p-value.

[R,p]=corrcoef(range,biomass)                   % repeat this for the other scatter plots.

1. Brief description of results you obtained…

In the variogram plot, Figure 1, we can see that there is a high inter field variability in spatial auto correlation for NDVI. It is difficult to tell from the graph if there is a correlation between biomass and variogram type. Also, there is a difference in crop type between the field, which has a considerable influence on the biomass. For further analysis, a distinction between crop types should be made.

Figure 1: Variograms for the different fields with average biomass

Also in the scatter plots the relation between biomass and the variogram parameters in not apparent. The Pearson’s correlation coefficients are very low, between 0.049 and 0.158 with significant p-values (for a 5% level).

Figure 2: Scatter plots for Range vs Biomass and Sill vs Biomass

Figure 3: Scatter plot for Range vs Sill with biomass color coded

1. Critique of the method – what was useful, what was not?…

This method does not show a correlation between variogram parameters and average biomass for the fields, however it is possible that a distinction in crop type would improve the results. The biggest gap in this method is the subjective estimation of the range and sill values for the variograms. In the future, a variogram can be fitted and the range and sill parameter can be automatically generated. However, also for this variogram fitting decisions need to be made, such as fitting type, which could possibly introduce subjectivity.