new raws_filter() and raws_filterDate() functions
Closed this issue · 0 comments
jonathancallahan commented
Our raws_timeseries object will be more awkward for people to work with than a standard dataframe. But it is still worth using as it allows us to add lots of potentially useful "spatial metadata" without expanding the size of the data
dataframe.
To help users, we should provide basic functions to do filtering on the data
part of our timeseries objects and still return a timeseries object. 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: