Prime Farmland by State
This script is designed to retrieve the farm land class for all map units across a state
The current example only pulls the data for one county so that it will run immediately
Text highlighted in yellow in the example script can be changed to a particular area, e.g. 'MO123' or for a State; Examples can be found on the Tips page.
Tips Page
Copy the example script below and paste it into the query page on the Soil Data Access page.
Soil Data Access Query Page
Example Script
SELECT saversion AS Version, saverest AS Date, l.areasymbol AS Area_symbol, l.areaname AS Area_name, mu.musym AS Map_unit_symbol, mu.muname AS Map_Unit_name, mu.mukey AS MUKEY, mu.farmlndcl AS Farm_class
FROM sacatalog AS sac
INNER JOIN legend AS l ON l.areasymbol = sac.areasymbol
AND l.areatypename = 'Non-MLRA Soil Survey Area'
AND sac.areasymbol LIKE
'MO%'
INNER JOIN mapunit AS mu ON mu.lkey = l.lkey
ORDER BY l.areasymbol, mu.muname, mu.farmlndcl
Example Table Output
Description of tables and columns can be found on this link:
Table and Column Descriptions
Version |
Date |
Area_symbol |
Area_name |
Map_unit_symbol |
Map_Unit_name |
MUKEY |
Farm_class |
20 |
9/28/2016 8:55:25 PM |
MO229 |
Wright County, Missouri |
73010 |
Wilderness gravelly silt loam, 3 to 8 percent slopes |
2534326 |
Not prime farmland |
19 |
9/28/2016 2:09:55 PM |
MO001 |
Adair County, Missouri |
50013 |
Adco silt loam, 1 to 3 percent slopes |
2532640 |
Not prime farmland |
16 |
9/28/2016 6:29:28 PM |
MO129 |
Mercer County, Missouri |
30052 |
Gara clay loam, 14 to 18 percent slopes, moderately eroded |
2531063 |
Farmland of statewide importance |
Helping People Help the Land
USDA is an equal opportunity provider, employer, and lender.