MazamaScience/RAWSmet

raws_extractMeta() and raws_extractData() functions

Closed this issue · 0 comments

For pipelines, it will be useful to be able to extract the meta or data data frames with a function. This will allow use to create "recipe style" pipelines. My goal is to end up with code like this:

fw13_load("451702") %>%
  fw13_filterDate(20050801, 20050901, timezone = "America/Los_Angeles") %>%
  raws_extractData(forOpenair = TRUE) %>%
  openair::timePlot(
    pollutant = c("temperature", "humidity"),
    avg.time = "hour",
    main = "Temperature and Humidity in Enumclaw, August 2005", 
    key = TRUE,
    name.pol = c("temperature (°F)", "humidity (%)"), 
    ylab = ""
  )

These functions will be almost identical to similar functions in AirSensor:

While you're at it, let's create raws_~() functions for each of:

  • raws_isRaws()
  • raws_isEmpty()
  • raws_distinct() (but leave off the .replaceRecordsWithDuplicateTimestamps() part)
  • raws_extractData() (but add support for forOpenair = TRUE)
  • raws_exttractMeta()