R/monitor_extractDataFrame.R
monitor_extractDataFrame.Rd
These functions are convenient wrappers for extracting the dataframes that comprise a ws_monitor object. These functions are designed to be useful when manipulating data in a pipe chain.
Below is a table showing equivalent operations for each function.
Function | Equivalent Operation |
monitor_extractData(ws_monitor) | ws_monitor[["data"]] |
monitor_extractMeta(ws_monitor) | ws_monitor[["meta"]] |
monitor_extractData(ws_monitor) monitor_extractMeta(ws_monitor)
ws_monitor | ws_monitor object to extract dataframe from. |
---|
A dataframe from the given ws_monitor object
library(PWFSLSmoke) ws_monitor <- Northwest_Megafires data <- ws_monitor %>% monitor_subset( stateCodes = "WA", tlim = c(20150801, 20150831) ) %>% monitor_extractData() meta <- ws_monitor %>% monitor_subset( stateCodes = "WA", tlim = c(20150801, 20150831) ) %>% monitor_extractMeta() dplyr::glimpse(meta)#> Rows: 55 #> Columns: 19 #> $ monitorID <chr> "530330017_01", "530330080_01", "530050002_01", … #> $ longitude <dbl> -121.7727, -122.3086, -119.2015, -122.2806, -122… #> $ latitude <dbl> 47.49020, 47.56824, 46.21830, 47.75500, 47.56200… #> $ elevation <dbl> 140.0, 101.9, 162.0, 16.2, 4.0, 12.8, 104.0, 0.9… #> $ timezone <chr> "America/Los_Angeles", "America/Los_Angeles", "A… #> $ countryCode <chr> "US", "US", "US", "US", "US", "US", "US", "US", … #> $ stateCode <chr> "WA", "WA", "WA", "WA", "WA", "WA", "WA", "WA", … #> $ siteName <chr> "North Bend-North Bend Way (SO)", "Seattle-Beaco… #> $ agencyName <chr> "Washington Department of Ecology", "Washington … #> $ countyName <chr> "KING", "KING", "BENTON", "KING", "KING", "KING"… #> $ msaName <chr> "Seattle-Tacoma-Bellevue, WA", "Seattle-Tacoma-B… #> $ monitorType <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, … #> $ siteID <chr> "530330017", "530330080", "530050002", "53033002… #> $ instrumentID <chr> "01", "01", "01", "01", "01", "01", "01", "01", … #> $ aqsID <chr> "530330017", "530330080", "530050002", "53033002… #> $ pwfslID <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, … #> $ pwfslDataIngestSource <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, … #> $ telemetryAggregator <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, … #> $ telemetryUnitID <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, …#> Rows: 721 #> Columns: 56 #> $ datetime <dttm> 2015-08-01 00:00:00, 2015-08-01 01:00:00, 2015-08-01 0… #> $ `530330017_01` <dbl> NA, 3.5, 4.0, 4.8, 4.6, 4.5, 4.7, 4.9, 5.1, 4.9, 4.9, 4… #> $ `530330080_01` <dbl> NA, 8.3, 5.6, 3.8, 4.7, 3.9, 3.9, 4.0, 2.9, 2.5, 4.6, 4… #> $ `530050002_01` <dbl> NA, 5.8, 5.2, 6.2, 6.2, 6.2, 6.5, 5.9, 6.4, 6.4, 5.8, 5… #> $ `530330024_01` <dbl> NA, 4.8, 4.4, 4.0, 3.9, 4.0, 4.4, 5.9, 3.9, 3.6, 3.5, 3… #> $ `530330057_01` <dbl> NA, 8.0, 8.4, 8.6, 7.6, 10.4, 7.6, 7.3, 6.6, 6.1, 7.3, … #> $ `530332004_01` <dbl> NA, 5.4, 9.3, 10.3, 8.8, 8.1, 8.0, 6.6, 6.8, 7.0, 6.4, … #> $ `530530029_01` <dbl> NA, 3.7, 0.2, NA, 33.0, 1.6, 10.0, 8.2, 5.9, 11.0, 9.0,… #> $ `530530031_01` <dbl> NA, 6.6, 5.2, 4.9, 5.1, 4.6, 5.1, 6.4, 9.4, 5.9, 5.6, 6… #> $ `530610005_01` <dbl> NA, 3.8, 2.9, 1.7, 3.3, 2.9, 2.3, 3.5, 5.4, 3.0, 3.2, 4… #> $ `530611007_01` <dbl> NA, 6.4, 6.1, 4.6, 3.6, 4.3, 5.9, 6.6, 5.3, 5.3, 5.5, 6… #> $ `530630047_01` <dbl> NA, 7.3, 3.7, 4.6, 7.9, 9.4, 8.7, 8.2, 8.2, 7.8, 7.2, 7… #> $ `530670013_01` <dbl> NA, 2.7, 1.9, 1.5, 1.9, 2.3, 2.4, 2.4, 2.4, 2.4, 2.5, 2… #> $ `530531018_01` <dbl> NA, 2.0, 3.2, 2.6, 1.9, 2.7, 3.5, 4.5, 4.7, 5.3, 6.1, 4… #> $ `530272002_01` <dbl> NA, 4.8, 4.9, 5.1, 5.1, 4.9, 4.0, 4.0, 4.1, 4.0, 4.1, 3… #> $ `530310003_01` <dbl> NA, 3.4, 3.0, 3.0, 3.4, 3.7, 4.3, 4.7, 4.5, 4.7, 4.9, 4… #> $ `530730015_01` <dbl> NA, 3.8, 2.5, 6.9, 1.3, 9.5, 6.0, 9.0, 9.7, 12.9, 9.1, … #> $ `530251002_01` <dbl> NA, 4.9, 7.4, 6.0, 5.3, 7.9, 9.2, 10.1, 9.4, 8.4, 8.7, … #> $ `530650004_01` <dbl> NA, 2.7, 3.4, 4.8, 5.5, 6.3, 7.9, 11.7, 12.5, 12.6, 13.… #> $ `530010003_01` <dbl> NA, 1.7, 2.3, 3.2, 5.3, 4.4, 4.9, 4.8, 5.1, 5.1, 4.8, 4… #> $ `530750006_01` <dbl> NA, 3.9, 4.3, 5.3, 6.4, 6.5, 8.0, 8.2, 7.4, 7.1, 6.6, 6… #> $ `530750003_01` <dbl> NA, 6.1, 6.2, 6.4, 10.8, 15.6, 13.9, 13.6, 12.4, 10.4, … #> $ `530331011_01` <dbl> NA, 8.3, 6.8, 6.3, 7.9, 8.2, 5.8, 5.5, 6.4, 7.7, 6.6, 6… #> $ `530210002_01` <dbl> NA, 4.8, 5.3, 7.1, 7.6, 7.8, 5.9, 6.7, 7.6, 7.7, 7.8, 7… #> $ `530330037_01` <dbl> NA, 3.7, 4.7, 5.5, 4.0, 3.1, 3.0, 2.8, 2.5, 2.3, 2.2, 2… #> $ `530710005_01` <dbl> NA, 3.4, 2.9, 4.5, 4.7, 3.9, 4.1, 4.9, 5.5, 4.6, 4.2, 4… #> $ `530750005_01` <dbl> NA, 4.7, 4.5, 4.3, 4.3, 4.6, 4.6, 4.4, 4.7, 5.1, 4.9, 5… #> $ `530150015_01` <dbl> NA, 4.2, 2.6, 2.2, 3.3, 3.3, 3.0, 3.4, 3.8, 3.8, 3.5, 3… #> $ `530470009_01` <dbl> NA, 9.6, 8.4, 8.2, 9.9, 10.1, 9.4, 8.9, 9.6, 9.3, 8.3, … #> $ `530370002_01` <dbl> NA, 0.0, 2.7, 2.1, 3.0, 3.0, 5.2, 5.7, 7.6, 5.4, 5.3, 7… #> $ `530090013_01` <dbl> NA, 2.9, 3.0, 2.9, 2.8, 2.8, 2.7, 2.4, 2.5, 2.1, 2.2, 2… #> $ `530610020_01` <dbl> NA, NA, NA, NA, NA, 9.6, 6.9, 6.6, 6.8, 8.7, 6.6, 5.2, … #> $ `530070010_01` <dbl> NA, 2.3, 1.9, 2.2, 6.1, 2.9, 3.0, 3.3, 3.6, 3.6, 3.6, 3… #> $ `530770015_01` <dbl> NA, 6.5, 7.7, 7.8, 4.6, 5.3, 5.7, 6.4, 6.4, 6.6, 6.0, 6… #> $ `530650002_01` <dbl> NA, 3.9, 4.8, 5.9, 5.9, 4.1, 3.4, 3.1, 3.6, 4.4, 8.2, 8… #> $ `530470010_01` <dbl> NA, 5.3, 3.1, 4.3, 4.9, 3.8, 4.2, 4.6, 5.8, 6.7, 6.5, 9… #> $ `530770009_01` <dbl> NA, 19.7, 12.6, 9.8, 4.1, 6.5, 7.6, 8.9, 7.1, 6.5, 7.3,… #> $ `530570015_01` <dbl> NA, 4.4, 3.5, 2.8, 3.3, 3.0, 2.9, 3.4, 3.6, 3.4, 3.7, 3… #> $ `530130002_01` <dbl> NA, 3.2, 3.0, 3.5, 3.7, 3.3, 3.2, 3.2, 3.1, 3.1, 3.1, 3… #> $ `530030004_01` <dbl> NA, 5.3, 5.8, 5.8, 7.8, 8.8, 9.8, 10.1, 10.6, 9.7, 9.1,… #> $ `530110022_01` <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,… #> $ `530579999_01` <dbl> NA, 2.2, 1.6, 1.7, 2.1, 2.1, 2.3, 2.2, 2.3, 2.3, 2.2, 1… #> $ `530639997_01` <dbl> NA, 0.2, 1.5, 6.8, 6.4, 9.6, 11.7, 8.0, 10.0, 9.4, 7.7,… #> $ `530299999_01` <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 2.1… #> $ `530639996_01` <dbl> NA, 1.1, 7.4, 16.1, 10.3, 14.8, 8.9, 12.9, 6.1, 9.3, 10… #> $ `530410004_01` <dbl> NA, 2.6, 2.0, 2.8, 2.8, 2.6, 3.1, 3.7, 3.9, 4.0, 4.1, 4… #> $ `530770016_01` <dbl> NA, 5.9, 6.8, 11.4, 6.3, 5.9, 5.5, 5.9, 5.2, 5.5, 5.2, … #> $ `530090015_01` <dbl> NA, 4.7, 5.2, 4.1, 3.7, 3.5, 3.6, 3.6, 3.7, 3.6, 3.2, 2… #> $ `530450007_01` <dbl> NA, 2.0, 2.3, 2.1, 2.7, 3.3, 3.6, 4.2, 4.7, 5.0, 5.5, 5… #> $ `530470013_01` <dbl> NA, 25.7, 21.3, 18.5, 19.6, 21.7, 22.9, 16.9, 12.7, 11.… #> $ `530570011_01` <dbl> NA, 6.0, 2.0, 4.5, 3.4, 3.4, 4.2, 3.5, 5.7, 3.0, 2.4, 2… #> $ `530350007_01` <dbl> NA, 3.0, 3.7, 4.1, 2.8, 4.9, 4.5, 2.5, 3.1, 3.3, 3.9, 2… #> $ `530070011_01` <dbl> NA, -2.1, -0.8, -1.3, 0.6, -0.1, -0.1, 0.6, 4.1, 0.5, -… #> $ `530330030_01` <dbl> NA, 7.9, 4.8, 2.9, 1.8, 4.4, 3.0, NA, 1.7, 0.5, 1.1, 2.… #> $ `530110024_01` <dbl> NA, 2.0, 0.7, 4.1, 7.3, 7.7, 6.6, 5.1, 6.0, 6.6, 0.5, N… #> $ `530090017_01` <dbl> NA, 4.2, 3.5, 4.6, 4.8, 5.8, 5.7, 5.4, 5.8, 5.8, 5.5, 5…