Converts a raws_timeseries object to a single, tidy dataframe containing all varaibles from rawsObject$data along with the following values from rawsObject$meta:

  1. nwsID - the nwsID of the station

  2. wrccID - the wrccID of the station

  3. locationName - the name of the station

  4. longitude - longitude coordinate of the station

  5. latitude - latitude coordinate of the station

  6. elevation - elevation of the station

  7. timezone - timezone of the station

Additionally, this dataframe contains the following parameters of interest:

  1. Vapor Pressure Deficit (VPD):

    • https://andrewsforest.oregonstate.edu/sites/default/files/lter/data/studies/ms01/dewpt_vpd_calculations.pdf

    • https://en.wikipedia.org/wiki/Clausius–Clapeyron_relation#Meteorology_and_climatology

  2. Fosberg Fire Weather Index (FFWI):

    • https://a.atmos.washington.edu/wrfrt/descript/definitions/fosbergindex.html

This version of the RAWS data is known as a rawsDF object.

Replicating this set of variables for every record greatly inflates the size of the data but also makes it much more useful when working with the dplyr and ggplot2 packages.

Multiple rawsDF objects can be combined with dplyr::bind_rows() and used to create multi-station plots.

raws_toRawsDF(rawsObject = NULL, sizeMax = 100)

Arguments

rawsObject

raws_timeseries object to convert.

sizeMax

Maximum allowable size (in MB) for the resulting dataframe.

Value

Tidy dataframe containing data and metadata.

Examples

if (FALSE) {
library(RAWSmet)

setRawsDataDir("~/Data/RAWS/")

stationMeta <- wrcc_loadMeta(stateCode = "WA")
rawsObject <- wrcc_loadYear(
  wrccID = "waWENU",
  meta = stationMeta,
  year = 2020,
  password = MY_PASSWORD
)

rawsDF <- raws_toRawsDF(rawsObject)

dplyr::glimpse(rawsDF)
}