Skip to content

Commit

Permalink
exclude STATSGO
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanbeaudette committed Sep 26, 2023
1 parent febd3d0 commit c002a60
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion invesintens-SSURGO.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ library(soilDB)
# total number of map units
SDA_query("SELECT COUNT(mukey) as n FROM mapunit")


# exclude STATSGO
.sql <- "
SELECT CASE WHEN invesintens IS NULL THEN 'missing' ELSE invesintens END,
CAST(
Expand All @@ -14,6 +14,8 @@ CAST(
AS numeric
) / (SELECT COUNT(mukey) FROM mapunit) AS prop
FROM mapunit
INNER JOIN legend ON mapunit.lkey = legend.lkey
WHERE areasymbol != 'US'
GROUP BY invesintens
ORDER BY prop DESC ;"

Expand Down

0 comments on commit c002a60

Please sign in to comment.