Jeffrey Aguilar

data science | engineering

Soil Heterogeneity

For this project, I worked as a data analysis consultant for the Donald Danforth Plant Science Center to analyze x-ray scans of soil cores, quantifying differences in soil structure across various treatments like tillage and fertilizer applications. A key goal was to develop methods to extract local density information from the scans, in addition to characterizing soil heterogeneity through statistical image analysis. This work aimed to help gain insights into how agricultural practices affect soil properties.

The raw data consisted of over 50 3D x-ray scans of soil cores extracted from long-term experimental plots, with treatments including no till, chisel till, high fertilizer, high manure and native prairie. Each scan contained over 3000 horizontal image slices.

Image Processing and Feature Extraction

To process this data, I developed a Python library to load and segment the scans into soil and non-soil regions. I then employed techniques like calibrating pixel intensities against known density materials to estimate local soil density. Additionally, I computed informative statistics like skewness and kurtosis using sliding windows to quantify structure heterogeneity.

Segmenting soil core from container and air, basic statistics of soil core pixel intensity by depth.

Below is an example of some of the features computed, showing striking visible differences between soil treatments. Visit this interactive streamlit app to further explore the metrics.

Statistical Analysis and Modeling

Using mutual information, I identified average kurtosis, skewness and Sobel edges as highly informative for distinguishing between soil treatments. 

SVM classification modeling using these metrics yielded ~90% accuracy in predicting fertilizer treatment. I employed t-SNE dimensionality reduction to visualize the separability of different soils in two dimensions.

t-SNE plot showing strong clustering by treatment.

Conclusions and Impact 

This analysis revealed that statistical measures of pore structure from x-ray scans can help differentiate the effects of agricultural practices on soil heterogeneity. The methods provide a quantitative view into how factors like tillage and nutrients affect soil structure.

Going forward, connecting these metrics to physical characteristics like drainage and nutrient transport will further help interpret their meaning. The full codebase is available on GitHub, including data processing libraries, analysis notebooks and interactive visualizations. This project displays my expertise in image analysis, feature engineering, modeling, and data visualization.

Blog at WordPress.com.