Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetchLDM: add area_type argument for non-SSA area queries #328

Merged
merged 2 commits into from
Dec 21, 2023
Merged

Conversation

brownag
Copy link
Member

@brownag brownag commented Dec 20, 2023

With 47166ae can use the area_type argument to choose lab data from SSA, country, state, county, MLRA, national forest/park.

For example: get chemical properties for all layers in MLRA 22A:

library(soilDB)

x <- fetchLDM("22A", 
              what = "area_code", 
              area_type = "MLRA", 
              tables = "lab_chemical_properties")
#> single result set, returning a data.frame
#> converting profile IDs from integer to character
#> Warning: Horizon bottom depths contain NA! Check depth logic with
#> aqp::checkHzDepthLogic()

x$new_zealand_phosphorus_retent |> 
  density(na.rm=T, from=0, to=100) |> 
  plot()

Closes #294

@brownag brownag merged commit 429000e into master Dec 21, 2023
5 checks passed
brownag added a commit that referenced this pull request Dec 22, 2023
@brownag brownag deleted the for294 branch January 9, 2024 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fetchLDM() add area_type argument
1 participant