31 may 2024

Colour predictions with soilspec package

 The soilspec package comes with a data set called specSoilCol, which has 12 spectra of four types (A, B, C and D) of soils at three deferent depthss (Horizons 1, 2 and 3). 

The spectra is a Reflectance scale:

Now we use the function spectra2colour in the soilspec package and we obtain the predicted colours for the 12 samples that we have to compare with the real colours of the samples.

Normally the soil in the Horizon 1 is darker due to a higher quantity of organic matter.


30 may 2024

Colour data available in soilspec package

 Once we have installed the soilspec package we need some data (spectra) to work with, so we can import our own data, or to use the data available in the package (datsoilspc).

The data set has 391 spectra samples (range from 350 to 2500 nm in 1 nm steps) acquired with an AgriSpec instrument using a probe. All the information of this dataset is given in the description of this file in the poject.

Once we have the data in the workspace we can plot it as a first and quick look, so we realize that we must treat these spectra in order to have a better idea of the characteristics of the samples.

The spectra come with four constituent values: clay, sand, silt and Total Carbon.


The package come with another data set with spectra of a profile with factor variables for the Horizon ("H1", "H2", "H3"), Soil ("A", "B" , "C" and "D") and the reflectance spectra scanned every 10cm down to the profile (see the file description in the package).  

Before to work with the spectra in the coming posts, I show some videos to understand what a profile is, and how the colour can talk about the characteristics of the soil.


In the next video  professor Ray Weil study the colour in a profile.


Can we use spectroscopy to predict a colour (based on the spectrum) and to compare the predicted value with the original colour?. I think this a good exercise that the author of the soil package propose in the book "Soil Spectral Inference with R" which is the companion book for this package.

27 may 2024

soilspec R package (installation)

 I want to test during the coming days the soilspec package. It is a package not available yet from CRAN, but you can get it from the author author`s GitHub . I use in this case the tar.gz file, and after I install from the folder where I download it.

Take care during the installation, because you can receive some warnings and errors telling you that you don´t have some dependencies, as in my case the "MatrixStats" and "clhs" packages. Once I have installed these packages, I have the soilspec package ready to use and in the coming posts we will work with it.

26 may 2024

Veris® - Soil Mapping


It is interesting to be updated of the new infrared instruments applied to agricultural vehicles in order to measure soil parameters like Nitrogen, Organic Matter, pH and others to create a Soil Mapping and extract the maximum  benefits from the land, so in this aspect is  important to follow the Glosolan Spectroscopy Webinars where the experts will show in the presentation slides some of the companies which are in the front line in this matter.




24 may 2024

GLOSOLAN Soil Spectroscopy Webinar #1 2024

GLOSOLAN continua con su labor de mantenernos informados en como las técnicas espectrales de Infrarrojo contribuyen al análisis del suelo. Durante este año 2024 se desarrollaran varios Webinarios muy interesantes, mostrando en este post el primero.
Podéis descargaros la presentación aquí.

3 may 2024

Foro Romano y Palatino


He tenido la ocasión de estar en Roma este mes y la verdad es que me ha encantado la ciudad, y por supuesto la comida.
He tomado bastantes fotos y con las del foro Romano he preparado este corto video.