You will find the R script for generating random clustered data adapted from "Dealing with clustered samples for assessing map accuracy by cross-validation" by de Bruin et al. (2022). The analysis is focused on soil organic carbon stock (OCS) with maps covering western Europe. See further details here.
The geotiff and shapefiles to run the R script can be downloaded here.
See an example of random realisation for strongly clustered data .
See an example of random realisation for moderately clustered data .