soil-data

Retrieve soil properties from SoilGrids 2.0 and SSURGO, then compute SOC stocks and USDA texture classes.

33|6|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/xjtulyc/awesome-rosetta-skills --skill soil-data
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: soil-data
Source: https://github.com/xjtulyc/awesome-rosetta-skills/tree/main/skills/19-agriculture/soil-data
Command: npx skills add https://github.com/xjtulyc/awesome-rosetta-skills --skill soil-data

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, numpy, pandas, scipy, matplotlib, scikit-learn, pyarrow.

What problem does it solve?

This Skill solves the problem of turning raw soil measurements and map-derived datasets into actionable soil property estimates, including soil organic carbon (SOC) stocks, USDA texture classification, spatial interpolation, and visual profiles.

Core Features & Use Cases

  • SoilGrids 2.0 data retrieval: Query soil properties by point or within a bounding-box grid using the SoilGrids 2.0 REST API and return tidy DataFrames with means and uncertainty.
  • SOC stock computation: Compute SOC stocks from bulk density and SOC concentration across depth intervals, including profile-level aggregation.
  • Texture classification & visualization: Classify soil texture using the USDA texture rules (via sand/clay inputs) and visualize depth profiles with horizontal bar charts.
  • Spatial interpolation (kriging): Perform ordinary kriging with a fitted spherical variogram to interpolate soil properties over a target grid.
  • SSURGO support (R): Demonstrate SSURGO horizon retrieval and SOC stock calculation using soilDB and related R packages.

Quick Start

Use the soil-data skill to estimate SOC and soil texture for a study area by querying SoilGrids at your chosen bounding box and depth, then generating a depth-profile visualization for the resulting properties.

Frequently Asked Questions about soil-data

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate soil organic carbon stock from bulk density and SOC concentration across depth intervals?

To calculate soil organic carbon (SOC) stock, you compute the metric from bulk density and SOC concentration across specific depth intervals, including profile-level aggregation. This requires unit-aware preprocessing to ensure accurate depth-interval aggregation logic for reliable carbon estimates.

Can I retrieve SoilGrids 2.0 soil properties for a specific bounding box grid?

Yes, you can retrieve SoilGrids 2.0 soil properties by point or within a bounding-box grid using the SoilGrids REST API. The query returns tidy DataFrames containing soil property means and uncertainty for your specified area.

What is the best way to perform ordinary kriging for spatial interpolation of soil data?

The best way to perform ordinary kriging for spatial interpolation of soil data is by fitting a spherical variogram to your sampled properties. This geostatistical approach interpolates soil measurements over a target grid using scientific Python libraries like numpy and scipy.

How do I classify USDA soil texture and visualize depth profiles using sand and clay inputs?

To classify USDA soil texture, you apply USDA texture rules using sand and clay inputs. After classifying the soil texture, you can visualize depth profiles for carbon and texture analysis by generating horizontal bar charts with matplotlib.

Does this soil analysis workflow support SSURGO horizon retrieval?

Yes, the workflow supports SSURGO horizon retrieval and SOC stock calculation using soilDB and related R packages. This complements the primary Python-based SoilGrids retrieval, offering alternative data source access for regional soil-science analysis.

Do I need HTTP-based API access to query SoilGrids for agricultural workflows?

Yes, you need HTTP-based SoilGrids access to query soil properties for agricultural and soil-science workflows. This access enables point queries and regional gridded sampling to retrieve raw data for spatial interpolation and depth-profile visualization.