fetchNASIS | R Documentation |
SoilProfileCollection
from NASISFetch commonly used site/pedon/horizon or mapunit component data
from NASIS, returned as a SoilProfileCollection
object.
This function imports data from NASIS into R as a SoilProfileCollection
object. It "flattens" NASIS pedon and component tables, including their
child tables, into several more manageable data frames. Primarily these
functions access the local NASIS database using an ODBC connection. The
dsn
argument allows you to specify a path or DBIConnection
to an SQLite
database. The argument from = "pedon_report"
, data can be read from the
NASIS Report 'fetchNASIS', from either text file or URL (specified as
url
). The primary purpose of fetchNASIS(from = "pedon_report")
is
importing datasets larger than 8000+ pedons/components.
Tutorials:
fetchNASIS(
from = "pedons",
url = NULL,
SS = TRUE,
rmHzErrors = FALSE,
nullFragsAreZero = TRUE,
soilColorState = "moist",
mixColors = FALSE,
lab = FALSE,
fill = FALSE,
dropAdditional = TRUE,
dropNonRepresentative = TRUE,
duplicates = FALSE,
stringsAsFactors = NULL,
dsn = NULL
)
get_concentrations_from_NASIS_db(
SS = TRUE,
stringsAsFactors = NULL,
dsn = NULL
)
get_phfmp_from_NASIS_db(SS = TRUE, stringsAsFactors = NULL, dsn = NULL)
from |
Determines what objects should fetched? Default: |
url |
String specifying the url for the NASIS pedon_report (default:
|
SS |
Fetch data from the currently loaded selected set in NASIS or from
the entire Local database (default: |
rmHzErrors |
Should pedons with horizon depth errors be removed from the
results? (default: |
nullFragsAreZero |
Should fragment volumes of |
soilColorState |
Used only for |
mixColors |
Should mixed colors be calculated where multiple colors are
populated for the same moisture state in a horizon? Default |
lab |
Should the |
fill |
Include pedon or component records without horizon data in
result? (default: |
dropAdditional |
Used only for |
dropNonRepresentative |
Used only for |
duplicates |
Used only for |
stringsAsFactors |
deprecated |
dsn |
Optional: path or DBIConnection to
local database containing NASIS table
structure; default: |
The value of nullFragsAreZero
will have a significant impact on the rock
fragment fractions returned by fetchNASIS. Set nullFragsAreZero = FALSE
in those cases where there are many data-gaps and NULL rock fragment values
should be interpreted as NULL. Set nullFragsAreZero = TRUE
in those
cases where NULL rock fragment values should be interpreted as 0.
This function attempts to do most of the boilerplate work when extracting site/pedon/horizon or component data from a local NASIS database. Pedon IDs that are missing horizon data, or have errors in their horizonation are printed on the console. Pedons with combination horizons (e.g. B/C) are erroneously marked as errors due to the way in which they are stored in NASIS as two overlapping horizon records.
A SoilProfileCollection
object
D. E. Beaudette, J. M. Skovlin, S.M. Roecker, A.G. Brown
get_component_data_from_NASIS()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.