Run the following commands to setup the report template.
# load this library
library(soilReports)
# install required packages for this report
reportSetup(reportName='southwest/dmu-summary')
# copy report folder 'dmu-summary' to your current working directory
reportInit(reportName='southwest/dmu-summary', outputDir='dmu-summary')
This report requires loading several related objects into your NASIS Selected Set, including Area, Legend Mapunit, Correlation, Component Pedon, Pedon and Site Observation.
A useful NASIS query that gets all of the necessary objects is NSSC Pangaea: Area/Legend/Mapunit/DMU/Pedon/Site by areasymbol.
Open report.Rmd
, review the "params" section of the YAML header to select target mapunit and cache file name, then click "knit". You can cache the data for many map units (e.g. a whole soil survey area) once, then re-run the report several times with different musym
values. To force new data to be loaded from the database, delete the .rda file specified in cache_file
in the document directory.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.