300,000+ soil components. 3,143 counties. 254 SQL scripts. One open platform connecting the nation's most comprehensive soil database to interactive maps, data journalism, and conservation science.
From full-screen interactive maps to scroll-driven data journalism, each application reveals a different dimension of the SSURGO soil database.
Every number below comes from the SSURGO soil database — aggregated from county surveys across 56 states and territories, queried directly via the SDA REST API.
254 production SQL scripts span far beyond conventional soil science. These are a few of the stories waiting inside SSURGO.
Every map, chart, and discovery in this project starts as a SQL query against SSURGO's 150+ table schema. These are four of the most powerful.
SELECT mu.musym, mu.muname, -- dominant condition fragility class (SELECT TOP 1 ci.interphrc FROM component c INNER JOIN cointerp ci ON ci.cokey=c.cokey WHERE ci.mrulename='Fragile Soil Index' AND ci.ruledepth=0 AND c.majcompflag='Yes' ORDER BY c.comppct_r DESC) AS fsi_class FROM legend l INNER JOIN mapunit mu ON mu.lkey=l.lkey WHERE l.areasymbol='IA001'
-- SOC per horizon [g/m²] ROUND( (((hzdepb_r - hzdept_r) * ((om_r / 1.724) * dbthirdbar_r)) / 100.0) * ((100.0 - fragvol) / 100.0) * (comppct_r * 100), 3 ) AS HZ_SOC
SELECT mu.mukey, mu.muname, (SELECT MAX(interphr) FROM component c INNER JOIN cointerp ci ON ci.cokey=c.cokey WHERE ci.mrulename LIKE 'NCCPI%Ver 3.0%' AND ci.ruledepth=1 ) AS NCCPI_score FROM mapunit mu
SELECT land_class, SUM(Applied_Amount) AS acres, SUM(avg_co2_mean * Applied_Amount) AS total_co2_reduction, SUM(avg_n2o_mean * Applied_Amount) AS total_n2o_reduction FROM #chorizon_agg_lite GROUP BY land_class, state_abbr
Full-scale conservation planning queries — CART regenerative ag scoring and CEAP Grazing Lands soil properties — converted to SDA macro syntax and ready to run.
~DeclareGeometry(@aoiGeom)~ ~DeclareGeometry(@aoiGeomFixed)~ ~DeclareChar(@attributeName,60)~ SELECT LRC.landunit, LRC.attributename AS rating_name, LRC.rating_value, LRC.rating_class FROM #LandunitRatingsCART
~DeclareVarchar(@area,20)~ ~DeclareInt(@domc)~ ~DeclareInt(@major)~ SELECT @area = 'AR097'; -- 0=dominant, 1=all components SELECT @domc = 1;