parse_nssh_index provides a basic framework and folder structure for assets that are part of the National Soil Survey Handbook (NSSH) a key part of National Cooperative Soil Survey (NCSS) standards.

parse_nssh_index(
  logfile = file.path(outpath, "NSSH/NSSH.log"),
  nssh_url = NULL,
  ignore.headers = NULL,
  outpath = "./inst/extdata",
  download_pdf = "ifneeded",
  output_types = c("txt", "html"),
  keep_pdf = FALSE,
  ...
)

Arguments

logfile

Path to log file; default file.path(outpath, "NSSH/NSSH.log")

nssh_url

A URL to parse for Table of Contents information.

ignore.headers

A character vector of h3 level headers to ignore on the NSSH Table of contents webpage.

outpath

A directory path to create "inst/extdata/NSSH" folder structure.

download_pdf

Download official PDF files from eDirectives? default: "ifneeded"; options: TRUE/FALSE

output_types

Options include c("txt","html") for processed PDF files.

keep_pdf

Keep PDF files after processing TXT?

...

Additional arguments to `curl::curl_download()`

Value

A data.frame object containing link, part and section information for the NSSH. A directory "inst/extdata/NSSH" is created in outpath (Default: "./inst/extdata/NSSH/") with a numeric subfolder for each part in the NSSH.