wrcc_loadMeta: Load WRCC RAWS station metadata from a local directory

View source: R/wrcc_loadMeta.R

wrcc_loadMetaR Documentation

Load WRCC RAWS station metadata from a local directory

Description

Loads WRCC station metadata for a given state from the rawsDataDir. If the data is not in this directory, this will download and save the data.

Usage

wrcc_loadMeta(
  stateCode = NULL,
  newDownload = FALSE,
  baseUrl = "https://raws.dri.edu/",
  verbose = TRUE
)

Arguments

stateCode

Two character state code (will be downcased).

newDownload

Logical flag stating whether or not to download and override existing data.

baseUrl

Base URL for data queries.

verbose

Logical flag controlling detailed progress statements.

Value

Dataframe containing station metadata.

References

Program for Climate, Ecosystem and Fire Applications

See Also

wrcc_createMeta

setRawsDataDir

Examples

## Not run: 
# Fail gracefully if any resources are not available
try({

# For creation of metadata
library(MazamaSpatialUtils)
setSpatialDataDir("~/Data/Spatial")
loadSpatialData("NaturalEarthAdm1.rda")

library(RAWSmet)
setRawsDataDir("~/Data/RAWS")

wa_meta <- wrcc_loadMeta(stateCode = "WA")

dplyr::glimpse(wa_meta, width = 80)

}, silent = FALSE)

## End(Not run)


MazamaScience/RAWSmet documentation built on May 6, 2023, 6:57 a.m.