Description Usage Arguments Value Examples
View source: R/add_pollutants.R
add PM2.5, NO2, and O3 concentrations to data based on geohash
1 | add_schwartz_pollutants(d, verbose = FALSE, ...)
|
d |
dataframe with columns called 'sitecode', 'start_date', and 'end_date' (most likely the output from the 'schwartz_grid_lookup“ container) |
verbose |
if TRUE a statement is printed to the console telling the user which chunk file is currently being processed. Defaults to FALSE. |
... |
arguments passed to |
the input dataframe, expanded to include one row per day between the given 'start_date' and 'end_date', with appended columns for geohash, PM2.5, NO2, and O3 concentrations.
1 2 3 4 5 6 7 8 9 10 | if (FALSE) {
d <- tibble::tribble(
~id, ~lat, ~lon, ~site_index, ~sitecode, ~start_date, ~end_date,
'55000100280', 39.2, -84.6, '9607238', '211050640897', '2008-09-09', '2008-09-11',
'55000100281', 39.2, -84.6, '9607238', '211050640897', '2007-08-05', '2007-08-08',
'55000100282', 39.2, -84.6, '9607238', '211050640897', '2015-08-31', '2015-09-02') %>%
dplyr::mutate_at(vars(start_date, end_date), as.Date)
add_schwartz_pollutants(d)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.