refresh_registry: Automatic update by regional queries to NASIS soil series...

View source: R/registry.R

refresh_registryR Documentation

Automatic update by regional queries to NASIS soil series server

Description

Text files are written to alphabetical (first letter) folders containing raw Official Series Descriptions (OSDs). This method is for use in automatic pipeline (e.g. a GitHub action) to regularly replicate changes that occur across the entire set of series for commit.

There is an assumption that the files are downloaded to a Linux-like default "Downloads" folder "~/Downloads" or "/home/user/Downloads" which are standard on "ubuntu-latest" where these actions are typically run. The files matching the path "osddwn.*zip$" get moved to the repository "raw" folder.

Usage

refresh_registry(
  test = FALSE,
  moID = c(Alaska = 36871, `North Central` = 117, Northeast = 153, Northwest = 134,
    `South Central` = 127, Southeast = 122, Southwest = 113, `Special Projects` = 44372),
  port = 4567L
)

Arguments

test

Default: FALSE; run on a pair of small regions (MO 12, 13)

moID

Region ID codes; see default argument value in function definition for details

port

Passed to RSelenium::rsDriver(). Default: 4567L.

Details

Thank goodness we don't need to read .doc files... the server delivers .txt masquerading as .doc. Queries that error are re-tried after splitting in half (established year before or after 1980).

Value

0 if function completes.

Author(s)

Andrew G. Brown

Examples


## note: takes several minutes to run and downloads ~100MB .ZIP data
# refresh_registry()


ncss-tech/OSDRegistry documentation built on April 5, 2025, 4:02 a.m.