Request data from a particular station for the desired time period. Data are returned as a single character string containing the RAWS output.

Station identifiers can be found at https://raws.dri.edu/.

wrcc_downloadData(
  wrccID = NULL,
  startdate = strftime(lubridate::now(tzone = "UTC"), "%Y%m0101", tz = "UTC"),
  enddate = strftime(lubridate::now(tzone = "UTC"), "%Y%m%d23", tz = "UTC"),
  password = NULL,
  baseUrl = "https://wrcc.dri.edu/cgi-bin/wea_list2.pl"
)

Arguments

wrccID

Station identifier (will be upcased).

startdate

Desired start date (integer or character representing YYYYMMDD[HH]).

enddate

Desired end date (integer or character representing YYYYMMDD[HH]).

password

Password required for access to archival data.

baseUrl

Base URL for data queries.

Value

String containing RAWS data.

Examples

if (FALSE) {
# Fail gracefully if any resources are not available
try({

library(RAWSmet)

fileString <- wrcc_downloadData(wrccID = 'WENU')
cat(fileString)

# Using a password for archival data
fileString <- wrcc_downloadData(
  wrccID = "WENU",
  startdate = 20200801,
  enddate = 20200901,
  password = "MY_PASSWORD"
)

}, silent = FALSE)
}